148 problem.
setName(
"PeriodicWallsUnitTest");
156 goodPos =
Vec3D(0.00950076062215577, 0.002, 0);
157 goodVel =
Vec3D(-0.005560409816604, 0, 0);
158 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
160 logger(
FATAL,
"E0 The particle is in the wrong position. It is %, however is should be %",
161 (*pIt)->getPosition(), goodPos);
163 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
165 logger(
FATAL,
"E0 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
170 goodPos =
Vec3D(0.000725163257251641, 0.002, 0);
171 goodVel =
Vec3D(-0.000808302139899, 0, 0);
172 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
174 logger(
FATAL,
"E1 The particle is in the wrong position. It is %, however is should be %",
175 (*pIt)->getPosition(), goodPos);
177 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
179 logger(
FATAL,
"E1 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
184 goodPos =
Vec3D(0.00950076062215577, 0.003, 0);
185 goodVel =
Vec3D(-0.005560409816604, 0, 0);
186 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
188 logger(
FATAL,
"E2 The particle is in the wrong position. It is %, however is should be %",
189 (*pIt)->getPosition(), goodPos);
191 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
193 logger(
FATAL,
"E2 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
198 goodPos =
Vec3D(0.000725163257251641, 0.003, 0);
199 goodVel =
Vec3D(-0.000808302139899, 0, 0);
200 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
202 logger(
FATAL,
"E3 The particle is in the wrong position. It is %, however is should be %",
203 (*pIt)->getPosition(), goodPos);
205 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
207 logger(
FATAL,
"E3 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
212 goodPos =
Vec3D(0.0004992393778432442, 0.004, 0);
213 goodVel =
Vec3D(0.00556040981661, 0, 0);
214 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
216 logger(
FATAL,
"E4 The particle is in the wrong position. It is %, however is should be %",
217 (*pIt)->getPosition(), goodPos);
219 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
221 logger(
FATAL,
"E4 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
226 goodPos =
Vec3D(0.00927483674274562, 0.004, 0);
227 goodVel =
Vec3D(0.0008083021398896, 0, 0);
228 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
230 logger(
FATAL,
"E5 The particle is in the wrong position. It is %, however is should be %",
231 (*pIt)->getPosition(), goodPos);
233 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
235 logger(
FATAL,
"E5 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
240 goodPos =
Vec3D(0.000499239377843248, 0.005, 0);
241 goodVel =
Vec3D(0.00556040981661, 0, 0);
242 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
244 logger(
FATAL,
"E6 The particle is in the wrong position. It is %, however is should be %",
245 (*pIt)->getPosition(), goodPos);
247 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
249 logger(
FATAL,
"E6 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
254 goodPos =
Vec3D(0.00927483674274562, 0.005, 0);
255 goodVel =
Vec3D(0.0008083021398892, 0, 0);
256 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
258 logger(
FATAL,
"E7 The particle is in the wrong position. It is %, however is should be %",
259 (*pIt)->getPosition(), goodPos);
261 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
263 logger(
FATAL,
"E7 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
268 goodPos =
Vec3D(0.00149923937784423, 0.006, 0);
269 goodVel =
Vec3D(0.005560409816606, 0, 0);
270 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
272 logger(
FATAL,
"E8 The particle is in the wrong position. It is %, however is should be %",
273 (*pIt)->getPosition(), goodPos);
275 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
277 logger(
FATAL,
"E8 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
282 goodPos =
Vec3D(0.000274836742748357, 0.006, 0);
283 goodVel =
Vec3D(0.0008083021398959, 0, 0);
284 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
286 logger(
FATAL,
"E9 The particle is in the wrong position. It is %, however is should be %",
287 (*pIt)->getPosition(), goodPos);
289 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
291 logger(
FATAL,
"E9 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
296 goodPos =
Vec3D(0.000368955529803987, 0.000368955529803987, 0);
297 goodVel =
Vec3D(0.005560480643586, 0.005560480643586, 0);
298 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
300 logger(
FATAL,
"E10 The particle is in the wrong position. It is %, however is should be %",
301 (*pIt)->getPosition(), goodPos);
303 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
305 logger(
FATAL,
"E10 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
310 goodPos =
Vec3D(0.0094902039201126, 0.0094902039201126, 0);
311 goodVel =
Vec3D(0.0008081850585628, 0.0008081850585628, 0);
312 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
314 logger(
FATAL,
"E11 The particle is in the wrong position. It is %, however is should be %",
315 (*pIt)->getPosition(), goodPos);
317 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
319 logger(
FATAL,
"E11 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
324 goodPos =
Vec3D(0.00963104447019111, 0.00963104447019111, 0.001);
325 goodVel =
Vec3D(-0.005560480643562, -0.005560480643562, 0);
326 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
328 logger(
FATAL,
"E12 The particle is in the wrong position. It is %, however is should be %",
329 (*pIt)->getPosition(), goodPos);
331 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
333 logger(
FATAL,
"E12 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
338 goodPos =
Vec3D(0.00050979607988006, 0.00050979607988006, 0.001);
339 goodVel =
Vec3D(-0.0008081850586013, -0.0008081850586013, 0);
340 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1e-10))
342 logger(
FATAL,
"E13 The particle is in the wrong position. It is %, however is should be %",
343 (*pIt)->getPosition(), goodPos);
345 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1e-10))
347 logger(
FATAL,
"E13 The particle has the wrong velocity. It is %, however is should be %",
348 (*pIt)->getVelocity(), goodVel);
LL< Log::FATAL > FATAL
Definition of the different loglevels by its wrapper class LL. These are used as tags in template met...
Definition: Logger.cc:52
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
Definition: BaseHandler.h:690
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
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
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
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:117
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:93
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:108
Definition: PeriodicWallsUnitTest.cpp:32
unsigned int getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(unsigned int numberOfSaves, Mdouble timeMax, Mdouble timeStep)
Returns the correct saveCount if the total number of saves, the final time and the time step is known...
Definition: FormulaHelpers.cc:96