35 logger(
INFO,
" Simulates a particle-particle collision.\n"
37 " - at one instant in time\n"
38 " - standard fields (density and stress)\n"
39 " - for O, Z, and XYZ coordinates\n"
40 " - for both Gauss and Lucy kernel functions\n");
43 dpm.
setName(
"CGParticleParticleUnitTest");
56 Z->setMin({-1,-1,0.95});
57 Z->setMax({1,1,0.95});
61 G->setMin({-1,-1,0.95});
62 G->setMax({1,1,0.95});
69 XYZ->setMin({-0.95,-1,0.95});
70 XYZ->setMax({1.05,1,0.95});
88 helpers::check(
Z->getPoint(0).getDensity(),phiL0/4.0,1
e-15,
"Z-resolved density at particle centre");
92 helpers::check(
G->getPoint(0).getDensity(),phiG0/4.0,1
e-15,
"Z-resolved density for Gaussian CG");
96 helpers::check(
XYZ->getPoint(0).getDensity(),phi30,1
e-11,
"Fully-resolved density at particle centre");
101 Mdouble overlap = 2.0-distance;
102 helpers::check(
O->getPoint(0).getContactStress().trace(),2e5*overlap*distance/16,1
e-11,
"Average stress");
107 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
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
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: CGLiquidsUnitTest.cpp:14
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
const Mdouble pi
Definition: ExtendedMath.h:23
const Mdouble sqrt_pi
Definition: ExtendedMath.h:24
const Mdouble sqrt_2
Definition: ExtendedMath.h:26
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:16
T cubic(const T val)
calculates the cube of a number
Definition: ExtendedMath.h:95