47 species.setStiffness(1e2);
48 species.setAdhesionStiffness(1e2);
50 species.setAdhesionForceMax(1e-1 * species.getAdhesionStiffness());
51 species.setRollingFrictionCoefficient(1e20);
52 species.setRollingStiffness(1.0);
59 Vec3D normal_left(s, -c, 0.0);
60 Vec3D normal_right(0.0, -1.0, 0.0);
61 Vec3D origin(0.0, 0.0, 0.0);
62 b.set(normal_left, normal_right, origin);
99 Mdouble c = (2.0 * R * R - d * d) / (2.0 * R * R);
120 dpm.
setName(
"AngledPeriodicBoundarySecondUnitTest");
122 dpm.
solve(argc, argv);
125 dpm2.
setName(
"AngledPeriodicBoundarySecondUnitTest2");
128 dpm2.
solve(argc, argv);
133 logger(
ERROR,
"angular velocity of the two simulations doesn't match");
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.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
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 setZMax(Mdouble newZMax)
If the length of the problem domain in z-direction is XMax - XMin, this method sets ZMax...
virtual const Vec3D & getAngularVelocity() const
Returns the angular velocity of this interactable.
void setSpecies(const ParticleSpecies *species)
LL< Log::ERROR > ERROR
Error log level.
void setRadius(const Mdouble radius)
Sets the particle's radius_ (and adjusts the mass_ accordingly, based on the particle's species) ...
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
int main(int argc UNUSED, char *argv[] UNUSED)
void computeExternalForces(BaseParticle *p)
Computes the external forces acting on particles (e.g. gravitational)
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.
Mdouble getMass() const
Returns the particle's mass_.
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...
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
void setDensity(Mdouble density)
Allows the density to be changed.
void setZMin(Mdouble newZMin)
If the length of the problem domain in z-direction is ZMax - ZMin, this method sets ZMin...
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
bool isEqual(Mdouble v1, Mdouble v2, double absError)
Compares the difference of two Mdouble with an absolute error, useful in UnitTests.
void setPosition(const Vec3D &position)
Sets the position of this BaseInteractable.
Mdouble getLength() const
Calculates the length of this Vec3D: .
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
Contains material and contact force properties.
virtual void computeForcesDueToWalls(BaseParticle *PI)
Computes the forces on the particles due to the walls (normals are outward normals) ...
Implementation of a 3D vector (by Vitaliy).
void addForce(Vec3D addForce)
Adds an amount to the force on this BaseInteractable.
bool isFixed() const
Is fixed Particle function. It returns whether a Particle is fixed or not, by checking its inverse Ma...
void setAngularVelocity(const Vec3D &angularVelocity)
set the angular velocity of the BaseInteractble.
AngledPeriodicBoundarySecondUnitTest()
void clear()
Empties the whole BaseHandler by removing all Objects and setting all other variables to 0...