43 std::cout <<
"Creating a cubic packing of " <<
N <<
"^3 particles" << std::endl;
79 problem.
setName(
"NewtonsCradleSelfTest");
84 species->setDensity(6./
constants::pi/8*(2*problem.
N+.5)*1.05*1.05);
86 species->setCollisionTimeAndRestitutionCoefficient(.01,.1,1.);
90 std::cout <<
"Relax the packing" << std::endl;
93 std::cout <<
"Get statistics" << std::endl;
96 str[1]=
"HeavisideSphere";
108 std::cout << stats1.
getName() +
"_" + str[i] +
"T_XYZ.stat" << std::endl;
110 stats1.
set_h(0.0005);
118 for (
int i=0; i<3; i++) {
121 if (i==2) w*=2*sqrt(3);
void setYMaxStat(Mdouble ymaxStat_)
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.
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
void setVelocity(const Vec3D &velocity)
set the velocity of the BaseInteractable.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
void setYMin(Mdouble newYMin)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMin...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
void setXMaxStat(Mdouble xmaxStat_)
void setXMinStat(Mdouble xminStat_)
void setParticleDimensions(unsigned int particleDimensions)
Allows the dimension of the particle (f.e. for mass) to be changed. e.g. discs or spheres...
void setZMax(Mdouble newZMax)
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax...
void setCGShape(const char *new_)
void setSystemDimensions(unsigned int newDim)
Allows for the dimension of the simulation to be changed.
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
void setCGTimeMin(Mdouble t)
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.
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 statistics_from_fstat_and_data()
get StatisticsPoint
void setTimeMaxStat(Mdouble t)
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
void setYMinStat(Mdouble yminStat_)
void setZMin(Mdouble newZMin)
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin...
void setSuperExact(bool new_)
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void setCGWidth(Mdouble w)
Set CG variables w2 and CG_invvolume.
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
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...
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
This class is used to extract statistical data from MD simulations.
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
void setZMinStat(Mdouble zminStat_)
Implementation of a 3D vector (by Vitaliy).
void setName(const std::string &name)
Sets the file name, e.g. "Name.data".
File statFile
An instance of class File to handle in- and output into a .stat file.
int main(int argc UNUSED, char *argv[] UNUSED)
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Mdouble getTimeMax() const
Allows the user to access the total simulation time during the simulation. Cannot change it though...
void setZMaxStat(Mdouble zmaxStat_)