//**************************************************************************** //! \file tsimmain.hpp //! \date 15-11-2004 //! \class TSimMain //! \brief The Main class of the Simulation //***************************************************************************** // This file is part of gibbsens. // // gibbsens is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // gibbsens is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with gibbsens; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //***************************************************************************** #ifndef TSIMMAIN_HPP #define TSIMMAIN_HPP #include "tsimbox.hpp" #include #include #include #include #include #include //! Builtin parameters if no param file is given const int rN=64;//!< Builtin total number of Particles const double rV=109.75;//!< Builtin total Volume 2*L^3 const double rT=1.;//!< Builtin Temperature const bool rsave=true;//!< Builtin save parameter const int rndis=8; //!< Builtin average number of particle displacements const int rnvole=1; //!< Builtin average number of volume exchanges const int rnpe=1; //!< Builtin average number of particle exchanges const int routstep=1000; //!< Builtin output step const int rpcfstep=100; //!< Builtin PCF step const int radjstep=100; //!< Builtin stepsize adjustment interval const int rmaxstep=1000000; //!< Builtin maximum number of steps to do const bool rrestart=false;//!< Builtin restart parameter const bool radjuststeps=true;//!< Builtin adjust parameter class TSimMain { TSimBox *Box1;//!< One of the Simulation Boxes TSimBox *Box2;//!< The other one of the Simulation Boxes gsl_rng *gslrand1; //!< the gsl random number generator double T;//!< the Temperature in units of kB double Vtot;//!< total Volume of both boxes int Ntot;//!< the total number of Particles = 2* 4*n^3 bool save;//!< if we should save the stuff whenever possible int outstep; //!< output step int pcfstep; //!< PCF step int adjstep; //!< adjustment interval int maxstep; //!< maximum number of steps to do bool restart;//!< restart parameter bool adjuststeps;//!< adjust parameter //! Simulation parameters int ndis; //!< average number of particle displacements int nvole; //!< average number of volume exchanges int npe; //!< average number of particle exchanges //! \brief load parameters for the simulation //! \param fname name of the file to load from void loadParams( std::string fname); public: //! \brief standard constructor TSimMain(); //! \brief standard destructor ~TSimMain(); //! \brief Initialize everything important //! \param argc number of arguments //! \param argv the aruments void Init( int argc, char ** argv); // \brief do the work int Execute(); }; #endif //TSIMMAIN_HPP