flowRule_restart.cpp File Reference
#include "scr/Chute.h"

Classes

class  Restart
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
37 {
38  //select file name to sestart from
39  string name;
40  if (argc>1) {name=argv[1]; argv++; argc--;} else name="../ini_statistics/H10A22L1M0.5B0.5";
41  //load restart data
42  cout << "restart data: " << name << endl;
43 
44  Restart problem;
45  problem.load_restart_data(name);
46  cout << "new name: " << problem.getName() << endl;
47  //solve
48  problem.setTimeMax(3000);
49  problem.readArguments(argc, argv);
50  if (problem.getTime()>=problem.getTimeMax()) cout << problem.getName() << " already solved" << endl;
51  else {
52  problem.write(std::cout,false);
53  problem.solve();
54  }
55 }
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
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
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:808
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:873
void solve()
The work horse of the code.
Definition: DPMBase.cc:4270
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
Definition: flowRule_restart.cpp:29
std::string name
Definition: MercuryProb.h:48

References DPMBase::getName(), DPMBase::getTime(), DPMBase::getTimeMax(), units::name, DPMBase::readArguments(), DPMBase::setTimeMax(), DPMBase::solve(), and Chute::write().