00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, Andrew W. Steiner 00005 00006 This file is part of O2scl. 00007 00008 O2scl is free software; you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation; either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 O2scl is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with O2scl. If not, see <http://www.gnu.org/licenses/>. 00020 00021 ------------------------------------------------------------------- 00022 */ 00023 #ifndef O2SCL_BOSON_H 00024 #define O2SCL_BOSON_H 00025 00026 #include <string> 00027 #include <iostream> 00028 #include <fstream> 00029 #include <math.h> 00030 #include <o2scl/constants.h> 00031 #include <o2scl/mroot.h> 00032 #include <o2scl/inte.h> 00033 #include <o2scl/part.h> 00034 00035 #ifndef DOXYGENP 00036 namespace o2scl { 00037 #endif 00038 00039 /** 00040 \brief Boson class 00041 00042 For bosons: \n 00043 - if either nu or mu is greater than ms, then they are taken to 00044 be equal to ms \n 00045 - All contributions from any type of condensate are ignored. 00046 */ 00047 class boson : virtual public part { 00048 00049 public: 00050 00051 /** 00052 \brief The condensate 00053 00054 The condensate variable is mostly ignored by class boson 00055 and its descendants, and is provided for user storage. 00056 */ 00057 double co; 00058 00059 /// Create a boson with mass \c m and degeneracy \c g 00060 boson(double m=0.0, double g=0.0); 00061 00062 virtual int calc_mu(const double temper); 00063 virtual int calc_density(const double temper); 00064 virtual int pair_mu(const double temper); 00065 virtual int pair_density(const double temper); 00066 00067 /** 00068 \brief Calculate properties of massless bosons 00069 00070 The expressions used are exact. The chemical 00071 potentials are ignored and the scalar density is 00072 set to zero 00073 */ 00074 virtual int massless_calc_mu(const double temper); 00075 00076 /// Return string denoting type ("boson") 00077 virtual const char *type() { return "boson"; } 00078 00079 #ifndef DOXYGEN_INTERNAL 00080 00081 friend class io_tlate<boson>; 00082 00083 #endif 00084 00085 protected: 00086 00087 }; 00088 00089 template<> int io_tlate<boson>::input 00090 (cinput *co, in_file_format *ins, boson *b); 00091 template<> int io_tlate<boson>::output 00092 (coutput *co, out_file_format *outs, boson *b); 00093 template<> const char *io_tlate<boson>::type(); 00094 00095 typedef io_tlate<boson> boson_io_type; 00096 00097 #ifndef DOXYGENP 00098 } 00099 #endif 00100 00101 #endif
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page