169 scalingTestInitialConditionsRelax.
N = 100;
173 scalingTestInitialConditionsRelax.
setName(
"ScalingTestInitialConditionsRelax");
176 species->setStiffness(2e5);
177 species->setDissipation(150);
178 scalingTestInitialConditionsRelax.
setTimeStep(1e-4);
179 scalingTestInitialConditionsRelax.
setTimeMax(10);
182 scalingTestInitialConditionsRelax.
solve();
186 scalingTestInitialConditionsEquilibrize.setName(
"ScalingTestInitialConditionsEquilibrize");
187 species->setDissipation(0.0);
188 scalingTestInitialConditionsEquilibrize.setSaveCount(100);
189 scalingTestInitialConditionsEquilibrize.setTimeMax(1);
190 scalingTestInitialConditionsEquilibrize.solve();
192 for (
unsigned int i = 1;
i <= 10;
i++)
194 ScalingTestRun scalingTestRun(scalingTestInitialConditionsEquilibrize);
195 std::string
name =
"ScalingTestRun";
196 name += std::to_string(
i);
197 scalingTestRun.setName(
name);
198 scalingTestRun.setMultiplicationFactor(
i);
199 scalingTestRun.setSaveCount(100);
200 clock_t begin = std::clock();
201 scalingTestRun.solve();
202 clock_t end = std::clock();
203 double diff =
double(end - begin) / CLOCKS_PER_SEC * 1000;
204 logger(
INFO,
"N=% T=%%5 ms", scalingTestRun.particleHandler.getNumberOfObjects(), std::scientific, diff);
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:33
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.
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
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
SpeciesHandler speciesHandler
A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc.
Definition: DPMBase.h:1427
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 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
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
void setHGridMaxLevels(unsigned int HGridMaxLevels)
Sets the maximum number of levels of the HGrid in this MercuryBase.
Definition: MercuryBase.cc:476
Definition: ScalingTest.cpp:98
Definition: ScalingTest.cpp:36
double initialVelocity
Definition: ScalingTest.cpp:92
double targetVelocity
Definition: ScalingTest.cpp:93
int N
Definition: ScalingTest.cpp:91
double particleRadius
Definition: ScalingTest.cpp:94
Definition: ScalingTest.cpp:108
const Mdouble pi
Definition: ExtendedMath.h:45
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51
std::string name
Definition: MercuryProb.h:48