WallSpeciesUnitTest.cpp File Reference
#include "DPMBase.h"
#include "Particles/SphericalParticle.h"
#include "Walls/InfiniteWall.h"
#include "Species/LinearViscoelasticSpecies.h"
#include <cmath>
#include <iostream>
#include <iomanip>

Classes

class  WallSpecies
 

Functions

int main (int argc UNUSED, char *argv[] UNUSED)
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)
69 {
70  logger(VERBOSE, "\nSimulation of one particle, d=0.1, interacting with walls with different coefficient of "
71  "restitution\n\n"
72  "The purpose of the test is to check walls species information is correctly picked up");
74  problem.setFileType(FileType::NO_FILE); //comment if you want file output
75  problem.setName("WallSpecies");
76  problem.solve();
77  const Vec3D v = problem.particleHandler.getObject(0)->getVelocity();
78  logger(INFO, "v_x(t_max)=% should be ~0.5", v.X);
79  logger(INFO, "v_z(t_max)=% should be ~0.25", v.Z);
80  helpers::check(v.Z, 0.23642946655364, 1e-7, "v_z");
81  helpers::check(v.X, 0.49298992225767, 1e-7, "v_x");
82 }
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Array< double, 1, 3 > e(1./3., 0.5, 2.)
@ NO_FILE
file will not be created/read
LL< Log::VERBOSE > VERBOSE
Verbose information.
Definition: Logger.cc:36
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Definition: Kernel/Math/Vector.h:30
Definition: WallSpeciesUnitTest.cpp:18
#define INFO(i)
Definition: mumps_solver.h:54
void check(double real, double ideal, double error, std::string errorMessage)
Definition: TestHelpers.cc:16
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References helpers::check(), e(), INFO, logger, NO_FILE, problem, v, and VERBOSE.