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 244 of file ParticleAnalytics2Mercury.cpp.

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

245 {
246  helpers::writeToFile("XRT","xrt");
247 
248  //Check to see if we actually received two arguments
249  if (argc < 2) {
250  //We didn't. Print a usage and exit the program.
251  logger(FATAL,"This program converts Particle Analytics (.p3* or p4*) to MercuryDPM files.\n"
252  //"These file can then be used in MercuryCG to analyse your data.\n"
253  "Usage: Call the executable with the base name as argument.\n"
254  "E.g. to convert name.p* call\n"
255  " ./ParticleAnalytics2Mercury name\n", argv[0]);
256  }
257  FileReader fileReader(argv[1]);
258  while (fileReader.read());
259 
260 }
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: Helpers.cc:446
Logger< MERCURY_LOGLEVEL > logger("MercuryKernel")
This gives functionality to read information from binary formats like STL etc. This class is complete...
LL< Log::FATAL > FATAL
Fatal log level.
Definition: Logger.cc:52