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"

Go to the source code of this file.


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

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 73 of file

Referenced by DPMBase::constructor().

74 {
75  std::cerr << "A fatal error has occured"
76  << "\n Module :" << module
77  << "\n Message :" << message << std::endl;
79  std::exit(-1);
80 }
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 90 of file

References DPMBase::write().

91 {
92  md.write(os);
93  return os;
94 }
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.