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_REL_FERMION_H
00024 #define O2SCL_REL_FERMION_H
00025
00026 #include <string>
00027 #include <iostream>
00028 #include <fstream>
00029 #include <cmath>
00030 #include <o2scl/constants.h>
00031 #include <o2scl/mroot.h>
00032 #include <o2scl/inte.h>
00033 #include <o2scl/fermion.h>
00034 #include <o2scl/cern_mroot_root.h>
00035 #include <o2scl/gsl_inte_qagiu.h>
00036 #include <o2scl/gsl_inte_qag.h>
00037
00038 #ifndef DOXYGENP
00039 namespace o2scl {
00040 #endif
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 class rel_fermion : public fermion {
00069
00070 public:
00071
00072
00073 double deg_limit;
00074
00075
00076 fermion unc;
00077
00078
00079
00080
00081 bool guess_from_nu;
00082
00083
00084 rel_fermion(double m=0.0, double g=0.0);
00085 virtual ~rel_fermion();
00086
00087
00088
00089
00090 virtual int calc_mu(const double temper);
00091
00092
00093
00094 virtual int calc_density(const double temper);
00095
00096
00097
00098
00099 virtual int pair_mu(const double temper);
00100
00101
00102
00103
00104 virtual int pair_density(const double temper);
00105
00106
00107 virtual int nu_from_n(const double temper);
00108
00109
00110 int set_inte(inte<void *,funct<void *> > &non_it,
00111 inte<void *,funct<void *> > °_it);
00112
00113
00114
00115 int set_density_root(root<void *,funct<void *> > &rp) {
00116 density_root=&rp;
00117 return 0;
00118 }
00119
00120
00121 cern_mroot_root<void *,funct<void *> > def_density_root;
00122
00123
00124 gsl_inte_qag<void *,funct<void *> > def_dit;
00125
00126
00127 gsl_inte_qagiu<void *,funct<void *> > def_nit;
00128
00129
00130 virtual const char *type() { return "rel_fermion"; }
00131
00132 protected:
00133
00134 #ifndef DOXYGEN_INTERNAL
00135
00136 friend class io_tlate<rel_fermion>;
00137
00138
00139 inte<void *,funct<void *> > *nit;
00140
00141 inte<void *,funct<void *> > *dit;
00142
00143 root<void *,funct<void *> > *density_root;
00144
00145
00146 double density_fun(double u, void *&pa);
00147
00148
00149 double energy_fun(double u, void *&pa);
00150
00151
00152 double entropy_fun(double u, void *&pa);
00153
00154
00155 double deg_density_fun(double u, void *&pa);
00156
00157
00158 double deg_energy_fun(double u, void *&pa);
00159
00160
00161 double deg_entropy_fun(double u, void *&pa);
00162
00163
00164 int solve_fun(double x, double &yy, void *&pa);
00165 int pair_fun(double x, double &yy, void *&pa);
00166
00167 #endif
00168
00169 };
00170
00171 template<> int io_tlate<rel_fermion>::input
00172 (cinput *co, in_file_format *ins, rel_fermion *f);
00173 template<> int io_tlate<rel_fermion>::output
00174 (coutput *co, out_file_format *outs, rel_fermion *f);
00175 template<> const char *io_tlate<rel_fermion>::type();
00176 template<> int io_tlate<rel_fermion>::stat_input
00177 (cinput *co, in_file_format *ins, rel_fermion *f);
00178 template<> int io_tlate<rel_fermion>::stat_output
00179 (coutput *co, out_file_format *outs, rel_fermion *f);
00180
00181 typedef io_tlate<rel_fermion> rel_fermion_io_type;
00182
00183 #ifndef DOXYGENP
00184 }
00185 #endif
00186
00187 #endif