DPMBase.cc File Reference
#include "DPMBase.h"
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <fstream>
#include <cstdlib>
#include <limits>
#include <string>
#include <cstdio>
#include <cstring>
#include <Species/LinearViscoelasticSlidingFrictionSpecies.h>
#include <Boundaries/CubeInsertionBoundary.h>
#include "Interactions/Interaction.h"
#include "Species/FrictionForceSpecies/SlidingFrictionSpecies.h"
#include "CMakeDefinitions.h"
#include "DPMBaseXBalls.icc"
#include "Logger.h"
#include "Particles/SphericalParticle.h"
#include "Particles/NonSphericalParticle.h"
#include "Walls/BaseWall.h"
#include "Walls/InfiniteWall.h"
#include "Boundaries/PeriodicBoundary.h"
#include "VTKWriter/SuperQuadricParticleVtkWriter.h"
#include "VTKWriter/SphericalParticleVtkWriter.h"
#include "MpiContainer.h"
#include "MpiDataClass.h"
#include "Domain.h"
#include <csignal>

Functions

MERCURYDPM_DEPRECATED void logWriteAndDie (const std::string &module, std::string message)
 todo strcmp relies on this, should be changed to more modern version More...
 
std::ostream & operator<< (std::ostream &os, DPMBase &md)
 

Function Documentation

◆ logWriteAndDie()

MERCURYDPM_DEPRECATED void logWriteAndDie ( const std::string &  module,
std::string  message 
)

todo strcmp relies on this, should be changed to more modern version

Warns the user of a fatal error and exits the program with a non-zero return value to let the compiler know an error has occurred.

Parameters
[in]module
[in]message
Todo:
Why is this here, and not in the logger?
Deprecated:
81 {
82  std::cerr << "A fatal error has occured"
83  << "\n Module :" << module
84  << "\n Message :" << message << std::endl;
85 
86  std::exit(-1);
87 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
DPMBase md 
)

Overloads the insertion operator (<<) for use with Mercury objects. Utilises the write() function (see link for further information).

Parameters
[in]os- The output stream to which we want to 'insert' information relating to Mercury objects
[in]md- An object (passed by reference) of the DPMBase class.
98 {
99 md.write(os);
100 return os;
101 }
virtual void write(std::ostream &os, bool writeAllParticles=true) const
Definition: DPMBase.cc:3541

References DPMBase::write().