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

42 {
44  FreeFall dpm;
45 
46  //set FreeFall-specific parameters here
47  dpm.setName("FreeFallRestart");
48  dpm.setSaveCount(1000);
49  dpm.setTimeStep(1e-6);
50  dpm.setTimeMax(0.5);
51  dpm.setDomain(Vec3D(-1e-3,-1e-3,0e-3),Vec3D(1e-3,1e-3,10e-3));
52  dpm.setGravity(Vec3D(0,0,-9.8));
53 
54  //restart and run until final time 1, using command line arguments:
55  // ./freeFallRestart -r -tmax 1
56  dpm.solve(argc,argv);
57  return 0;
58 }
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void setSaveCount(unsigned int saveCount)
Sets File::saveCount_ for all files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:386
void setDomain(const Vec3D &min, const Vec3D &max)
Sets the minimum coordinates of the problem domain.
Definition: DPMBase.cc:1089
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
Definition: DPMBase.cc:400
void setTimeStep(Mdouble newDt)
Sets a new value for the simulation time step.
Definition: DPMBase.cc:1225
void setTimeMax(Mdouble newTMax)
Sets a new value for the maximum simulation duration.
Definition: DPMBase.cc:864
void solve()
The work horse of the code.
Definition: DPMBase.cc:4334
void setGravity(Vec3D newGravity)
Sets a new value for the gravitational acceleration.
Definition: DPMBase.cc:1374
This code is a example on how to write a restartable mercury code.
Definition: FreeFallRestart.cpp:9
Definition: Kernel/Math/Vector.h:30

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