Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

diis.h

00001 //
00002 // diis.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifndef _math_optimize_diis_h
00029 #define _math_optimize_diis_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <math/optimize/scextrap.h>
00036 
00038 class DIIS: public SelfConsistentExtrapolation {
00039   protected:
00040     int start;
00041     int ndiis;
00042     int iter;
00043     int ngroup;
00044     int ngroupdiis;
00045     double damping_factor;
00046 
00047     double * btemp;
00048     double ** bold;
00049     double ** bmat;
00050 
00051     Ref<SCExtrapData> dtemp_data;
00052     Ref<SCExtrapError> dtemp_error;
00053 
00054     Ref<SCExtrapData> Ldata;
00055 
00056     Ref<SCExtrapData> *diism_data;
00057     Ref<SCExtrapError> *diism_error;
00058 
00059     void init();
00060   public:
00061     DIIS(int strt=1, int ndi=5, double dmp =0, int ngr=1, int ngrdiis=1);
00062     DIIS(StateIn&);
00088     DIIS(const Ref<KeyVal>&);
00089     ~DIIS();
00090 
00091     void save_data_state(StateOut&);
00092     
00093     int extrapolate(const Ref<SCExtrapData>& data,
00094                     const Ref<SCExtrapError>& error);
00095 
00096     void start_extrapolation();
00097 
00098     void reinitialize();
00099 };
00100 
00101 #endif
00102 
00103 // Local Variables:
00104 // mode: c++
00105 // c-file-style: "ETS"
00106 // End:

Generated at Thu Oct 4 18:08:43 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.