57 logger(
INFO,
" Simulates a particle-wall collision.\n"
59 " - at one instant in time\n"
60 " - standard fields (density and stress)\n"
61 " - for O, Z, and XYZ coordinates\n"
62 " - for both Gauss and Lucy kernel functions\n");
65 dpm.
setName(
"CGParticleWallUnitTest");
78 Z->setMin({-1,-1,0.95});
79 Z->setMax({1,1,0.95});
83 G->setMin({-1,-1,0.95});
84 G->setMax({1,1,0.95});
88 C->setMin({-1,-1,0.25});
89 C->setMax({1,1,0.25});
93 XYZ->setMin({-0.95,-1,0.95});
94 XYZ->setMax({1.05,1,0.95});
106 Mdouble distance3 = distance+0.5*overlap;
107 logger(
INFO,
"Distance % % % Overlap % Contact % Distance %",distance,distance2,distance3,overlap,contactPoint);
108 helpers::check(
O->getPoint(0).getContactStress().trace(),2e5*overlap*distance2/16,1e-11,
"Average stress");
114 helpers::check(C->getPoint(0).getContactStress().trace(),2e5*overlap*distance/distanceZ/4,1e-11,
"Z-resolved stress at contact point");
@ NO_FILE
file will not be created/read
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ Z
Definition: StatisticsVector.h:42
@ XYZ
Definition: StatisticsVector.h:42
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:379
T * getObject(const unsigned int id)
Gets a pointer to the Object at the specified index in the BaseHandler.
Definition: BaseHandler.h:613
const Vec3D & getPosition() const
Returns the position of this BaseInteractable.
Definition: BaseInteractable.h:218
const Vec3D & getContactPoint() const
Gets constant reference to contact point (vector).
Definition: BaseInteraction.h:234
Mdouble getDistance() const
Returns an Mdouble which is the norm (length) of distance vector.
Definition: BaseInteraction.cc:539
Mdouble getOverlap() const
Returns a Mdouble with the current overlap between the two interacting objects.
Definition: BaseInteraction.h:240
Evaluates time-resolved continuum fields and writes the data into a stat file.
Definition: CG.h:76
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
void setFileType(FileType fileType)
Sets File::fileType_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:459
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1473
InteractionHandler interactionHandler
An object of the class InteractionHandler.
Definition: DPMBase.h:1467
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created.
Definition: DPMBase.h:1437
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Definition: CGParticleWallUnitTest.cpp:33
static Mdouble getDistance(const Vec3D &a, const Vec3D &b)
Calculates the distance between two Vec3D: .
Definition: Vector.cc:175
Mdouble Z
Definition: Vector.h:66
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:37