config.h
00001 #ifndef CONFIG_H
00002 #define CONFIG_H
00003 
00004 #include "wavefunction/wavefunction.h"
00005 #include "hamiltonian/hamiltonian.h"
00006 #include "montecarlo/montecarlo.h"
00007 
00008 #include <iostream>
00009 
00010 
00011 class INIParser;
00012 using namespace std;
00013 
00017 class Config
00018 {
00019 public:
00020     Config(int myRank, int m_nProcesses);
00021     int myRank() {
00022         return m_rank;
00023     }
00024     int m_nProcesses() const  {
00025         return m_m_nProcesses;
00026     }
00027     int nDimensions() const {
00028         return m_nDimensions;
00029     }
00030     void setNDimensions(int n) {
00031         m_nDimensions = n;
00032     }
00033 
00034     int nParticles() const {
00035         return m_nParticles;
00036     }
00037 
00038     void setNParticles(int n) {
00039         m_nParticles = n;
00040     }
00041 
00042     WaveFunction* wave() const
00043     {
00044         return m_wave;
00045     }
00046 
00047     Hamiltonian* hamiltonian() const
00048     {
00049         return m_hamiltonian;
00050     }
00051 
00052     MonteCarlo* monteCarlo() const
00053     {
00054         return m_monteCarlo;
00055     }
00056 
00057     double stepLength() const
00058     {
00059         return m_stepLength;
00060     }
00061 
00062     void setStepLength(double arg) {
00063         m_stepLength = arg;
00064     }
00065 
00066     void loadConfiguration(INIParser *settings);
00067 
00068     void setWave(WaveFunction* arg)
00069     {
00070         m_wave = arg;
00071     }
00072 
00073     void setHamiltonian(Hamiltonian* arg)
00074     {
00075         m_hamiltonian = arg;
00076     }
00077 
00078     void setMonteCarlo(MonteCarlo* arg)
00079     {
00080         m_monteCarlo = arg;
00081     }
00082 
00083     double omega() const
00084     {
00085         return m_omega;
00086     }
00087 
00088     void setOmega(double arg)
00089     {
00090         m_omega = arg;
00091     }
00092 
00093     void setDiffusionConstant(double arg) {
00094         m_diffusionConstant = arg;
00095     }
00096 
00097     double diffusionConstant() {
00098         return m_diffusionConstant;
00099     }
00100 
00101     bool interactionEnabled() const
00102     {
00103         return m_interactionEnabled;
00104     }
00105 
00106     void setInteractionEnabled(bool arg)
00107     {
00108         m_interactionEnabled = arg;
00109     }
00110 
00111     long *idum() {
00112         return &m_idum;
00113     }
00114 
00115 private:
00116     int m_rank;
00117     int m_m_nProcesses;
00118     int m_nParticles;
00119     int m_nDimensions;
00120     double m_stepLength;
00121     MonteCarlo* m_monteCarlo;
00122     WaveFunction* m_wave;
00123     Hamiltonian* m_hamiltonian;
00124     string m_monteCarloClass;
00125     double m_omega;
00126     bool m_interactionEnabled;
00127     long m_idum;
00128     double m_diffusionConstant;
00129 };
00130 
00131 #endif // CONFIG_H
 All Classes Functions