obsolete_codes/statistics_while_running.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[] 
)
170 {
171  //check for '-stattype' option (default Z)
172  StatType T = Z;
173  for (int i = 2; i<argc; i++) {
174  if (!strcmp(argv[i],"-stattype")) {
175  if (!strcmp(argv[i+1],"XYZ")) T = XYZ;
176  else if (!strcmp(argv[i+1],"XY")) T = XY;
177  else if (!strcmp(argv[i+1],"XZ")) T = XZ;
178  else if (!strcmp(argv[i+1],"YZ")) T = YZ;
179  else if (!strcmp(argv[i+1],"X")) T = X;
180  else if (!strcmp(argv[i+1],"Y")) T = Y;
181  else if (!strcmp(argv[i+1],"Z")) T = Z;
182  else if (!strcmp(argv[i+1],"O")) T = O;
183  else {cerr << "stattype unknown" << endl; exit(-1);}
184  }
185  }
186  if (T==XY) { // averaging in z-direction
187  cout << "averaging in z-direction" << endl;
189  stats.run(argc, argv);
190  } else if (T==XZ) { // averaging in y-direction
191  cout << "averaging in y-direction" << endl;
193  stats.run(argc, argv);
194  } else if (T==YZ) { // averaging in x-direction
195  cout << "averaging in x-direction" << endl;
197  stats.run(argc, argv);
198  } else if (T==X) { // averaging in yz-direction
199  cout << "averaging in yz-direction" << endl;
201  stats.run(argc, argv);
202  } else if (T==Y) { // averaging in yz-direction
203  cout << "averaging in xz-direction" << endl;
205  stats.run(argc, argv);
206  } else if (T==Z) { // averaging in yz-direction
207  cout << "averaging in xy-direction" << endl;
209  stats.run(argc, argv);
210  } else { //default: no averaging
211  cout << "no averaging" << endl;
213  stats.run(argc, argv);
214  }
215 }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
StatType
Creates averaged statistics (only valid if density field is homogenous along averaged direction)
Definition: StatisticsVector.h:20
@ XY
Definition: StatisticsVector.h:21
@ XZ
Definition: StatisticsVector.h:21
@ YZ
Definition: StatisticsVector.h:21
@ XYZ
Definition: StatisticsVector.h:21
@ O
Definition: StatisticsVector.h:21
Definition: statXY.cpp:9
void run(int argc, char *argv[])
Definition: obsolete_codes/statistics_while_running.cpp:15
#define X
Definition: icosphere.cpp:20
#define Z
Definition: icosphere.cpp:21
const char Y
Definition: test/EulerAngles.cpp:32