1 //////////////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (c) 2008 The Regents of the University of California 4 // 5 // This file is part of Qbox 6 // 7 // Qbox is distributed under the terms of the GNU General Public License 8 // as published by the Free Software Foundation, either version 2 of 9 // the License, or (at your option) any later version. 10 // See the file COPYING in the root directory of this distribution 11 // or <http://www.gnu.org/licenses/>. 12 // 13 //////////////////////////////////////////////////////////////////////////////// 14 // 15 // PSDAWavefunctionStepper.h 16 // 17 //////////////////////////////////////////////////////////////////////////////// 18 19 #ifndef PSDAWAVEFUNCTIONSTEPPER_H 20 #define PSDAWAVEFUNCTIONSTEPPER_H 21 22 #include "WavefunctionStepper.h" 23 #include "Wavefunction.h" 24 class Preconditioner; 25 26 class PSDAWavefunctionStepper : public WavefunctionStepper 27 { 28 private: 29 30 Preconditioner& prec_; 31 Wavefunction wf_last_, dwf_last_; 32 33 // Anderson acceleration flag 34 bool extrapolate_; 35 36 public: 37 38 void update(Wavefunction& dwf); preprocess(void)39 virtual void preprocess(void) { extrapolate_ = false; } 40 41 PSDAWavefunctionStepper(Wavefunction& wf, Preconditioner& prec, 42 TimerMap& tmap); 43 ~PSDAWavefunctionStepper(); 44 }; 45 #endif 46