revision: v0.14
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 "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

MERCURY_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()

MERCURY_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:
80 {
81  std::cerr << "A fatal error has occured"
82  << "\n Module :" << module
83  << "\n Message :" << message << std::endl;
84 
85  std::exit(-1);
86 }

◆ 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.
97 {
98  md.write(os);
99  return os;
100 }

References DPMBase::write().

DPMBase::write
virtual void write(std::ostream &os, bool writeAllParticles=true) const
Definition: DPMBase.cc:3409