216 ParticleParticleInteractionProblem.
solve();
218 logger(
INFO,
"Testing particle-particle collision for elastic adhesive forces");
219 std::vector<BaseParticle*>::iterator pIt = ParticleParticleInteractionProblem.
particleHandler.
begin();
220 if (!(*pIt)->getPosition().isEqualTo(
Vec3D(-0.00101582359198137,0.0,0.0), 1e-7))
221 logger(
FATAL,
"First particle is in the wrong position. It is at %",(*pIt)->getPosition());
222 if (!(*pIt)->getVelocity().isEqualTo(
Vec3D(-0.0436824,0.0,0.0) , 1e-7))
223 logger(
FATAL,
"First particle has the wrong velocity. It is at %",(*pIt)->getVelocity());
225 if (!(*pIt)->getPosition().isEqualTo(
Vec3D(0.00101582359198137,0.0,0.0), 1e-7))
226 logger(
FATAL,
"Second particle is in the wrong position. It is at %",(*pIt)->getPosition());
227 if (!(*pIt)->getVelocity().isEqualTo(
Vec3D(0.0436824,0.0,0.0) , 1e-7))
228 logger(
FATAL,
"Second particle has the wrong velocity. It is at %",(*pIt)->getVelocity());
232 ParticleParticleInteractionWithPlasticForcesProblem.
solve();
234 logger(
INFO,
"Testing particle particles collision for plastic adhesive forces");
235 std::vector<BaseParticle*>::iterator pIt2 = ParticleParticleInteractionWithPlasticForcesProblem.
particleHandler.
begin();
236 if (!(*pIt2)->getPosition().isEqualTo(
Vec3D(-0.00107858,0.0,0.0), 1e-7))
237 logger(
FATAL,
"First particle is in the wrong position. It is at %",(*pIt2)->getPosition());
238 if (!(*pIt2)->getVelocity().isEqualTo(
Vec3D(-0.0352526,0.0,0.0) , 1e-7))
239 logger(
FATAL,
"First particle has the wrong velocity. It is at %",(*pIt2)->getVelocity());
241 if (!(*pIt2)->getPosition().isEqualTo(
Vec3D(0.00107858,0.0,0.0), 1e-7))
242 logger(
FATAL,
"Second particle is in the wrong position. It is at %",(*pIt2)->getPosition());
243 if (!(*pIt2)->getVelocity().isEqualTo(
Vec3D(0.0352526,0.0,0.0) , 1e-7))
244 logger(
FATAL,
"Second particle has the wrong velocity. It is at %",(*pIt2)->getVelocity());
248 ParticleWallInteraction.
solve();
250 logger(
INFO,
"Testing particle-wall collision for plastic adhesive forces");
252 if (!(*pIt3)->getPosition().isEqualTo(
Vec3D(0.00104381,0.0,0.0), 1e-7))
253 logger(
FATAL,
"The particle is in the wrong position. It is at %",(*pIt3)->getPosition());
254 if (!(*pIt3)->getVelocity().isEqualTo(
Vec3D(0.0362122,0.0,0.0) , 1e-7))
255 logger(
FATAL,
"The particle has the wrong velocity. It is at %",(*pIt3)->getVelocity());
void solve()
The work horse of the code.
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
LL< Log::INFO > INFO
Info log level.
const std::vector< T * >::const_iterator begin() const
Gets the begin of the const_iterator over all Object in this BaseHandler.
ParticleHandler particleHandler
An object of the class ParticleHandler, contains the pointers to all the particles created...
LL< Log::FATAL > FATAL
Fatal log level.
This code is written to test short-distance non-contact forces such as van-der-Waals or liquid bridge...
Implementation of a 3D vector (by Vitaliy).