MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ParticleAnalytics2Mercury.cpp File Reference
#include <iostream>
#include <fstream>
#include <Logger.h>
#include <Species/LinearViscoelasticSpecies.h>
#include <Species/LinearViscoelasticReversibleAdhesiveSpecies.h>
#include <Walls/InfiniteWall.h>
#include "Mercury3D.h"

Go to the source code of this file.

Classes

class  FileReader
 This gives functionality to read information from binary formats like STL etc. This class is complete stand-alone and is tested with one any reference to other MecuryDPM code except Vections and Logger. More...
 

Functions

int main (int argc, char **argv)
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 250 of file ParticleAnalytics2Mercury.cpp.

References FATAL, logger, FileReader::read(), and helpers::writeToFile().

251 {
252  helpers::writeToFile("XRT","xrt");
253 
254  //Check to see if we actually received two arguments
255  if (argc < 2) {
256  //We didn't. Print a usage and exit the program.
257  logger(FATAL,"This program converts Particle Analytics (.p3* or p4*) to MercuryDPM files.\n"
258  //"These file can then be used in MercuryCG to analyse your data.\n"
259  "Usage: Call the executable with the base name as argument.\n"
260  "E.g. to convert name.p* call\n"
261  " ./ParticleAnalytics2Mercury name\n", argv[0]);
262  }
263  FileReader fileReader(argv[1]);
264  while (fileReader.read());
265 
266 }
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: Helpers.cc:445
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here...
This gives functionality to read information from binary formats like STL etc. This class is complete...
LL< Log::FATAL > FATAL
Definition of the different loglevels by its wrapper class LL. These are used as tags in template met...
Definition: Logger.cc:52