MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Logger.cc File Reference
#include "Logger.h"
#include <cstdlib>
#include <iostream>
#include <csignal>

Go to the source code of this file.

Functions

static void printInfo (std::string module, std::string msg)
 
static void printMessage (std::string module, std::string msg)
 
static void printError (std::string module, std::string msg)
 

Variables

LL< Log::FATAL > FATAL
 Fatal log level. More...
 
LL< Log::ERROR > ERROR
 Error log level. More...
 
LL< Log::WARN > WARN
 Warning log level. More...
 
LL< Log::INFO > INFO
 Info log level. More...
 
LL< Log::DEFAULT > DEFAULT
 Default log level. More...
 
LL< Log::VERBOSE > VERBOSE
 Verbose information. More...
 
LL< Log::DEBUG > DEBUG
 Debug information. More...
 
Logger< MERCURY_LOGLEVELlogger ("MercuryKernel")
 
Logger< CG_LOGLEVELcgLogger ("MercuryCG")
 
LoggerOutput loggerOutputDefaultImpl
 
LoggerOutputloggerOutput = &loggerOutputDefaultImpl
 Declaration of the output functions. If the output needs to be redirected, please swap the loggerOutput pointer to your preferred LoggerOutput instance, and make sure this exists until AFTER an std::exit() invocation. (e.g. clean up with std::atexit()) More...
 

Function Documentation

static void printError ( std::string  module,
std::string  msg 
)
static

Definition at line 94 of file Logger.cc.

References MPIContainer::getProcessorID(), constants::i, initialiseMPI(), and MPIContainer::Instance().

95 {
96 #ifdef MERCURY_USE_MPI
97  //Check if MPI is initialised
98  initialiseMPI();
99  MPIContainer& communicator = MPIContainer::Instance();
100  std::cout << "\033[1;33mError " << module << ":\033[0m\n" << "[Processor: " << communicator.getProcessorID() << "]" << msg << std::endl;
101 #else
102  std::cout << "\033[1;31mError " << module << ":\033[0m\n" << msg << std::endl;
103 #endif
104 #ifdef MERCURY_STACKTRACE_SHOW
105  std::cerr << "\n-----------------[Stack Trace]-----------------\n";
106 
107  void* stackBuffer[64]; //This should be enough for all purposes..
108  //First, we retrieve the addresses of the entire stack...
109  int nStackFrames = backtrace(stackBuffer, 64);
110 #ifndef MERCURY_STACKTRACE_DEMANGLE
111  //We don't have the demangling infra, so just use backtrace_symbols.
112  char** functionNames = backtrace_symbols(stackBuffer, nStackFrames);
113  for( int i = 0; i < nStackFrames; i++ )
114  {
115  std::cerr << '\t' << functionNames[i] << '\n';
116  }
117  std::cerr << "Exiting.\n" << std::endl;
118 
119  //DO NOT USE DELETE HERE. THIS SHOULD BE free()'d!
120  // -- dducks
121  free(functionNames);
122 #else
123  //We request the symbol information ourselves, in order to be able to demangle it.
124  //And request the function names using dladdr.
125  Dl_info infoStruct;
126  for (int i = 4; i < nStackFrames; i++)
127  {
128  if (dladdr(stackBuffer[i], &infoStruct))
129  { // We succesfully loaded the address...
130  int demangleStatus;
131  char* fnDemangled = abi::__cxa_demangle(infoStruct.dli_sname, NULL, NULL, &demangleStatus);
132  if (infoStruct.dli_sname == nullptr)
133  continue;
134 
135  //We even succesfully demangled the symbol...
136  if (demangleStatus == 0)
137  {
138  std::cerr << fnDemangled << " +" << (void*) ((char*) stackBuffer[i] - (char*) infoStruct.dli_saddr) << "\t(" << infoStruct.dli_fname << ")\n";
139  free(fnDemangled);
140  }
141  else
142  { //Well, we tried. Lets output at least our raw symbol name.
143  std::cerr << infoStruct.dli_sname << " +" << (void*) ((char*) stackBuffer[i] - (char*) infoStruct.dli_saddr) << "\t(" << infoStruct.dli_fname << ")\n";
144  }
145  }
146  else
147  { //Name lookup failed.
148  std::cerr << stackBuffer[i] << ": ?????" << std::endl;
149  }
150  }
151 #endif
152 #endif
153  //send a signal first, in case a debugger can catch it
154  std::raise(SIGTERM);
155  std::exit(2);
156 }
This class contains all information and functions required for communication between processors...
Definition: MpiContainer.h:125
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:130
const std::complex< Mdouble > i
Definition: ExtendedMath.h:50
void initialiseMPI()
Inialises the MPI library.
std::size_t getProcessorID()
Reduces a scalar on all processors to one scalar on a target processor.
static void printInfo ( std::string  module,
std::string  msg 
)
static

