00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef O2SCL_EFF_BOSON_H
00024 #define O2SCL_EFF_BOSON_H
00025
00026 #include <string>
00027 #include <iostream>
00028 #include <fstream>
00029 #include <cmath>
00030 #include <o2scl/constants.h>
00031 #include <o2scl/funct.h>
00032 #include <o2scl/mm_funct.h>
00033 #include <o2scl/root.h>
00034 #include <o2scl/mroot.h>
00035 #include <o2scl/inte.h>
00036 #include <o2scl/boson.h>
00037 #include <o2scl/cern_mroot_root.h>
00038 #include <o2scl/gsl_mroot_hybrids.h>
00039
00040 #ifndef DOXYGENP
00041 namespace o2scl {
00042 #endif
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 class eff_boson : public boson {
00060
00061 public:
00062
00063
00064 eff_boson(double m=0.0, double g=0.0);
00065 virtual ~eff_boson();
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 static int loadcoeff(std::string bfile);
00085
00086 virtual int calc_mu(const double temper);
00087 virtual int calc_density(const double temper);
00088 virtual int pair_mu(const double temper);
00089 virtual int pair_density(const double temper);
00090
00091
00092 int set_psi_root(root<void *,funct<void *> > &rp) {
00093 psi_root=&rp;
00094 return 0;
00095 }
00096
00097
00098
00099 int set_density_mroot(mroot<void *,mm_funct<void *> > &rp) {
00100 density_mroot=&rp;
00101 return 0;
00102 }
00103
00104
00105
00106 int set_meth2_root(root<void *,funct<void *> > &rp) {
00107 meth2_root=&rp;
00108 return 0;
00109 }
00110
00111
00112
00113 gsl_mroot_hybrids<void *,mm_funct<void *> > def_density_mroot;
00114
00115
00116
00117 cern_mroot_root<void *,funct<void *> > def_psi_root;
00118
00119
00120
00121 cern_mroot_root<void *,funct<void *> > def_meth2_root;
00122
00123 virtual const char *type() { return "eff_boson"; }
00124
00125 #ifndef DOXYGEN_INTERNAL
00126
00127 friend class io_tlate<eff_boson>;
00128
00129 protected:
00130
00131
00132 static double **Pmnb;
00133
00134 static int sizem;
00135
00136 static int sizen;
00137
00138 static double parma;
00139
00140 static double fix_density;
00141
00142 static double stat_temper;
00143
00144 static bool loaded;
00145
00146
00147 mroot<void *,mm_funct<void *> > *density_mroot;
00148
00149 root<void *,funct<void *> > *psi_root;
00150
00151 root<void *,funct<void *> > *meth2_root;
00152
00153
00154 int solve_fun(double x, double &y, void *&pa);
00155
00156
00157 int density_fun(size_t nv, const ovector_view &x, ovector_view &y,
00158 void *&pa);
00159
00160
00161 int pair_density_fun(size_t nv, const ovector_view &x, ovector_view &y,
00162 void *&pa);
00163
00164 #endif
00165 };
00166
00167 template<> int io_tlate<eff_boson>::input
00168 (cinput *co, in_file_format *ins, eff_boson *b);
00169 template<> int io_tlate<eff_boson>::output
00170 (coutput *co, out_file_format *outs, eff_boson *b);
00171 template<> const char *io_tlate<eff_boson>::type();
00172
00173 typedef io_tlate<eff_boson> eff_boson_io_type;
00174
00175 #ifndef DOXYGENP
00176 }
00177 #endif
00178
00179 #endif