89 species->setDensity(2000);
90 species->setStiffness(1e1);
91 species->setDissipation(0.0);
92 species->setSlidingFrictionCoefficient(1.0);
93 species->setSlidingStiffness(2.0/7.0*species->getStiffness());
94 species->setSlidingDissipation(2.0/7.0*species->getDissipation());
96 OverlapProblem.
setName(
"ExtremeOverlapUnitTest");
103 OverlapProblem.
solve(argc,argv);
111 Vec3D positionToCompare =
Vec3D(-1.031389999146e-06, 0.009506389407855, 0);
112 if (!position.
isEqualTo(positionToCompare, 1
e-7))
113 logger(
FATAL,
"Large particle is in the wrong position. It is at % and should be %",position,positionToCompare);
115 std::cout <<
"Test passed" << std::endl;
117 positionToCompare =
Vec3D(0.01010314899993, 0.01487096023445, 0);
118 if (!position.
isEqualTo(positionToCompare, 1
e-7))
119 logger(
FATAL,
"Small particle is in the wrong position. It is at % and should be %",position,positionToCompare);
121 std::cout <<
"Test passed" << std::endl;
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
Species< LinearViscoelasticNormalSpecies, SlidingFrictionSpecies > LinearViscoelasticSlidingFrictionSpecies
Definition: LinearViscoelasticSlidingFrictionSpecies.h:12
LL< Log::FATAL > FATAL
Definition of the different loglevels by its wrapper class LL. These are used as tags in template met...
Definition: Logger.cc:31
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
std::enable_if<!std::is_pointer< U >::value, U * >::type copyAndAddObject(const U &object)
Creates a copy of a Object and adds it to the BaseHandler.
Definition: BaseHandler.h:360
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:621
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:197
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1433
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
void setDimension(unsigned int newDim)
Sets both the system dimensions and the particle dimensionality.
Definition: DPMBase.cc:1394
File dataFile
An instance of class File to handle in- and output into a .data file.
Definition: DPMBase.h:1484
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:437
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1443
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
Makes sure that the behavior is still sensible if the overlap of two particles grows extremely large.
Definition: ExtremeOverlapUnitTest.cpp:24
void setFileType(FileType fileType)
Sets the type of file needed to write into or read from. File::fileType_.
Definition: File.cc:193
Definition: Kernel/Math/Vector.h:30
bool isEqualTo(const Vec3D &other, double tol) const
Checks if the length this Vec3D is equal the length of other with a certain tolerance.
Definition: Vector.cc:313