121 problem.speciesHandler.copyAndAddObject(species);
127 problem.setName(
"PeriodicWallsUnitTest");
133 std::vector<BaseParticle*>::iterator pIt =
problem.particleHandler.begin();
135 goodPos =
Vec3D(0.00950076062215577, 0.002, 0);
136 goodVel =
Vec3D(-0.005560409816604, 0, 0);
137 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
139 logger(
FATAL,
"E0 The particle is in the wrong position. It is %, however is should be %",
140 (*pIt)->getPosition(), goodPos);
142 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
144 logger(
FATAL,
"E0 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
149 goodPos =
Vec3D(0.000725163257251641, 0.002, 0);
150 goodVel =
Vec3D(-0.000808302139899, 0, 0);
151 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
153 logger(
FATAL,
"E1 The particle is in the wrong position. It is %, however is should be %",
154 (*pIt)->getPosition(), goodPos);
156 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
158 logger(
FATAL,
"E1 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
163 goodPos =
Vec3D(0.00950076062215577, 0.003, 0);
164 goodVel =
Vec3D(-0.005560409816604, 0, 0);
165 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
167 logger(
FATAL,
"E2 The particle is in the wrong position. It is %, however is should be %",
168 (*pIt)->getPosition(), goodPos);
170 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
172 logger(
FATAL,
"E2 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
177 goodPos =
Vec3D(0.000725163257251641, 0.003, 0);
178 goodVel =
Vec3D(-0.000808302139899, 0, 0);
179 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
181 logger(
FATAL,
"E3 The particle is in the wrong position. It is %, however is should be %",
182 (*pIt)->getPosition(), goodPos);
184 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
186 logger(
FATAL,
"E3 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
191 goodPos =
Vec3D(0.0004992393778432442, 0.004, 0);
192 goodVel =
Vec3D(0.00556040981661, 0, 0);
193 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
195 logger(
FATAL,
"E4 The particle is in the wrong position. It is %, however is should be %",
196 (*pIt)->getPosition(), goodPos);
198 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
200 logger(
FATAL,
"E4 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
205 goodPos =
Vec3D(0.00927483674274562, 0.004, 0);
206 goodVel =
Vec3D(0.0008083021398896, 0, 0);
207 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
209 logger(
FATAL,
"E5 The particle is in the wrong position. It is %, however is should be %",
210 (*pIt)->getPosition(), goodPos);
212 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
214 logger(
FATAL,
"E5 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
219 goodPos =
Vec3D(0.000499239377843248, 0.005, 0);
220 goodVel =
Vec3D(0.00556040981661, 0, 0);
221 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
223 logger(
FATAL,
"E6 The particle is in the wrong position. It is %, however is should be %",
224 (*pIt)->getPosition(), goodPos);
226 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
228 logger(
FATAL,
"E6 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
233 goodPos =
Vec3D(0.00927483674274562, 0.005, 0);
234 goodVel =
Vec3D(0.0008083021398892, 0, 0);
235 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
237 logger(
FATAL,
"E7 The particle is in the wrong position. It is %, however is should be %",
238 (*pIt)->getPosition(), goodPos);
240 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
242 logger(
FATAL,
"E7 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
247 goodPos =
Vec3D(0.00149923937784423, 0.006, 0);
248 goodVel =
Vec3D(0.005560409816606, 0, 0);
249 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
251 logger(
FATAL,
"E8 The particle is in the wrong position. It is %, however is should be %",
252 (*pIt)->getPosition(), goodPos);
254 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
256 logger(
FATAL,
"E8 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
261 goodPos =
Vec3D(0.000274836742748357, 0.006, 0);
262 goodVel =
Vec3D(0.0008083021398959, 0, 0);
263 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
265 logger(
FATAL,
"E9 The particle is in the wrong position. It is %, however is should be %",
266 (*pIt)->getPosition(), goodPos);
268 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
270 logger(
FATAL,
"E9 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
275 goodPos =
Vec3D(0.000368955529803987, 0.000368955529803987, 0);
276 goodVel =
Vec3D(0.005560480643586, 0.005560480643586, 0);
277 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
279 logger(
FATAL,
"E10 The particle is in the wrong position. It is %, however is should be %",
280 (*pIt)->getPosition(), goodPos);
282 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
284 logger(
FATAL,
"E10 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
289 goodPos =
Vec3D(0.0094902039201126, 0.0094902039201126, 0);
290 goodVel =
Vec3D(0.0008081850585628, 0.0008081850585628, 0);
291 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
293 logger(
FATAL,
"E11 The particle is in the wrong position. It is %, however is should be %",
294 (*pIt)->getPosition(), goodPos);
296 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
298 logger(
FATAL,
"E11 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
303 goodPos =
Vec3D(0.00963104447019111, 0.00963104447019111, 0.001);
304 goodVel =
Vec3D(-0.005560480643562, -0.005560480643562, 0);
305 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
307 logger(
FATAL,
"E12 The particle is in the wrong position. It is %, however is should be %",
308 (*pIt)->getPosition(), goodPos);
310 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
312 logger(
FATAL,
"E12 The particle has the wrong velocity. It is %, however is should be %", (*pIt)->getVelocity(),
317 goodPos =
Vec3D(0.00050979607988006, 0.00050979607988006, 0.001);
318 goodVel =
Vec3D(-0.0008081850586013, -0.0008081850586013, 0);
319 if (!(*pIt)->getPosition().isEqualTo(goodPos, 1
e-10))
321 logger(
FATAL,
"E13 The particle is in the wrong position. It is %, however is should be %",
322 (*pIt)->getPosition(), goodPos);
324 if (!(*pIt)->getVelocity().isEqualTo(goodVel, 1
e-10))
326 logger(
FATAL,
"E13 The particle has the wrong velocity. It is %, however is should be %",
327 (*pIt)->getVelocity(), goodVel);
Array< double, 1, 3 > e(1./3., 0.5, 2.)
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:31
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
void setDissipation(Mdouble dissipation)
Allows the normal dissipation to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:96
void setStiffness(Mdouble new_k)
Allows the spring constant to be changed.
Definition: LinearViscoelasticNormalSpecies.cc:72
void setDensity(Mdouble density)
Definition: ParticleSpecies.cc:88
Definition: PeriodicWallsUnitTest.cpp:11
Definition: Kernel/Math/Vector.h:30
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:75
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213