SineGordon.h

00001 #ifndef gridripper_phys_scalar_SineGordon_h
00002 #define gridripper_phys_scalar_SineGordon_h
00003 
00004 #include "ScalarPotential.h"
00005 #include <gridripper/lang/IllegalArgumentException.h>
00006 #include <cmath>
00007 
00008 namespace gridripper {
00009 
00010 class Parameters;
00011 
00012 namespace phys { namespace scalar {
00013 
00014 using namespace std;
00015 
00023 class SineGordon: public ScalarPotential
00024 {
00025 private:
00026     GReal_t mass;
00027     GReal_t massSq;
00028 
00029 public:
00035     SineGordon(const string& str, const Parameters& p)
00036         throw(IllegalArgumentException&);
00037 
00044     GReal_t eval_V(GReal_t psi, GReal_t T) {
00045         return massSq*(1 - cos(psi));
00046     }
00047 
00054     GReal_t eval_dVdpsi(GReal_t psi, GReal_t T) {
00055         return massSq*sin(psi);
00056     }
00057 };
00058 
00059 } } } // namespace gridripper::phys::scalar
00060 
00061 #endif /* gridripper_phys_scalar_SineGordon_h */

Generated on Wed Jun 17 18:46:47 2009 for GridRipper by  doxygen 1.5.6