FreeFallSelfTest.cpp File Reference

Classes

class  FreeFallSelfTest
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
61 {
62  logger(INFO, "Single particle bouncing vertically on the bottom plate");
63  // Make the problem and set the name
64  FreeFallSelfTest freeFallSelfTestProblem;
65  freeFallSelfTestProblem.setName("FreeFallSelfTest");
66 
67  //Set the species of the particle and wall, and its properties
69  species.setDensity(2000.0);
70  freeFallSelfTestProblem.setParticleDimensions(3);
71  species.setStiffness(8000000.0);
72  freeFallSelfTestProblem.speciesHandler.copyAndAddObject(species);
73 
74  //set the parameters for the solver
75  freeFallSelfTestProblem.setSaveCount(500);
76  freeFallSelfTestProblem.fStatFile.setFileType(FileType::NO_FILE);
77  freeFallSelfTestProblem.wallHandler.setWriteVTK(FileType::ONE_FILE);
78  freeFallSelfTestProblem.setTimeStep(1e-6);
79 
80  //solve the system, the single particle will now bounce on the plate
81  freeFallSelfTestProblem.solve(argc, argv);
82 }
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
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 setParticleDimensions(unsigned int particleDimensions)
Sets the particle dimensionality.
Definition: DPMBase.cc:1448
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Definition: DPMBase.h:1447
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
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
Definition: FreeFallSelfTest.cpp:36
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
void setWriteVTK(FileType)
Sets whether walls are written into a VTK file.
Definition: WallHandler.cc:467

References BaseHandler< T >::copyAndAddObject(), DPMBase::fStatFile, INFO, logger, NO_FILE, ONE_FILE, ParticleSpecies::setDensity(), File::setFileType(), DPMBase::setName(), DPMBase::setParticleDimensions(), DPMBase::setSaveCount(), LinearViscoelasticNormalSpecies::setStiffness(), DPMBase::setTimeStep(), WallHandler::setWriteVTK(), DPMBase::solve(), DPMBase::speciesHandler, and DPMBase::wallHandler.