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

Classes

class  ChuteRestart
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
42 {
43  if (argc<2) {
44  cout << "Please enter the name of the simulation you want to restart and, optionally, the name of the simulation after restart" << endl;
45  exit(-1);
46  } else {
47  cout << "restart data: " << argv[1] << ".restart" << endl;
48  }
49  ChuteRestart problem;
50  problem.setName(argv[1]);
51  problem.readRestartFile(false);
52  problem.time = problem.getTime();
53  problem.write(std::cout,false);
54  problem.solve(argc-1, argv+1);
55 }
Definition: restartedChute.cpp:31
double time
Definition: restartedChute.cpp:34
void write(std::ostream &os, bool writeAllParticles=true) const override
This function writes the Chute properties to an ostream, and adds the properties of ALL chute particl...
Definition: Chute.cc:206
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:808
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
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 DPMBase::getTime(), DPMBase::readRestartFile(), DPMBase::setName(), DPMBase::solve(), ChuteRestart::time, and Chute::write().