50 std::cout <<
"Creating flat-wall box of"
53 " height [" <<
getZMin() <<
", " <<
getZMax() <<
"]." << std::endl;
60 species->setStiffnessAndRestitutionCoefficient(10, 0.1, 1.0);
63 std::cout <<
"time step used "
94 Mdouble rMin = cbrt(0.5 / (s * s + 1.0) / (s + 1.0));
95 std::cout <<
"Inserting a maximum of " << n <<
" particles with "
96 << 2.0*rMin <<
"<d<" << 2.0*s*rMin
97 <<
" (sizeDistribution " << s <<
")" << std::endl;
101 unsigned int failed =0;
127 std::flush(std::cout);
151 int main(
int argc,
char *argv[])
159 SC.
setName(
"ParticleCreationSelfTest");
160 SC.
solve(argc, argv);
void setXMax(Mdouble newXMax)
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMax...
void solve()
The work horse of the code.
bool checkParticleForInteraction(const BaseParticle &P) override
Checks if given BaseParticle has an interaction with a BaseWall or other BaseParticle.
Mdouble X
the vector components
bool hGridNeedsRebuilding()
Gets if the HGrid needs rebuilding before anything else happens.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
LinearViscoelasticSpecies * species
void setYMin(Mdouble newYMin)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin...
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax...
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
Mdouble getMassFromRadius(const Mdouble radius)
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setZMax(Mdouble newZMax)
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax...
void setSpecies(const ParticleSpecies *species)
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
void setYMax(Mdouble newYMax)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax...
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
U * copyAndAddObject(const U &O)
Creates a copy of a Object and adds it to the BaseHandler.
This adds on the hierarchical grid code for 3D problems.
void setXMin(Mdouble newXMin)
If the length of the problem domain in x-direction is XMax - XMin, this method sets XMin...
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
void setDensity(Mdouble density)
Allows the density to be changed.
Mdouble getRadius() const
Returns the particle's radius_.
void setZMin(Mdouble newZMin)
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin...
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
unsigned int getNumberOfObjects() const
Gets the number of Object in this BaseHandler.
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
void hGridRebuild()
This sets up the parameters required for the contact model.
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
RNG random
This is a random generator, often used for setting up the initial conditions etc...
Mdouble sizeDistribution_
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
void set(Vec3D normal, Vec3D point)
Defines a standard wall, given an outward normal vector s.t. normal*x=normal*point for all x of the w...
int main(int argc, char *argv[])
This self test was written to test the speed of particle creation in MercuryDPM.
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
Contains material and contact force properties.
Implementation of a 3D vector (by Vitaliy).
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
Mdouble getRandomNumber(Mdouble min, Mdouble max)
This is a random generating routine can be used for initial positions.
ParticleCreation(Mdouble width, Mdouble length, Mdouble height, Mdouble sizeDistribution)