//**************************************************************************** //! \file Tsimmain.hpp //! \date 24-11-2003 //! \class Tsimmain //! \brief The main class of the simulation //***************************************************************************** // This file is part of pinpot. // // pinpot 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. // // pinpot 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 pinpot; 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 #include #include #include #include #include #include using namespace std; //***************************************************************************** class Tsimmain //----------------------------------------------------------------------------- //! This is the main class of the Simulation encapsulating everything necessary to do //! the job //***************************************************************************** { // the Lapack parameters int *itype; char *jobz; char *uplo; double *work; int *lwork; int *info; int N;//!< Dimension of the problem std::vector ofiles;//!< the output streams std::vector::iterator ofit;//!< the iterator to ofiles double **S;//!< the S matrix (the Overlapp Matrix) double **H;//!< the H matrix (the Hamiltonian) (and afterwards the C Matrix (Eigenvectors)) double *E;//!< the E matrix (the Eigenvalues (Energy)) double h;//!< a helper variable (always comes in handy) bool first;//!< first try //! \brief function Initializing everythin necessary void InitMatrices(); //! \brief calculates the S matrix for the given N void makeS(); //! \brief calculates the H matrix for the given N void makeH(); //! \brief convert c matrix to fortran stuff double *ctof( double **in, int rows, int cols); //! \brief convert fortran matrix to c stuff void ftoc( double *in, double **out, int rows, int cols); //! \brief normalize the Eigenvectors void normalize( double **matrix); //! \brief calculates the base functions //! \param x the parameter of the base function //! \para, alphaorder of the base function inline const double chi( const double x, const int alpha) const; public: //! \brief Constructor Tsimmain(); //! \brief Destructor ~Tsimmain(); //! \brief function Initializing everythin necessary //! \param inN the dimension void Init( const int inN = 6); //! \brief this is the function doing the real work bool Execute(); }; #endif