Quartic.h
00001 #ifndef gridripper_phys_scalar_Quartic_h
00002 #define gridripper_phys_scalar_Quartic_h
00003
00004 #include "ScalarPotential.h"
00005 #include <gridripper/lang/IllegalArgumentException.h>
00006
00007 namespace gridripper {
00008
00009 class Parameters;
00010
00011 namespace phys { namespace scalar {
00012
00013 using namespace std;
00014
00022 class Quartic: public ScalarPotential
00023 {
00024 private:
00025 GReal_t massSq;
00026 GReal_t c4;
00027
00028 public:
00034 Quartic(const string& str, const Parameters& p)
00035 throw(IllegalArgumentException&);
00036
00042 Quartic(GReal_t m, GReal_t c4): massSq(m*m), c4(c4) { }
00043
00050 GReal_t eval_V(GReal_t psi, GReal_t T) {
00051 double psisq = psi*psi;
00052 return 0.5*(massSq + 0.5*c4*psisq)*psisq;
00053 }
00054
00061 GReal_t eval_dVdpsi(GReal_t psi, GReal_t T) {
00062 return (massSq + c4*psi*psi)*psi;
00063 }
00064 };
00065
00066 } } }
00067
00068 #endif