Definition at line 67 of file Logger.cc.

References MPIContainer::getProcessorID(), initialiseMPI(), and MPIContainer::Instance().

68 {
69 #ifdef MERCURY_USE_MPI
70  //Check if MPI is initialised
71  initialiseMPI();
72  MPIContainer& communicator = MPIContainer::Instance();
73  std::cout << "[Process: " << communicator.getProcessorID() << "]: " << msg << std::endl;
74 #else
75  std::cout << msg << std::endl;
76 #endif
77 }
This class contains all information and functions required for communication between processors...
Definition: MpiContainer.h:125
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:130
void initialiseMPI()
Inialises the MPI library.
std::size_t getProcessorID()
Reduces a scalar on all processors to one scalar on a target processor.
static void printMessage ( std::string  module,
std::string  msg 
)
static

Definition at line 80 of file Logger.cc.

References MPIContainer::getProcessorID(), initialiseMPI(), and MPIContainer::Instance().

81 {
82 #ifdef MERCURY_USE_MPI
83  //Check if MPI is initialised
84  initialiseMPI();
85  MPIContainer& communicator = MPIContainer::Instance();
86  std::cout << "\033[1;33mModule " << module << ":\033[0m\n" << "[Processor: " << communicator.getProcessorID() << "]" << msg << std::endl;
87 #else
88  std::cout << "\033[1;33mMessage " << module << ":\033[0m\n" << msg << std::endl;
89 #endif
90 }
This class contains all information and functions required for communication between processors...
Definition: MpiContainer.h:125
static MPIContainer & Instance()
fetch the instance to be used for communication
Definition: MpiContainer.h:130
void initialiseMPI()
Inialises the MPI library.
std::size_t getProcessorID()
Reduces a scalar on all processors to one scalar on a target processor.

Variable Documentation

LL<Log::DEBUG> DEBUG

Debug information.

Only used for internal development. Can be very cryptic, as it is only meant for finding bugs / oddities by the internal development team.

Example: Collission found between Particle #38201 and Wall #5

Default behaviour: ignore.

Definition at line 58 of file Logger.cc.

Referenced by BaseHandler< T >::BaseHandler(), SmallMatrix< numberOfRows, numberOfColumns >::operator*(), operator*(), CGFields::OrientationField::OrientationField(), CGFields::OrientationField::setFields(), BaseHandler< T >::~BaseHandler(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::~MixedSpecies(), and Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::~Species().

LL<Log::DEFAULT> DEFAULT

Default log level.

Only useful for defining the loglevel of the logger itself. Should not actually be used.

Definition at line 56 of file Logger.cc.

LL<Log::ERROR> ERROR

Error log level.

Error, as in, the program has found a severe problem which it cannot resolve any further. It does not know how to recover in a sane way.

Example: Negative time step, Infinite end time and no override of the continuation function.

Default behaviour: log to std::cerr, followed by std::exit().

Definition at line 53 of file Logger.cc.

Referenced by SmallMatrix< numberOfRows, numberOfColumns >::computeWedgeStuffVector(), SmallMatrix< numberOfRows, numberOfColumns >::determinant(), BaseHandler< T >::getObjectById(), BaseHandler< T >::getObjectsById(), helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), main(), Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::mixAll(), helpers::more(), operator>>(), and NurbsSurface::set().

LL<Log::FATAL> FATAL

Fatal log level.

These are the loglevels which should be used to control the logger. They are declared here but defined in Logger.cpp

Fatal, as in, the program has suffered from the worst possible failure and there is no way it can gracefully recover.

Example: No memory allocations possible

Default behaviour: log to std::cerr, followed by std::exit().

Definition at line 52 of file Logger.cc.

Referenced by main(), and transformMercuryToVTK().

LL<Log::INFO> INFO

Info log level.

Useful information, small oddities found which should be of no real effect to the user. Also information about the current state and progress of the program.

Example: Finished inserting particles.

Default behaviour: log to std::cout, returns afterwards.

Definition at line 55 of file Logger.cc.

