66 tangentialSpringUnitTestProblem.
setName(
"TangentialSpringUnitTest");
68 species->setCollisionTimeAndRestitutionCoefficient(1e-3,.2,1./8);
69 species->setSlidingStiffness(species->getStiffness()*2/7);
70 species->setSlidingFrictionCoefficient(1e20);
74 tangentialSpringUnitTestProblem.
setTimeMax(2.5);
75 tangentialSpringUnitTestProblem.
solve(argc,argv);
77 std::vector<BaseParticle*>::iterator pIt = tangentialSpringUnitTestProblem.
particleHandler.
begin();
79 if (!(*pIt)->getPosition().isEqualTo(
Vec3D(0.5,0.5,0.25), 1e-7))
logger(
FATAL,
"First particles is in the wrong position. It is %",(*pIt)->getPosition());
80 if (!(*pIt)->getVelocity().isEqualTo(
Vec3D(0.0,0.0,0.0) , 1e-7))
logger(
FATAL,
"First particle has the wrong velocity");
83 if (!((*pIt)->getPosition().isEqualTo(
Vec3D(0.961524052956078, 0.5, 0.450153103106219), 1e-7)))
logger(
FATAL,
"Second particle has the wrong position. It is % at time %",(*pIt)->getPosition(),tangentialSpringUnitTestProblem.
getTime());
84 if (!(*pIt)->getVelocity().isEqualTo(
Vec3D(0.325869890236916, 0, -0.623251003973752) , 1e-7))
logger(
FATAL,
"Second particle has the wrong velocity. It is %",(*pIt)->getVelocity());
85 if (!(*pIt)->getAngularVelocity().isEqualTo(
Vec3D(0.0,2.11896618998424,0.0) , 1e-7))
logger(
FATAL,
"Second particles has the wrong angular velocity. It is %", (*pIt)->getAngularVelocity());
void solve()
The work horse of the code.
In this file, the rolling behaviour of the tangential spring is tested. This is done by placing one n...
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies > LinearViscoelasticSlidingFrictionSpecies
void setGravity(Vec3D newGravity)
Allows to modify the gravity vector.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
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.
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
LL< Log::FATAL > FATAL
Fatal log level.
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
Implementation of a 3D vector (by Vitaliy).
Mdouble getTime() const
Access function for the time.