169 scalingTestInitialConditionsRelax.
N = 100;
173 scalingTestInitialConditionsRelax.
setName(
"ScalingTestInitialConditionsRelax");
176 species->setStiffness(2e5);
177 species->setDissipation(150);
178 scalingTestInitialConditionsRelax.
setTimeStep(1e-4);
179 scalingTestInitialConditionsRelax.
setTimeMax(1);
182 scalingTestInitialConditionsRelax.
solve();
186 scalingTestInitialConditionsEquilibrize.setName(
"ScalingTestInitialConditionsEquilibrize");
187 species->setDissipation(0.0);
188 scalingTestInitialConditionsEquilibrize.setSaveCount(100);
189 scalingTestInitialConditionsEquilibrize.solve();
191 for (
unsigned int i = 1;
i <= 10;
i++)
193 ScalingTestRun scalingTestRun(scalingTestInitialConditionsEquilibrize);
194 std::string
name =
"ScalingTestRun";
195 name += std::to_string(
i);
196 scalingTestRun.setName(
name);
197 scalingTestRun.setMultiplicationFactor(
i);
198 scalingTestRun.setSaveCount(100);
199 auto start = std::chrono::steady_clock::now();
200 scalingTestRun.solve();
201 auto end = std::chrono::steady_clock::now();
202 auto diff = end - start;
203 logger(
INFO,
"N=% T=%%%5 ms", scalingTestRun.particleHandler.getNumberOfObjects(), std::scientific,
204 std::chrono::duration<double, std::milli>(diff).count());
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