168 MD_problem.
omega = 40;
169 MD_problem.
alpha = -2;
174 MD_problem.
setName(
"HGridUnitTest_MD");
181 HGrid_problem1.setHGridMethod(
TOPDOWN);
182 HGrid_problem1.setHGridMaxLevels(3);
184 HGrid_problem1.setName(
"HGridUnitTest_HGrid1");
187 HGrid_problem2.setHGridMethod(
BOTTOMUP);
188 HGrid_problem2.setHGridMaxLevels(8);
189 HGrid_problem2.setHGridDistribution(
LINEAR);
190 HGrid_problem2.setName(
"HGridUnitTest_HGrid2");
192 std::cout <<
"Solving the MD problem" << std::endl;
194 std::cout <<
"Solving the first HGrid problem" << std::endl;
195 HGrid_problem1.solve();
196 std::cout <<
"Solving the second HGrid problem" << std::endl;
197 HGrid_problem2.solve();
200 std::vector<BaseParticle*>::iterator hGrid1It = HGrid_problem1.particleHandler.begin();
201 std::vector<BaseParticle*>::iterator hGrid2It = HGrid_problem2.particleHandler.begin();
204 if (!(*mdIt)->getPosition().isEqualTo((*hGrid1It)->getPosition(),1e-10))
208 if (!(*mdIt)->getPosition().isEqualTo((*hGrid2It)->getPosition(), 1e-10))
void solve()
The work horse of the code.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
void setParticleDimensions(unsigned int particleDimensions)
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres...
void setSystemDimensions(unsigned int newDim)
Allows for the dimension of the simulation to be changed.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setDensity(Mdouble density)
Allows the density to be changed.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
LinearViscoelasticSpecies * species