AngledPeriodicBoundarySecondUnitTest.cpp File Reference

Classes

class  AngledPeriodicBoundarySecondUnitTest
 

Functions

int main (int argc UNUSED, char *argv[] UNUSED)
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
115 {
117  dpm.setName("AngledPeriodicBoundarySecondUnitTest");
118  dpm.setTimeMax(4.0 * constants::pi);
119  dpm.solve(argc, argv);
120 
122  dpm2.setName("AngledPeriodicBoundarySecondUnitTest2");
123  dpm2.boundaryHandler.clear();
124  dpm2.setTimeMax(4.0 * constants::pi);
125  dpm2.solve(argc, argv);
126 
128  dpm2.particleHandler.getObject(0)->getAngularVelocity(), 1e-10))
129  {
130  logger(ERROR, "angular velocity of the two simulations doesn't match");
131  }
132 
133  //Note:: currently the rolling spring is not conserved!!
134  return 0;
135 }
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
Definition: AngledPeriodicBoundarySecondUnitTest.cpp:36
virtual void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: BaseHandler.h:528
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:341
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1452
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
const Mdouble pi
Definition: ExtendedMath.h:45
bool isEqual(Mdouble v1, Mdouble v2, Mdouble absError)
Compares the difference of two Mdouble with an absolute error, useful in UnitTests.
Definition: ExtendedMath.cc:251

References DPMBase::boundaryHandler, BaseHandler< T >::clear(), ERROR, BaseInteractable::getAngularVelocity(), BaseHandler< T >::getObject(), mathsFunc::isEqual(), logger, DPMBase::particleHandler, constants::pi, DPMBase::setName(), DPMBase::setTimeMax(), and DPMBase::solve().