statistics_while_running_XY.cpp File Reference
#include "scr/Chute.h"
#include "scr/StatisticsVector.h"

Classes

class  statistics_while_running< T >
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
55 {
56  //select file name to restart from
57  string name;
58  if (argc>1) {name=argv[1]; argv++; argc--;} else name="../ini_statistics/H10A22L1M0.5B0.5";
59  //select time interval
60  Mdouble tint=.2;
61  if (argc>1) {tint=atof(argv[1]); argv++; argc--; cout << "tint=" << tint << endl;}
62  argv--; argc++;
63  //load restart data
64  cout << "restart data: " << name << ".restart" << endl;
66  problem.setName(name.c_str());
67  problem.load_restart_data();
68  //problem.setRestarted(false);
69  problem.restartFile.setFileType(FileType::ONE_FILE);
70  problem.writeRestartFile();
71  //problem.auto_set_z();
72  //keep file name but create files in the local directory, i.e. remove folder
73  cout << "old name: " << problem.getName() << endl;
74  size_t found=name.find_last_of("/\\");
75  problem.setName(name.substr(found+1).c_str());
76  cout << "new name: " << problem.getName() << endl;
77  //set output to minimum
78  problem.dataFile.setFileType(FileType::NO_FILE);
79  problem.restartFile.setFileType(FileType::NO_FILE);
80  problem.fStatFile.setFileType(FileType::NO_FILE);
81  problem.eneFile.setFileType(FileType::ONE_FILE);
82  //set statistical parameters
83  problem.setDoPeriodicWalls(false);
84  //~ problem.setZMinStat(-1);
85  problem.setNX(50);
86  problem.setNY(10);
87  problem.setCGWidth(.1);
88  problem.setSaveCount(25);
89  //problem.set_infiniteStressForFixedParticles(true);
90  problem.setCGTimeMin(problem.getTime());
91  problem.setTimeMax(problem.getTime()+tint);
92  //solve and create live statistics
93  problem.readStatArguments(argc, argv);
94  problem.solve();
95 }
@ NO_FILE
file will not be created/read
@ ONE_FILE
all data will be written into/ read from a single file called name_
Definition: statXY.cpp:9
bool found
Definition: MergeRestartFiles.py:24
string name
Definition: plotDoE.py:33
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213