166 MD_problem.
omega = 40;
167 MD_problem.
alpha = -2;
172 MD_problem.
setName(
"HGridUnitTest_MD");
179 HGrid_problem1.setHGridMethod(
TOPDOWN);
180 HGrid_problem1.setHGridMaxLevels(3);
182 HGrid_problem1.setName(
"HGridUnitTest_HGrid1");
185 HGrid_problem2.setHGridMethod(
BOTTOMUP);
186 HGrid_problem2.setHGridMaxLevels(8);
187 HGrid_problem2.setHGridDistribution(
LINEAR);
188 HGrid_problem2.setName(
"HGridUnitTest_HGrid2");
192 logger(
INFO,
"Solving the first HGrid problem");
193 HGrid_problem1.solve();
194 logger(
INFO,
"Solving the second HGrid problem");
195 HGrid_problem2.solve();
198 const double tolerance = 1e-10;
199 std::vector<BaseParticle*>::iterator hGrid1It = HGrid_problem1.particleHandler.begin();
200 std::vector<BaseParticle*>::iterator hGrid2It = HGrid_problem2.particleHandler.begin();
205 logger(
ERROR,
"position of particle in hGrid 1 is not equal to the position without hGrid");
209 logger(
ERROR,
"position of particle in hGrid 2 is not equal to the position without hGrid");
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
@ EXPONENTIAL
Definition: MercuryBase.h:85
@ LINEAR
Definition: MercuryBase.h:85
@ BOTTOMUP
Definition: MercuryBase.h:45
@ TOPDOWN
Definition: MercuryBase.h:45
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
Definition: BaseParticle.h:54
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1448
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1417
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Definition: HGridUnitTest.cpp:153
Definition: HGridUnitTest.cpp:31
unsigned int N
Definition: HGridUnitTest.cpp:148
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: HGridUnitTest.cpp:40
double alpha
Definition: HGridUnitTest.cpp:146
LinearViscoelasticSpecies * species
Definition: HGridUnitTest.cpp:149
double omega
Definition: HGridUnitTest.cpp:145
double nu
Definition: HGridUnitTest.cpp:147
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
bool isEqualTo(const Vec3D &other, double tol) const
Checks if the length this Vec3D is equal the length of other with a certain tolerance.
Definition: Vector.cc:294