45 std::cout <<
"t=" << std::setprecision(3) << std::left << std::setw(6) <<
getTime() <<
", tmax=" << std::setprecision(3) << std::left << std::setw(6) <<
getTimeMax() <<std::endl;
53 species->setStiffness(1e5);
54 species->setDissipation(10);
72 cubeInsertionBoundary.
set(particleToCopy, 500,
Vec3D(radMax, radMax, 0),
Vec3D(1.0 - radMax,
getYMax() - radMax, 0.0),
Vec3D(0.0, 0.0, 0.0),
Vec3D(0.0, 0.0, 0.0), radMin, radMax);
74 delete particleToCopy;
81 b0->set(
Vec3D(1.0, 0.0, 0.0), 0.0, 1.0);
84 b0->addParticleToMaser(*it);
89 write(std::cout,
false);
97 maserSelfTest.
solve();
virtual void checkBoundaryBeforeTimeStep(DPMBase *md)
Fills the boundary with particles.
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.
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...
const std::vector< T * >::const_iterator end() const
Gets the end of the const_iterator over all BaseBoundary in this BaseHandler.
void setSpecies(const ParticleSpecies *species)
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
void set(BaseParticle *particleToCopy, int maxFailed, Vec3D posMin, Vec3D posMax, Vec3D velMin, Vec3D velMax, double radMin, double radMax)
Sets the properties of the cuboidal insertion boundary.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
void setYMax(Mdouble newYMax)
If the length of the problem domain in y-direction is YMax - YMin, this method sets YMax...
void printTime() const
Displays the current simulation time onto your screen for example.
void write(std::ostream &os, bool writeAllParticles=true) const override
Writes the MercuryBase to an output stream, for example a restart file.
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
It's an insertion boundary which has cuboidal shape (yes, 'CuboidalInsertionBoundary' would have been...
U * copyAndAddObject(const U &O)
Creates a copy of a Object and adds it to the BaseHandler.
BoundaryHandler boundaryHandler
An object of the class BoundaryHandler which concerns insertion and deletion of particles into or fro...
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 setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void setupInitialConditions()
This function allows to set the initial conditions for our problem to be solved, by default particle ...
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
WallHandler wallHandler
An object of the class WallHandler. Contains pointers to all the walls created.
Variation on the PeriodicBoundary with maser-like properties.
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...
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
This is a class defining walls.
Implementation of a 3D vector (by Vitaliy).
int main(int argc UNUSED, char *argv[] UNUSED)
Mdouble getTime() const
Access function for the time.
Mdouble getTimeMax() const
Allows the user to access the total simulation time during the simulation. Cannot change it though...
This adds on the hierarchical grid code for 2D problems.