00001 // QMcBeaver 00002 // 00003 // Constructed by 00004 // 00005 // Michael Todd Feldmann 00006 // and 00007 // David Randall "Chip" Kent IV 00008 // 00009 // Copyright 2000. All rights reserved. 00010 // 00011 // drkent@users.sourceforge.net mtfeldmann@users.sourceforge.net 00012 00013 #ifndef QMCHarmonicOscillator_H 00014 #define QMCHarmonicOscillator_H 00015 00016 #include <iostream> 00017 #include <sstream> 00018 00019 #include "QMCInput.h" 00020 #include "QMCDouble.h" 00021 #include "QMCConfigIO.h" 00022 #include "IeeeMath.h" 00023 #include "QMCWalkerData.h" 00024 #include "QMCFunctions.h" 00025 00026 using namespace std; 00027 00028 class QMCHarmonicOscillator : public QMCFunctions 00029 { 00030 public: 00034 QMCHarmonicOscillator() {}; 00035 00042 QMCHarmonicOscillator(QMCInput *input); 00043 00050 QMCHarmonicOscillator(const QMCHarmonicOscillator & rhs ) 00051 { 00052 *this = rhs; 00053 } 00054 00058 ~QMCHarmonicOscillator() {}; 00059 00073 void evaluate(Array1D<QMCWalkerData *> &walkerData, 00074 Array1D<Array2D<double> * > &xData, 00075 int num); 00076 00077 void evaluate(Array2D<double> &X, QMCWalkerData & data) 00078 { 00079 Array1D< Array2D<double>* > tempX; 00080 tempX.allocate(1); 00081 tempX(0) = &X; 00082 Array1D< QMCWalkerData * > tempWD; 00083 tempWD.allocate(1); 00084 tempWD(0) = &data; 00085 evaluate(tempWD,tempX,1); 00086 } 00087 00093 void operator=(const QMCHarmonicOscillator & rhs ) 00094 { 00095 Input = rhs.Input; 00096 } 00097 00098 private: 00099 double a, w, w2div2, a2; 00100 00101 }; 00102 00103 #endif 00104 00105 00106 00107 00108