61 if (system(
"./FreeFallRestartUnitTest -name FreeFallRestart0"))
67 if (system(
"./FreeFallRestartUnitTest -tmax 1.05 -name FreeFallRestart1"))
70 if (system(
"./FreeFallRestartUnitTest -r FreeFallRestart1 -tmax 2.1"))
74 logger(
INFO,
"Case 3: restart in the middle, using separate data files");
76 if (system(
"./FreeFallRestartUnitTest -tmax 1.05 -name FreeFallRestart2 -fileTypeData 2"))
79 if (system(
"./FreeFallRestartUnitTest -r FreeFallRestart2 -tmax 2.1"))
93 logger(
INFO,
"Finished running, now comparing");
108 if (!(*p0)->getPosition().isEqualTo((*p1)->getPosition(),1
e-6))
110 logger(
FATAL,
"Particles is not in the same place after restart. Before it was % and now it is %.",
111 (*p0)->getPosition(), (*p1)->getPosition());
113 if (!(*p0)->getPosition().isEqualTo((*p2)->getPosition(),1
e-10))
115 logger(
FATAL,
"Particles velocities are not the same place. Before it was % and now it is %.",
116 (*p0)->getVelocity(), (*p1)->getVelocity());
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void runFreeFall(int argc, char *argv[])
Definition: FreeFallRestartUnitTest.cpp:40
LL< Log::FATAL > FATAL
Definition of the different loglevels by its wrapper class LL. These are used as tags in template met...
Definition: Logger.cc:31
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Vector3f p0
Definition: MatrixBase_all.cpp:2
Vector3f p1
Definition: MatrixBase_all.cpp:2
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
Definition: BaseHandler.h:698
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
Definition: BaseHandler.h:712
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
bool readRestartFile(ReadOptions opt=ReadOptions::ReadAll)
Reads all the particle data corresponding to a given, existing . restart file (for more details regar...
Definition: DPMBase.cc:3043
This code is a example on how to write a restartable mercury code.
Definition: FreeFallRestart.cpp:9
#define INFO(i)
Definition: mumps_solver.h:54