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[] 
)
191 {
192  //check for '-stattype' option (default Z)
193  StatType T = Z;
194  for (int i = 2; i<argc; i++) {
195  if (!strcmp(argv[i],"-stattype")) {
196  if (!strcmp(argv[i+1],"XYZ")) T = XYZ;
197  else if (!strcmp(argv[i+1],"XY")) T = XY;
198  else if (!strcmp(argv[i+1],"XZ")) T = XZ;
199  else if (!strcmp(argv[i+1],"YZ")) T = YZ;
200  else if (!strcmp(argv[i+1],"X")) T = X;
201  else if (!strcmp(argv[i+1],"Y")) T = Y;
202  else if (!strcmp(argv[i+1],"Z")) T = Z;
203  else if (!strcmp(argv[i+1],"O")) T = O;
204  else {cerr << "stattype unknown" << endl; exit(-1);}
205  }
206  }
207  if (T==XY) { // averaging in z-direction
208  cout << "averaging in z-direction" << endl;
210  stats.run(argc, argv);
211  } else if (T==XZ) { // averaging in y-direction
212  cout << "averaging in y-direction" << endl;
214  stats.run(argc, argv);
215  } else if (T==YZ) { // averaging in x-direction
216  cout << "averaging in x-direction" << endl;
218  stats.run(argc, argv);
219  } else if (T==X) { // averaging in yz-direction
220  cout << "averaging in yz-direction" << endl;
222  stats.run(argc, argv);
223  } else if (T==Y) { // averaging in yz-direction
224  cout << "averaging in xz-direction" << endl;
226  stats.run(argc, argv);
227  } else if (T==Z) { // averaging in yz-direction
228  cout << "averaging in xy-direction" << endl;
230  stats.run(argc, argv);
231  } else { //default: no averaging
232  cout << "no averaging" << endl;
234  stats.run(argc, argv);
235  }
236 }
StatType
Creates averaged statistics (only valid if density field is homogenous along averaged direction)
Definition: StatisticsVector.h:41
@ XY
Definition: StatisticsVector.h:42
@ XZ
Definition: StatisticsVector.h:42
@ YZ
Definition: StatisticsVector.h:42
@ Y
Definition: StatisticsVector.h:42
@ X
Definition: StatisticsVector.h:42
@ Z
Definition: StatisticsVector.h:42
@ XYZ
Definition: StatisticsVector.h:42
@ O
Definition: StatisticsVector.h:42
Definition: statXY.cpp:30
void run(int argc, char *argv[])
Definition: obsolete_codes/statistics_while_running.cpp:36
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51