statistics_while_running_XZ.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[] 
)
46 {
47  //select file name to restart from
48  string name;
49  if (argc>1) {name=argv[1]; argv++; argc--;} else name="../ini_statistics/H10A22L1M0.5B0.5";
50  //select time interval
51  Mdouble tint=.2;
52  if (argc>1) {tint=atof(argv[1]); argv++; argc--; cout << "tint=" << tint << endl;}
53  argv--; argc++;
54  //load restart data
55  cout << "restart data: " << name << ".restart" << endl;
57  problem.setName(name.c_str());
58  problem.load_restart_data();
59  problem.restartFile.setFileType(FileType::ONE_FILE);
60  problem.writeRestartFile();
61  problem.auto_set_z();
62  //keep file name but create files in the local directory, i.e. remove folder
63  cout << "old name: " << problem.getName() << endl;
64  size_t found=name.find_last_of("/\\");
65  problem.setName(name.substr(found+1).c_str());
66  cout << "new name: " << problem.getName() << endl;
67  //set output to minimum
68  problem.dataFile.setFileType(FileType::NO_FILE);
69  problem.restartFile.setFileType(FileType::NO_FILE);
70  problem.fStatFile.setFileType(FileType::NO_FILE);
71  problem.eneFile.setFileType(FileType::ONE_FILE);
72  //set statistical parameters
73  problem.setDoPeriodicWalls(false);
74  //~ problem.setZMinStat(-1);
75  problem.setNX(50);
76  problem.setNZ(10);
77  problem.setCGWidth(.1);
78  problem.setSaveCount(25);
79  problem.set_infiniteStressForFixedParticles(true);
80  problem.setCGTimeMin(problem.getTime());
81  problem.setTimeMax(problem.getTime()+tint);
82  //solve and create live statistics
83  problem.readStatArguments(argc, argv);
84  problem.write(std::cout,false);
85  problem.solve();
86 }
@ 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