Referenced by checkTemplate(), helpers::compare(), helpers::readFromCommandLine< std::string >(), helpers::loadingTest(), main(), helpers::normalAndTangentialLoadingTest(), NurbsSurface::NurbsSurface(), helpers::objectivenessTest(), helpers::readArrayFromCommandLine(), helpers::readFromCommandLine(), helpers::readFromFile(), helpers::readVectorFromCommandLine(), NurbsSurface::set(), SinterNormalSpecies::setParhamiMcKeeping(), and transformMercuryToVTK().

Logger<MERCURY_LOGLEVEL> logger("MercuryKernel")

Default logger. Use this for general logging.

For very specific modules, define your own logger. If you want to make extensive use of Debug messages, please use a custom logger as well, to prevent polluting the output.

Referenced by BaseCluster::actionsAfterSolve(), BaseCluster::actionsAfterTimeStep(), BaseBoundary::actionsBeforeTimeLoop(), BaseCluster::actionsOnRestart(), SubcriticalMaserBoundaryTEST::activateMaser(), SubcriticalMaserBoundary::activateMaser(), ConstantMassFlowMaserBoundary::activateMaser(), IntersectionOfWalls::add3PointObject(), PossibleContactList::add_PossibleContact(), ParticleHandler::addExistingObject(), Chute::addFlowParticlesCompactly(), PolydisperseInsertionBoundary::addGenerandum(), ParticleHandler::addGhostObject(), WallHandler::addObject(), ParticleHandler::addObject(), IntersectionOfWalls::addObject(), BaseWall::addParticlesAtWall(), Domain::addParticlesToLists(), SubcriticalMaserBoundary::addParticleToMaser(), ConstantMassFlowMaserBoundary::addParticleToMaser(), IntersectionOfWalls::addTetra(), AxisymmetricIntersectionOfWalls::AxisymmetricIntersectionOfWalls(), BaseBoundary::BaseBoundary(), BaseCG::BaseCG(), BaseCluster::BaseCluster(), BaseClusterInsertionBoundary::BaseClusterInsertionBoundary(), BaseHandler< T >::BaseHandler(), BaseInteractable::BaseInteractable(), BaseParticle::BaseParticle(), BaseSpecies::BaseSpecies(), BaseWall::BaseWall(), BasicIntersectionOfWalls::BasicIntersectionOfWalls(), BasicUnionOfWalls::BasicUnionOfWalls(), BondedInteraction::BondedInteraction(), BoundaryHandler::BoundaryHandler(), BaseCluster::calculateTimeStep(), ChargedBondedInteraction::ChargedBondedInteraction(), mathsFunc::chebyshev(), SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticleMoved(), DeletionBoundary::checkBoundaryAfterParticleMoved(), DropletBoundary::checkBoundaryAfterParticlesMove(), StressStrainControlBoundary::checkBoundaryAfterParticlesMove(), SubcriticalMaserBoundaryTEST::checkBoundaryAfterParticlesMove(), FixedClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), RandomClusterInsertionBoundary::checkBoundaryBeforeTimeStep(), InsertionBoundary::checkBoundaryBeforeTimeStep(), MercuryBase::checkParticleForInteractionLocal(), DPMBase::checkSettings(), checkTemplate(), Chute::Chute(), CircularPeriodicBoundary::CircularPeriodicBoundary(), Chute::cleanChute(), ConstantMassFlowMaserBoundary::closeMaser(), ClusterGenerator::ClusterGenerator(), Coil::Coil(), helpers::compare(), ChargedBondedInteraction::computeAdhesionForce(), DPMBase::computeAllForces(), LinearPlasticViscoelasticNormalSpecies::computeBondNumberMax(), SuperQuadricParticle::computeContactPoint(), ScrewsymmetricIntersectionOfWalls::computeDeltaZ(), BaseCluster::computeInternalStructure(), ParticleHandler::computeLargestParticle(), SuperQuadricParticle::computeMass(), SinterInteraction::computeNormalForce(), DPMBase::computeOneTimeStep(), SlidingFrictionInteraction::computeSlidingSpringSuperQuadric(), ParticleHandler::computeSmallestParticle(), StressStrainControlBoundary::computeStrainRate(), HertzianSinterNormalSpecies::computeTimeStep(), Mercury3D::computeWallForces(), SmallMatrix< numberOfRows, numberOfColumns >::computeWedgeStuffVector(), ConstantMassFlowMaserBoundary::ConstantMassFlowMaserBoundary(), DPMBase::constructor(), PSD::convertProbabilityDensityToProbabilityDensityNumberDistribution(), AngledPeriodicBoundary::copy(), PolydisperseInsertionBoundary::copy(), SubcriticalMaserBoundaryTEST::copyExtraParticles(), MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::copyInto(), Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::copyInto(), Chute::createBottom(), DomainHandler::createMesh(), BaseInteraction::createMPIInteractionDataArray(), BoundaryHandler::createObject(), WallHandler::createObject(), ParticleHandler::createObject(), CubeDeletionBoundary::CubeDeletionBoundary(), DataFiles::DataFiles(), SubcriticalMaserBoundaryTEST::deactivateMaser(), SubcriticalMaserBoundary::deactivateMaser(), Domain::debugInformation(), DPMBase::decompose(), BaseInteraction::deleteMPIInteractionDataArray(), DeletionBoundary::DeletionBoundary(), SmallMatrix< numberOfRows, numberOfColumns >::determinant(), DomainHandler::DomainHandler(), CGHandler::evaluateDataFiles(), CGHandler::evaluateRestartFiles(), SubcriticalMaserBoundaryTEST::extendBottom(), FileReader::FileReader(), DPMBase::fillDomainWithParticles(), PeriodicBoundaryHandler::findNewParticle(), FixedClusterInsertionBoundary::FixedClusterInsertionBoundary(), Domain::flushParticlesFromList(), LiquidMigrationWilletInteraction::form(), InsertionBoundary::generateParticle(), PolydisperseInsertionBoundary::generateParticle(), DPMBase::get1DParametersFromRunNumber(), DPMBase::get2DParametersFromRunNumber(), DPMBase::get3DParametersFromRunNumber(), LinearPlasticViscoelasticNormalSpecies::getCollisionTime(), SmallMatrix< numberOfRows, numberOfColumns >::getColumn(), Quaternion::getComponent(), Vec3D::getComponent(), SuperQuadricParticle::getContactPointPlanB(), NurbsSurface::getDistance(), HorizontalBaseScrew::getDistanceAndNormal(), SimpleDrumSuperquadrics::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), Screw::getDistanceAndNormalLabCoordinates(), SimpleDrumSuperquadrics::getDistanceNormalOverlapSuperquadric(), BaseWall::getDistanceNormalOverlapSuperquadric(), BaseInteraction::getEffectiveMass(), BaseInteraction::getEffectiveRadius(), ChargedBondedInteraction::getElasticEnergy(), ParticleHandler::getFastestParticle(), ParticleHandler::getFastestParticleLocal(), BaseWall::getFurthestPointSuperQuadric(), ParticleHandler::getHighestPositionComponentParticle(), ParticleHandler::getHighestPositionComponentParticleLocal(), ParticleHandler::getHighestVelocityComponentParticle(), ParticleHandler::getHighestVelocityComponentParticleLocal(), BaseInteraction::getI(), BaseInteraction::getInteractionDetails(), BaseWall::getInteractionWith(), BaseWall::getInteractionWithSuperQuad(), ParticleSpecies::getLargestInverseParticleMassLocal(), ParticleHandler::getLargestParticle(), ParticleHandler::getLowestPositionComponentParticle(), ParticleHandler::getLowestPositionComponentParticleLocal(), ParticleHandler::getLowestVelocityComponentParticle(), ParticleHandler::getLowestVelocityComponentParticleLocal(), SpeciesHandler::getMixedObject(), getName(), PossibleContact::getNext(), RNG::getNormalVariate(), ParticleHandler::getNumberOfObjects(), ParticleHandler::getNumberOfRealObjectsLocal(), BasicIntersectionOfWalls::getObject(), BasicUnionOfWalls::getObject(), BaseHandler< T >::getObject(), BaseHandler< T >::getObjectById(), BaseHandler< T >::getObjectsById(), PossibleContact::getOtherParticle(), BaseInteraction::getP(), ParticleHandler::getParticleAttribute(), ParticleHandler::getParticleAttributeLocal(), helpers::getPath(), RNG::getPoissonVariate(), PossibleContact::getPrevious(), PSD::getRadiusByPercentile(), RNG::getRandomNumber(), SmallMatrix< numberOfRows, numberOfColumns >::getRow(), helpers::getSaveCountFromNumberOfSavesAndTimeMaxAndTimeStep(), ParticleHandler::getSmallestParticle(), ChuteWithHopper::getTimeStepRatio(), BaseParticle::getVolume(), SuperQuadricParticle::getVolume(), ParticleSpecies::getVolumeFromRadius(), helpers::gnuplot(), helpers::readFromCommandLine< std::string >(), HGrid::HGrid(), Mercury2D::hGridFindContactsWithTargetCell(), Mercury3D::hGridFindContactsWithTargetCell(), Mercury2D::hGridFindParticleContacts(), Mercury3D::hGridFindParticleContacts(), Mercury3D::hGridGetInteractingParticleList(), Mercury2D::hGridHasParticleContacts(), MercuryBase::hGridNeedsRebuilding(), MercuryBase::hGridRebuild(), HorizontalBaseScrew::HorizontalBaseScrew(), HorizontalScrew::HorizontalScrew(), InfiniteWall::InfiniteWall(), HGrid::info(), InsertionBoundary::insertParticle(), InsertionBoundary::insertParticles(), BaseCluster::insertParticles(), HGrid::insertParticleToHgrid(), InteractionHandler::InteractionHandler(), IntersectionOfWalls::IntersectionOfWalls(), BaseWall::intersectVTK(), MatrixSymmetric3D::inverse(), SmallMatrix< numberOfRows, numberOfColumns >::inverse(), ConstantMassFlowMaserBoundary::isCopying(), LeesEdwardsBoundary::LeesEdwardsBoundary(), SmallVector< numberOfRows >::length(), LevelSetWall::LevelSetWall(), helpers::loadingTest(), main(), ChuteBottom::makeRoughBottom(), BaseVTKWriter< H >::makeVTKFileWithHeader(), Mercury2D::Mercury2D(), Mercury3D::Mercury3D(), MercuryBase::MercuryBase(), LinearPlasticViscoelasticNormalSpecies::mix(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::mixAll(), Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::mixAll(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::MixedSpecies(), SubcriticalMaserBoundaryTEST::modifyPeriodicComplexity(), helpers::more(), MPIContainer::MPIContainer(), helpers::normalAndTangentialLoadingTest(), Quaternion::normalise(), Vec3D::normalise(), NurbsSurface::NurbsSurface(), NurbsWall::NurbsWall(), helpers::objectivenessTest(), BaseParticle::oldRead(), BinaryReader::openFile(), SmallMatrix< numberOfRows, numberOfColumns >::operator()(), NumericalVector< std::complex< Mdouble > >::operator()(), SmallVector< numberOfRows >::operator()(), NumericalVector< std::complex< Mdouble > >::operator*(), SmallMatrix< numberOfRows, numberOfColumns >::operator*(), operator*(), NumericalVector< std::complex< Mdouble > >::operator+(), NumericalVector< std::complex< Mdouble > >::operator+=(), NumericalVector< std::complex< Mdouble > >::operator-(), NumericalVector< std::complex< Mdouble > >::operator-=(), SpeciesHandler::operator=(), BoundaryHandler::operator=(), InteractionHandler::operator=(), PeriodicBoundaryHandler::operator=(), DomainHandler::operator=(), ParticleHandler::operator=(), IntersectionOfWalls::operator=(), TriangulatedWall::operator=(), operator>>(), SmallMatrix< numberOfRows, numberOfColumns >::operator[](), NumericalVector< std::complex< Mdouble > >::operator[](), SmallVector< numberOfRows >::operator[](), CGFields::OrientationField::OrientationField(), SuperQuadricParticle::overlapFromContactPoint(), ParabolaChute::ParabolaChute(), ParhamiMcMeekingSinterInteraction::ParhamiMcMeekingSinterInteraction(), ParticleHandler::ParticleHandler(), SubcriticalMaserBoundaryTEST::performActionsBeforeAddingParticles(), PeriodicBoundary::PeriodicBoundary(), PeriodicBoundaryHandler::PeriodicBoundaryHandler(), PolydisperseInsertionBoundary::PolydisperseInsertionBoundary(), PossibleContactList::PossibleContactList(), BaseCluster::printTime(), PeriodicBoundaryHandler::processLocalGhostParticles(), PeriodicBoundaryHandler::processLocalInteractionData(), Domain::processReceivedBoundaryParticleData(), PeriodicBoundaryHandler::processReceivedGhostParticleData(), Domain::processReceivedInteractionData(), HGridOptimiser::radius2Cell(), RandomClusterInsertionBoundary::RandomClusterInsertionBoundary(), SubcriticalMaserBoundaryTEST::read(), csvReader::read(), FileReader::read(), InteractionHandler::read(), SuperQuadricParticle::read(), Domain::read(), SubcriticalMaserBoundary::read(), ConstantMassFlowMaserBoundary::read(), Chute::read(), BaseHandler< T >::read(), DPMBase::read(), SpeciesHandler::readAndAddObject(), BoundaryHandler::readAndAddObject(), InteractionHandler::readAndAddObject(), WallHandler::readAndCreateObject(), ParticleHandler::readAndCreateObject(), WallHandler::readAndCreateOldObject(), DPMBase::readArguments(), helpers::readArrayFromCommandLine(), DPMBase::readDataFile(), helpers::readFromCommandLine(), helpers::readFromFile(), DPMBase::readNextArgument(), DPMBase::readNextDataFile(), DPMBase::readNextFStatFile(), SpeciesHandler::readOldObject(), DPMBase::readRestartFile(), WallHandler::readTriangleWall(), helpers::readVectorFromCommandLine(), TriangulatedWall::readVTK(), RegimeSinterInteraction::RegimeSinterInteraction(), PossibleContactList::remove_ParticlePosibleContacts(), ParticleHandler::removeGhostObject(), BaseInteractable::removeInteraction(), BaseHandler< T >::removeLastObject(), ParticleHandler::removeObject(), BaseHandler< T >::removeObject(), DPMBase::removeOldFiles(), CGHandler::restart(), RestrictedWall::RestrictedWall(), LiquidMigrationWilletInteraction::rupture(), Screw::Screw(), ScrewsymmetricIntersectionOfWalls::ScrewsymmetricIntersectionOfWalls(), Domain::sendAndReceiveCount(), PeriodicBoundary::set(), NurbsSurface::set(), StressStrainControlBoundary::set(), InfiniteWall::set(), ChargedBondedSpecies::setAdhesionForceMax(), ReversibleAdhesiveSpecies::setAdhesionForceMax(), ChargedBondedSpecies::setAdhesionStiffness(), ReversibleAdhesiveSpecies::setAdhesionStiffness(), SuperQuadricParticle::setAxesAndExponents(), Chute::setChuteAngle(), Chute::setChuteAngleAndMagnitudeOfGravity(), ChuteWithHopper::setChuteLength(), BaseCluster::setClusterId(), SlidingFrictionSpecies::setCollisionTimeAndNormalAndTangentialRestitutionCoefficient(), LinearViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient(), BaseCluster::setCollisionTimeOverTimeStep(), SinterNormalSpecies::setComplianceZero(), Quaternion::setComponent(), Vec3D::setComponent(), SinterNormalSpecies::setConstantC1(), BaseNormalForce::setConstantRestitution(), LiquidBridgeWilletSpecies::setContactAngle(), ParticleSpecies::setDensity(), SinterNormalSpecies::setDissipation(), LinearPlasticViscoelasticNormalSpecies::setDissipation(), DPMBase::setDomain(), BaseCluster::setDomainLimits(), HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndEffectiveShearModulus(), HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndPoissonRatio(), HertzianViscoelasticNormalSpecies::setEffectiveElasticModulusAndRestitutionCoefficient(), MindlinSpecies::setEffectiveShearModulus(), BaseCluster::setEnergyRatioTolerance(), SuperQuadricParticle::setExponents(), CGFields::OrientationField::setFields(), CGFields::LiquidMigrationFields::setFields(), Chute::setFixedParticleRadius(), PolydisperseInsertionBoundary::setGenerandum(), BaseCG::setH(), ThermalSpecies< NormalForceSpecies >::setHeatCapacity(), ChuteWithHopper::setHopper(), ChuteWithHopper::setHopperShift(), BaseCG::setHX(), BaseCG::setHY(), BaseCG::setHZ(), BaseWall::setIndSpecies(), BaseParticle::setIndSpecies(), Chute::setInflowParticleRadius(), Chute::setInflowVelocity(), Chute::setInflowVelocityVariance(), ReversibleAdhesiveSpecies::setInteractionDistance(), ChargedBondedSpecies::setInteractionDistance(), DomainHandler::setInteractionDistance(), SinterNormalSpecies::setInverseSinterViscosity(), LiquidMigrationWilletSpecies::setLiquidBridgeVolumeMax(), LiquidMigrationWilletSpecies::setLiquidBridgeVolumeMin(), File::setlogarithmicSaveCount(), BaseParticle::setMass(), BaseParticle::setMassForP3Statistics(), DPMBase::setMax(), Chute::setMaxInflowParticleRadius(), DPMBase::setMeanVelocityAndKineticEnergy(), DPMBase::setMin(), Chute::setMinInflowParticleRadius(), File::setName(), PossibleContact::setNextPosition(), DPMBase::setNumberOfDomains(), BaseCluster::setNumberOfInternalStructurePoints(), DPMBase::setNumberOfOMPThreads(), BaseCluster::setNumberOfParticles(), RandomClusterInsertionBoundary::setNumberOfParticlesPerCluster(), SinterNormalSpecies::setParhamiMcKeeping(), DPMBase::setParticleDimensions(), InsertionBoundary::setParticleToCopy(), IntersectionOfWalls::setPointsAndLines(), MindlinSpecies::setPoissonRatio(), FixedClusterInsertionBoundary::setPositionsAndRadii(), PossibleContact::setPreviousPosition(), PSD::setPSDFromCSV(), SphericalWall::setRadius(), SimpleDrumSuperquadrics::setRadius(), SuperQuadricParticle::setRadius(), BaseCluster::setRadiusCluster(), BaseClusterInsertionBoundary::setRadiusMicroParticle(), BaseCluster::setRadiusParticle(), Domain::setRange(), FrictionSpecies::setRollingFrictionCoefficient(), FrictionSpecies::setRollingFrictionCoefficientStatic(), Chute::setRoughBottomType(), SinterNormalSpecies::setSeparationDis(), LevelSetWall::setShapeCube(), LevelSetWall::setShapeCylinder(), LevelSetWall::setShapeDiamond(), LevelSetWall::setShapeFourSided(), LevelSetWall::setShapeSphere(), SinterNormalSpecies::setSinterAdhesion(), SinterNormalSpecies::setSinterForceAndTime(), SinterNormalSpecies::setSinterRate(), SinterNormalSpecies::setSinterType(), BaseCluster::setSizeDispersityParticle(), BaseInteractable::setSpecies(), BaseCluster::setSpecies(), SinterNormalSpecies::setSurfTension(), DPMBase::setSystemDimensions(), ThermalSpecies< NormalForceSpecies >::setThermalConductivity(), ChuteBottom::setThickness(), ThermalParticle::setTimeDependentTemperature(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), ChuteBottom::setupInitialConditions(), Chute::setupInitialConditions(), BaseCluster::setupInitialConditions(), InsertionBoundary::setVariableVolumeFlowRate(), BaseCluster::setVelocityDampingModulus(), DPMBase::setXMax(), DPMBase::setXMin(), DPMBase::setYMax(), DPMBase::setYMin(), DPMBase::setZMax(), DPMBase::setZMin(), SimpleDrumSuperquadrics::SimpleDrumSuperquadrics(), SineWall::SineWall(), SmallMatrix< numberOfRows, numberOfColumns >::SmallMatrix(), SmallVector< numberOfRows >::SmallVector(), DPMBase::solve(), SmallMatrix< numberOfRows, numberOfColumns >::solve(), Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::Species(), SpeciesHandler::SpeciesHandler(), SphericalWall::SphericalWall(), StressStrainControlBoundary::StressStrainControlBoundary(), SubcriticalMaserBoundary::SubcriticalMaserBoundary(), SuperQuadricParticle::SuperQuadricParticle(), transformMercuryToVTK(), TriangulatedWall::TriangulatedWall(), DPMBase::updateGhostGrid(), PeriodicBoundaryHandler::updateMaserParticle(), Domain::updateParticlePosition(), PeriodicBoundaryHandler::updateParticles(), Domain::updateParticles(), PeriodicBoundaryHandler::updateParticleStatus(), MercuryBase::userHGridCellSize(), PSD::validateCumulativeDistribution(), PSD::validateProbabilityDensityDistribution(), DataFiles::write(), Domain::write(), PolydisperseInsertionBoundary::write(), InsertionBoundary::write(), SuperQuadricParticle::writeDebugMessageMiddleOfLoop(), SuperQuadricParticle::writeDebugMessageStep1(), SuperQuadricParticle::writeDebugMessageStep2(), SuperQuadricParticle::writeDebugMessageStep3(), DPMBase::writePythonFileForVTKVisualisation(), DataFiles::writeTimeStep(), LevelSetWall::writeToFile(), helpers::writeToFile(), BaseWall::writeVTK(), WallHandler::writeVTKBoundingBox(), AxisymmetricIntersectionOfWalls::~AxisymmetricIntersectionOfWalls(), BaseBoundary::~BaseBoundary(), BaseCluster::~BaseCluster(), BaseHandler< T >::~BaseHandler(), BaseInteractable::~BaseInteractable(), BaseInteraction::~BaseInteraction(), BaseParticle::~BaseParticle(), BaseSpecies::~BaseSpecies(), BaseWall::~BaseWall(), BasicIntersectionOfWalls::~BasicIntersectionOfWalls(), BasicUnionOfWalls::~BasicUnionOfWalls(), BoundaryHandler::~BoundaryHandler(), ClusterGenerator::~ClusterGenerator(), Coil::~Coil(), CubeDeletionBoundary::~CubeDeletionBoundary(), DeletionBoundary::~DeletionBoundary(), DomainHandler::~DomainHandler(), DropletBoundary::~DropletBoundary(), FileReader::~FileReader(), HeaterBoundary::~HeaterBoundary(), HGrid::~HGrid(), HorizontalBaseScrew::~HorizontalBaseScrew(), HorizontalScrew::~HorizontalScrew(), InfiniteWall::~InfiniteWall(), InteractionHandler::~InteractionHandler(), IntersectionOfWalls::~IntersectionOfWalls(), LevelSetWall::~LevelSetWall(), MercuryBase::~MercuryBase(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::~MixedSpecies(), NurbsWall::~NurbsWall(), ParabolaChute::~ParabolaChute(), ParticleHandler::~ParticleHandler(), PeriodicBoundary::~PeriodicBoundary(), PeriodicBoundaryHandler::~PeriodicBoundaryHandler(), RestrictedWall::~RestrictedWall(), Screw::~Screw(), ScrewsymmetricIntersectionOfWalls::~ScrewsymmetricIntersectionOfWalls(), SimpleDrumSuperquadrics::~SimpleDrumSuperquadrics(), SineWall::~SineWall(), Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::~Species(), SpeciesHandler::~SpeciesHandler(), SphericalWall::~SphericalWall(), SubcriticalMaserBoundaryTEST::~SubcriticalMaserBoundaryTEST(), SuperQuadricParticle::~SuperQuadricParticle(), and TriangulatedWall::~TriangulatedWall().

Declaration of the output functions. If the output needs to be redirected, please swap the loggerOutput pointer to your preferred LoggerOutput instance, and make sure this exists until AFTER an std::exit() invocation. (e.g. clean up with std::atexit())

Definition at line 168 of file Logger.cc.

Referenced by DPMBase::constructor().

LoggerOutput loggerOutputDefaultImpl
Initial value:
printMessage
}
static void printError(std::string module, std::string msg)
Definition: Logger.cc:94
static void printInfo(std::string module, std::string msg)
Definition: Logger.cc:67
static void printMessage(std::string module, std::string msg)
Definition: Logger.cc:80

Definition at line 159 of file Logger.cc.

LL<Log::VERBOSE> VERBOSE

Verbose information.

Information which is not useful to anybody except those looking for weird behaviour and statistics. These should however still be clear in meaning.

Example: Inserted 381 particles in Insertion Boundary #1.

Default behaviour: ignore.

Definition at line 57 of file Logger.cc.

Referenced by NurbsSurface::getDistance(), main(), and BaseHandler< T >::read().

LL<Log::WARN> WARN

Warning log level.

Warning, as in, the program has detected a problem but does know a solution. The simulation can continue with this fix, but the user should look at fixing his / her simulation so this won't occur in the future.

Example: Setting a smaller Xmax than Xmin.

Default behaviour: log to std::cerr, returns afterwards.

Definition at line 54 of file Logger.cc.

Referenced by MPIInteraction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >::copyFromInteraction(), MixedSpecies< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::copyInto(), Species< NormalForceSpecies, FrictionForceSpecies, AdhesiveForceSpecies >::copyInto(), NurbsSurface::getDistance(), helpers::getPath(), helpers::gnuplot(), BaseVTKWriter< H >::makeVTKFileWithHeader(), SmallMatrix< numberOfRows, numberOfColumns >::operator*(), operator*(), helpers::readFromFile(), BaseHandler< T >::removeLastObject(), transformMercuryToVTK(), and helpers::writeToFile().