FreeFallRestart.cpp File Reference

Classes

class  FreeFall
 This code is a example on how to write a restartable mercury code. More...
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Start off my solving the default problem

64 {
66  FreeFall dpm;
67 
68  //set FreeFall-specific parameters here
69  dpm.setName("FreeFallRestart");
70  dpm.setSaveCount(1000);
71  dpm.setTimeStep(1e-6);
72  dpm.setTimeMax(0.5);
73  dpm.setDomain(Vec3D(-1e-3,-1e-3,0e-3),Vec3D(1e-3,1e-3,10e-3));
74  dpm.setGravity(Vec3D(0,0,-9.8));
75 
76  //restart and run until final time 1, using command line arguments:
77  // ./freeFallRestart -r -tmax 1
78  dpm.solve(argc,argv);
79  return 0;
80 }
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:408
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1098
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:422
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1234
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
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1383
This code is a example on how to write a restartable mercury code.
Definition: FreeFallRestart.cpp:31
Definition: Vector.h:51

References DPMBase::setDomain(), DPMBase::setGravity(), DPMBase::setName(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::setTimeStep(), and DPMBase::solve().