145 MD_problem.
omega = 40;
146 MD_problem.
alpha = -2;
151 MD_problem.
setName(
"HGridUnitTest_MD");
158 HGrid_problem1.setHGridMethod(
TOPDOWN);
159 HGrid_problem1.setHGridMaxLevels(3);
161 HGrid_problem1.setName(
"HGridUnitTest_HGrid1");
164 HGrid_problem2.setHGridMethod(
BOTTOMUP);
165 HGrid_problem2.setHGridMaxLevels(8);
166 HGrid_problem2.setHGridDistribution(
LINEAR);
167 HGrid_problem2.setName(
"HGridUnitTest_HGrid2");
171 logger(
INFO,
"Solving the first HGrid problem");
172 HGrid_problem1.solve();
173 logger(
INFO,
"Solving the second HGrid problem");
174 HGrid_problem2.solve();
177 const double tolerance = 1
e-10;
178 std::vector<BaseParticle*>::iterator hGrid1It = HGrid_problem1.particleHandler.begin();
179 std::vector<BaseParticle*>::iterator hGrid2It = HGrid_problem2.particleHandler.begin();
184 logger(
ERROR,
"position of particle in hGrid 1 is not equal to the position without hGrid");
188 logger(
ERROR,
"position of particle in hGrid 2 is not equal to the position without hGrid");
Array< double, 1, 3 > e(1./3., 0.5, 2.)
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:32
@ EXPONENTIAL
Definition: MercuryBase.h:64
@ LINEAR
Definition: MercuryBase.h:64
@ BOTTOMUP
Definition: MercuryBase.h:24
@ TOPDOWN
Definition: MercuryBase.h:24
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:197
Definition: BaseParticle.h:33
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
void setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1439
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void setSystemDimensions(unsigned int newDim)
Sets the system dimensionality.
Definition: DPMBase.cc:1408
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
Definition: HGridUnitTest.cpp:132
Definition: HGridUnitTest.cpp:10
unsigned int N
Definition: HGridUnitTest.cpp:127
void setupInitialConditions() override
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Definition: HGridUnitTest.cpp:19
double alpha
Definition: HGridUnitTest.cpp:125
LinearViscoelasticSpecies * species
Definition: HGridUnitTest.cpp:128
double omega
Definition: HGridUnitTest.cpp:124
double nu
Definition: HGridUnitTest.cpp:126
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
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:313
#define INFO(i)
Definition: mumps_solver.h:54