MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages 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>

Go to the source code of this file.


MERCURY_DEPRECATED[[noreturn]] 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

MERCURY_DEPRECATED [[noreturn]] 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.

Why is this here, and not in the logger?

Definition at line 79 of file

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

[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.

Definition at line 96 of file

References DPMBase::write().

97 {
98  md.write(os);
99  return os;
100 }
virtual void write(std::ostream &os, bool writeAllParticles=true) const
Loads all MD data and plots statistics for all time steps in the .data file.