Takes an oblique collision of elastic superellipsoids and checks whether the collision
42 problem.
setName(
"ElasticSuperQuadricUnitTest");
84 "Conservation of momentum");
86 "Con. of angular momentum");
87 helpers::check(kineticEnergy0-kineticEnergy1,0,1e-4*kineticEnergy0,
88 "Con. of kinetic energy ");
const unsigned NEVER
Definition: File.h:35
@ NO_FILE
file will not be created/read
double Mdouble
Definition: GeneralDefine.h:34
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:33
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:379
virtual const Vec3D & getVelocity() const
Returns the velocity of this interactable.
Definition: BaseInteractable.cc:329
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
Definition: BaseInteractable.cc:350
virtual void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Definition: BaseInteractable.h:239
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
void setSpecies(const ParticleSpecies *species)
Definition: BaseParticle.cc:818
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1098
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1478
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:459
void setSuperquadricParticlesWriteVTK(bool writeSuperquadricParticlesVTK)
Definition: DPMBase.cc:956
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 solve()
The work horse of the code.
Definition: DPMBase.cc:4270
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_.
Definition: File.cc:273
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:37
Mdouble getRotationalEnergy() const
Definition: ParticleHandler.cc:586
Vec3D getMomentum() const
Definition: ParticleHandler.cc:666
Vec3D getAngularMomentum() const
Definition: ParticleHandler.cc:675
Mdouble getKineticEnergy() const
Definition: ParticleHandler.cc:557
Definition: SuperQuadricParticle.h:57
void setExponents(const Mdouble &eps1, const Mdouble &eps2) override
Set the exponents to eps1 and eps2 for this superquadric. We use the super-ellipsoid definition state...
Definition: SuperQuadricParticle.cc:169
void setAxes(const Mdouble &a1, const Mdouble &a2, const Mdouble &a3)
Set the axes-lengths to a1, a2 and a3 for this superquadric. We use the super-ellipsoid definition st...
Definition: SuperQuadricParticle.cc:164
static Mdouble getLength(const Vec3D &a)
Calculates the length of a Vec3D: .
Definition: Vector.cc:331
const Mdouble pi
Definition: ExtendedMath.h:45
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:37