TwoParticleElasticCollisionSelfTest.cpp File Reference

Classes

class  TwoParticleElasticCollision
 In this file two particles are symmetrically placed in a bi-axial box are allowed to jump around under gravity. It tests walls gravity and symmetry. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
72 {
73 
74  TwoParticleElasticCollision twoParticleElasticCollisionProblem;
75  twoParticleElasticCollisionProblem.setName("TwoParticleElasticCollisionSelfTest");
76 
78  species.setDensity(2000);
79  species.setStiffness(1e4);
80  twoParticleElasticCollisionProblem.speciesHandler.copyAndAddObject(species);
81 
82  twoParticleElasticCollisionProblem.setTimeMax(0.25);
83  twoParticleElasticCollisionProblem.setSaveCount(10);
84  twoParticleElasticCollisionProblem.setTimeStep(2e-5);
85  twoParticleElasticCollisionProblem.fStatFile.setFileType(FileType::NO_FILE);
86  twoParticleElasticCollisionProblem.solve();
87 }
@ NO_FILE
file will not be created/read
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
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
File fStatFile
An instance of class File to handle in- and output into a .fstat file.
Definition: DPMBase.h:1483
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
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 setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:215
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
In this file two particles are symmetrically placed in a bi-axial box are allowed to jump around unde...
Definition: TwoParticleElasticCollisionSelfTest.cpp:34

References BaseHandler< T >::copyAndAddObject(), DPMBase::fStatFile, NO_FILE, ParticleSpecies::setDensity(), File::setFileType(), DPMBase::setName(), DPMBase::setSaveCount(), LinearViscoelasticNormalSpecies::setStiffness(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), DPMBase::solve(), and DPMBase::speciesHandler.