FluxBoundaryPrescribedDistanceUnitTest.cpp File Reference

Classes

class  FluxBoundaryPrescribedDistanceUnitTest
 Tests if the FluxBoundary measures the flux of particles crossing the boundary correctly, if the FluxBoundary is moving itself. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
65 {
66  //declare the DPM problem and set the name
68  problem.setTimeMax(1);
69  problem.setTimeStep(0.1);
70  problem.setFileType(FileType::NO_FILE);
71 
72  //run the simulation
73  problem.solve(argc, argv);
74 
75  // Check the value of the fluxBoundary
76  FluxBoundary* fluxBoundary = static_cast<FluxBoundary*>(problem.boundaryHandler.getObject(0));
77 
78  logger.assert_always(fluxBoundary->getNumberOfParticlesCrossedNet() == 3, "Wrong number of particles crossed the flux boundary");
79  logger.assert_always(fluxBoundary->getNumberOfParticlesCrossedForw() == 3, "Wrong number of particles crossed the flux boundary (Forward)");
80  logger.assert_always(fluxBoundary->getNumberOfParticlesCrossedBack() == 0, "Wrong number of particles crossed the flux boundary (Backward)");
81 }
@ NO_FILE
file will not be created/read
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Tests if the FluxBoundary measures the flux of particles crossing the boundary correctly,...
Definition: FluxBoundaryPrescribedDistanceUnitTest.cpp:15
Used for measuring flow rates through a given plane; acts like a pair of scales Inherits from BaseBou...
Definition: FluxBoundary.h:23
unsigned int getNumberOfParticlesCrossedForw() const
Gets the number of particles that have crossed the boundary.
Definition: FluxBoundary.cc:152
unsigned int getNumberOfParticlesCrossedNet() const
Definition: FluxBoundary.cc:182
unsigned int getNumberOfParticlesCrossedBack() const
Definition: FluxBoundary.cc:167
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References FluxBoundary::getNumberOfParticlesCrossedBack(), FluxBoundary::getNumberOfParticlesCrossedForw(), FluxBoundary::getNumberOfParticlesCrossedNet(), logger, NO_FILE, and problem.