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 
)
94 {
96  dpm.setName("AngledPeriodicBoundarySecondUnitTest");
97  dpm.setTimeMax(4.0 * constants::pi);
98  dpm.solve(argc, argv);
99 
101  dpm2.setName("AngledPeriodicBoundarySecondUnitTest2");
102  dpm2.boundaryHandler.clear();
103  dpm2.setTimeMax(4.0 * constants::pi);
104  dpm2.solve(argc, argv);
105 
108  {
109  logger(ERROR, "angular velocity of the two simulations doesn't match");
110  }
111 
112  //Note:: currently the rolling spring is not conserved!!
113  return 0;
114 }
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
Definition: AngledPeriodicBoundarySecondUnitTest.cpp:15
virtual void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0.
Definition: BaseHandler.h:536
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:621
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
Definition: BaseInteractable.cc:319
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
Definition: DPMBase.h:1458
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
const Mdouble pi
Definition: ExtendedMath.h:23
bool isEqual(Mdouble v1, Mdouble v2, Mdouble absError)
Compares the difference of two Mdouble with an absolute error, useful in UnitTests.
Definition: ExtendedMath.cc:230

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