110 species->setDensity(2000);
111 species->setStiffness(1e5);
112 species->setDissipation(1e-2);
113 OverlapProblem.
setName(
"ExtremeOverlapWithWallsUnitTest");
121 OverlapProblem.
solve(argc,argv);
124 Vec3D positionToCompare =
Vec3D(0, -0.0004900098000491, 0.004008957617341);
125 if (!position.
isEqualTo(positionToCompare, 1e-10))
126 logger(
FATAL,
"Large particle is in the wrong position. It is at % and should be %",position,positionToCompare);
128 std::cout <<
"Test passed" << std::endl;
130 positionToCompare =
Vec3D(0, -0.0004900098000491, 0.009004578797915);
132 if (!position.
isEqualTo(positionToCompare, 1e-10))
133 logger(
FATAL,
"Large particle is in the wrong position. It is at % and should be %",position,positionToCompare);
135 std::cout <<
"Test passed" << std::endl;
void solve()
The work horse of the code.
void setTimeMax(Mdouble newTMax)
Allows the upper time limit to be changed.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
void setDimension(unsigned int newDim)
Sets the system and particle dimension.
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
bool isEqualTo(const Vec3D &other, const double tol) const
Checks if the length this Vec3D is equal the length of other with a certain tolerance.
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
file will not be created/read
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...
all data will be written into/ read from a single file called name_
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
LL< Log::FATAL > FATAL
Fatal log level.
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
File dataFile
An instance of class File to handle in- and output into a .data file.
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. elastic, linear visco-elastic... et cetera...
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
void setTimeStep(Mdouble newDt)
Allows the time step dt to be changed.
Implementation of a 3D vector (by Vitaliy).
Compresses 2 particles (vertically) until they have an extreme overlap.