36 logger(
INFO,
" Simulates a particle-wall collision.\n"
38 " - at one instant in time\n"
39 " - standard fields (density and stress)\n"
40 " - for O, Z, and XYZ coordinates\n"
41 " - for both Gauss and Lucy kernel functions\n");
44 dpm.
setName(
"CGParticleWallUnitTest");
57 Z->setMin({-1,-1,0.95});
58 Z->setMax({1,1,0.95});
62 G->setMin({-1,-1,0.95});
63 G->setMax({1,1,0.95});
67 C->setMin({-1,-1,0.25});
68 C->setMax({1,1,0.25});
72 XYZ->setMin({-0.95,-1,0.95});
73 XYZ->setMax({1.05,1,0.95});
85 Mdouble distance3 = distance+0.5*overlap;
86 logger(
INFO,
"Distance % % % Overlap % Contact % Distance %",distance,distance2,distance3,overlap,contactPoint);
87 helpers::check(
O->getPoint(0).getContactStress().trace(),2e5*overlap*distance2/16,1
e-11,
"Average stress");
93 helpers::check(
C->getPoint(0).getContactStress().trace(),2e5*overlap*distance/distanceZ/4,1
e-11,
"Z-resolved stress at contact point");
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ NO_FILE
file will not be created/read
JacobiRotation< float > G
Definition: Jacobi_makeGivens.cpp:2
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ XYZ
Definition: StatisticsVector.h:21
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
const Vec3D & getContactPoint() const
Gets constant reference to contact point (vector).
Definition: BaseInteraction.h:213
Mdouble getDistance() const
Returns an Mdouble which is the norm (length) of distance vector.
Definition: BaseInteraction.cc:520
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:219
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:55
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 setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:437
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1479
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1473
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
Definition: CGParticleWallUnitTest.cpp:12
Definition: Kernel/Math/Vector.h:30
static Mdouble getDistance(const Vec3D &a, const Vec3D &b)
Calculates the distance between two Vec3D: .
Definition: Vector.cc:155
Mdouble Z
Definition: Kernel/Math/Vector.h:45
Definition: matrices.h:74
#define Z
Definition: icosphere.cpp:21
#define INFO(i)
Definition: mumps_solver.h:54
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:16