56 logger(
INFO,
"Simulating a stack of particles under gravity on a wall until it is relaxed");
58 problem.setName(
"NewtonsCradleSelfTest");
63 problem.setParticleDimensions(3);
64 species->setDensity(6./
pi);
66 species->setCollisionTimeAndRestitutionCoefficient(.01,.1,1.);
74 logger(
INFO,
"\nTesting CGHandler::restartAndEvaluateDataFiles");
80 c0->setTimeMin(8+1
e-12);
81 c0->statFile.setName(
problem.getName()+
".fromData.stat");
84 logger(
INFO,
"\nTesting CGHandler::restartAndEvaluateRestartFiles");
86 c0->statFile.setName(
problem.getName()+
".fromRestart.stat");
91 "p 'NewtonsCradleSelfTest.0.stat' u 2:22 w lp, 'NewtonsCradleSelfTest.stat' u 3:41 w l");
96 stats1.setSuperExact(
false);
97 stats1.setCGShape(
"Gaussian");
98 stats1.setCGTimeMin(
problem.getTimeMax()*1.00000999999);
99 stats1.setTimeMaxStat(1e20);
101 logger(
INFO,
"Creating %",stats1.statFile.getName());
102 stats1.statistics_from_fstat_and_data();
104 logger(
INFO,
"Test StatisticsVector for different CG functions (Gauss, Heaviside, Lucy)");
106 std::array<std::string,3>
str = {
"Gaussian",
"HeavisideSphere",
"Lucy"};
108 for (
int i=0;
i<3;
i++) {
114 stats0.setZMinStat(-0.5);
115 stats0.statFile.setName(stats0.getName() +
"_" +
str[
i] +
"Z.stat");
118 stats0.setCGWidth(
w);
119 stats0.setSuperExact(
true);
120 stats0.setCGShape(
str[
i].c_str());
121 stats0.setCGTimeMin(
problem.getTimeMax()*.999999);
122 stats0.setTimeMaxStat(1e20);
123 logger(
INFO,
"Creating %",stats0.statFile.getName());
124 stats0.statistics_from_fstat_and_data();
127 stats2.setZMinStat(-0.5);
128 stats2.statFile.setName(stats2.getName() +
"_" +
str[
i] +
"XYZ.stat");
131 stats2.setCGWidth(
w);
132 stats2.setSuperExact(
true);
133 stats2.setCGShape(
str[
i].c_str());
134 stats2.setCGTimeMin(
problem.getTimeMax()*.999999);
135 stats2.setTimeMaxStat(1e20);
136 logger(
INFO,
"Creating %",stats2.statFile.getName());
137 stats2.statistics_from_fstat_and_data();
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:11
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
RowVector3d w
Definition: Matrix_resize_int.cpp:3
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
void restartAndEvaluateDataFiles(const std::string &name, bool evaluateFStatFiles=true)
Definition: CGHandler.cc:173
void restartAndEvaluateRestartFiles(const std::string &name)
Definition: CGHandler.cc:167
CGHandler cgHandler
Object of the class cgHandler.
Definition: DPMBase.h:1479
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:16
Definition: NewtonsCradleSelfTest.cpp:14
This class is used to extract statistical data from MD simulations.
Definition: StatisticsVector.h:41
Evaluates time-averaged continuum fields and writes the data into a stat file.
Definition: TimeAveragedCG.h:39
Definition: Kernel/Math/Vector.h:30
#define INFO(i)
Definition: mumps_solver.h:54
str
Definition: compute_granudrum_aor.py:141
const Mdouble pi
Definition: ExtendedMath.h:23
bool writeToFile(const std::string &filename, const std::string &filecontent)
Writes a string to a file.
Definition: FileIOHelpers.cc:29
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213