#include <Math/Helpers.h>
#include "DPMBase.h"
Go to the source code of this file.
int main |
( |
int argc |
UNUSED, |
|
|
char *argv[] |
UNUSED |
|
) |
| |
This code tests if the old restart format can still be read.
The resulting simulation should be equivalent to 1Particle4WallsRestartUnitTest.
Definition at line 30 of file 1Particle4WallsOldRestartVersionUnitTest.cpp.
References DPMBase::readRestartFile(), DPMBase::setAppend(), Files::setName(), DPMBase::solve(), DPMBase::writeRestartFile(), and helpers::writeToFile().
35 "name 1Particle4WallsOldRestartVersionUnitTest\n"
36 "xmin 0 xmax 1 ymin 0 ymax 1.1 zmin 0 zmax 1\n"
37 "dt 0.0001 t 0 tmax 0.01 save_count_data 5 save_count_ene 5 save_count_stat 5 save_count_fstat 5\n"
38 "dim 3 gravity 0 0 0\n"
39 "options_fstat 1 options_data 1 options_ene 1 options_restart 1\n"
41 "k 200000 disp 50 kt 57142.857 dispt 0 mu 0.5 rho 1.9098593 dim_particle 3\n"
42 "k 200000 disp 50 kt 57142.857 dispt 0 mu 0.5 rho 1.9098593 dim_particle 3\n"
43 "k 200000 disp 50 kt 57142.857 dispt 0 mu 0.5 (mixed)\n"
45 "numFiniteWalls 0 normal -1 0 0 position 0\n"
46 "numFiniteWalls 0 normal 1 0 0 position .96\n"
47 "numFiniteWalls 0 normal 0 0 -1 position 0\n"
48 "numFiniteWalls 0 normal 0 0 1 position .96\n"
50 "normal 0 1 0 pos_left 0 pos_right 1.1 shift 0 1.1 0\n"
52 "0.48 0 0.48 0 0 0 0.5 0 0 0 0 60 0 1 10 0\n"
53 "NUM_BUCKETS 16 HGRID_MAX_LEVELS 1 MIN_CELL_SIZE 1 SPHERE_TO_CELL_RATIO 1 CELL_TO_CELL_RATIO 2\n"
54 "FixedParticleRadius 0.5 MinInflowParticleRadius 0.5 MaxInflowParticleRadius 0.5\n"
55 "RandomizedBottom 2 ChuteAngle 20 max_failed 1 num_created 2000\n"
56 "InflowVelocity 0.1 InflowVelocityVariance 0 InflowHeight 10\n"
59 problem.
setName(
"1Particle4WallsOldRestartVersionUnitTest");
bool writeToFile(std::string filename, std::string filecontent)
Writes a string to a file.
void solve()
The work horse of the code.
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
void setAppend(bool newAppendFlag)
Allows to set the append option.
int readRestartFile()
Reads all the particle data corresponding to the current saved time step. Which is what the restart f...
void setName(const std::string &name)
Allows to set the name of all the files (ene, data, fstat, restart, stat)
virtual void writeRestartFile()
Stores all the particle data for current save time step. Calls the write function.