snapshot.cpp File Reference
#include <iostream>
#include "Chute.h"

Classes

class  ChutePeriodic
 

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
56 {
57  if (argc < 2)
58  {
59  logger(ERROR, "snapshot.exe problemname [args]");
60  }
61  else
62  {
63  logger(INFO, "restart data: %.restart", argv[1]);
64  }
65  ChutePeriodic problem;
66  problem.setName(argv[1]);
67  problem.readRestartFile();
68  problem.writeToLocalFolder();
69  problem.setXBallsScale(1.7 / problem.getZMax());
70  //problem.setXBallsColourMode(10);
72  "-v0 -solidf -h 900 -w 1450 -o 120 -noborder 4 -rgbb 60 -rgbg 60 -rgbr 60 -rgbs 90");
73  problem.readArguments(argc - 1, argv + 1);
74  problem.solve();
75 
76  std::stringstream command("");
77  command << "./" << problem.getName() << ".disp -of " << problem.getName() << ".pdf -die";
78  int out = system(command.str().c_str());
79  logger(INFO, "The return value by system =%", out);
80 
81 }
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
Definition: chute_periodic_autorun.cpp:37
void writeToLocalFolder()
Definition: snapshot.cpp:45
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
const std::string & getName() const
Returns the name of the file. Does not allow to change it though.
Definition: DPMBase.cc:399
bool readArguments(int argc, char *argv[])
Can interpret main function input arguments that are passed by the driver codes.
Definition: DPMBase.cc:4391
void setXBallsAdditionalArguments(std::string newXBArgs)
Set the additional arguments for xballs.
Definition: DPMBase.cc:1347
void setXBallsScale(Mdouble newScale)
Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs....
Definition: DPMBase.cc:1363
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:650
bool readRestartFile(ReadOptions opt=ReadOptions::ReadAll)
Reads all the particle data corresponding to a given, existing . restart file (for more details regar...
Definition: DPMBase.cc:3006

References ERROR, DPMBase::getName(), DPMBase::getZMax(), INFO, logger, DPMBase::readArguments(), DPMBase::readRestartFile(), DPMBase::setName(), DPMBase::setXBallsAdditionalArguments(), DPMBase::setXBallsScale(), DPMBase::solve(), and ChutePeriodic::writeToLocalFolder().