MercuryDPM  Alpha
 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 245 of file ParticleAnalytics2Mercury.cpp.

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

246 {
247  helpers::writeToFile("XRT","xrt");
248 
249  //Check to see if we actually received two arguments
250  if (argc < 2) {
251  //We didn't. Print a usage and exit the program.
252  logger(FATAL,"This program converts Particle Analytics (.p3* or p4*) to MercuryDPM files.\n"
253  //"These file can then be used in MercuryCG to analyse your data.\n"
254  "Usage: Call the executable with the base name as argument.\n"
255  "E.g. to convert name.p* call\n"
256  " ./ParticleAnalytics2Mercury name\n", argv[0]);
257  }
258  FileReader fileReader(argv[1]);
259  while (fileReader.read());
260 
261 }
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
Definition: Helpers.cc:418
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:50