00001 /* 00002 ------------------------------------------------------------------- 00003 00004 Copyright (C) 2006, 2007, 2008, 2009, 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_CLASSICAL_H 00024 #define O2SCL_CLASSICAL_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/part.h> 00034 #include <o2scl/fermion.h> 00035 #include <o2scl/boson.h> 00036 00037 #ifndef DOXYGENP 00038 namespace o2scl { 00039 #endif 00040 00041 /** 00042 \brief Classical particle class 00043 00044 \future Write a calc_density_zerot() function for 00045 completeness? 00046 */ 00047 class classical : public part { 00048 00049 public: 00050 00051 /** \brief Create a classical particle with mass \c m 00052 and degeneracy \c g 00053 */ 00054 classical(double m=0.0, double g=0.0); 00055 00056 /** 00057 \brief Calculate properties as function of chemical potential 00058 */ 00059 virtual int calc_mu(const double temper); 00060 00061 /** \brief Calculate properties as function of density 00062 */ 00063 virtual int calc_density(const double temper); 00064 00065 /// Return string denoting type ("classical") 00066 virtual const char *type() { return "classical"; } 00067 00068 #ifndef DOXYGEN_INTERNAL 00069 00070 protected: 00071 00072 friend class io_tlate<classical>; 00073 00074 #endif 00075 00076 }; 00077 00078 template<> int io_tlate<classical>::input 00079 (cinput *co, in_file_format *ins, classical *c); 00080 template<> int io_tlate<classical>::output 00081 (coutput *co, out_file_format *outs, classical *c); 00082 template<> const char *io_tlate<classical>::type(); 00083 00084 typedef io_tlate<classical> classical_io_type; 00085 00086 #ifndef DOXYGENP 00087 } 00088 #endif 00089 00090 #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