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

Classes

class  CLiveStatistics< T >
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
53  {
54 
55  if (argc>1&&strcmp(argv[1],"-help")) cout << endl << "Get statistics for " << argv[1] << endl;
56 
57  //check for '-stattype' option
58  StatType T = XYZ;
59  for (int i = 2; i<argc; i++) {
60  if (!strcmp(argv[i],"-stattype")) {
61  if (!strcmp(argv[i+1],"XYZ")) T = XYZ;
62  else if (!strcmp(argv[i+1],"XY")) T = XY;
63  else if (!strcmp(argv[i+1],"XZ")) T = XZ;
64  else if (!strcmp(argv[i+1],"YZ")) T = YZ;
65  else if (!strcmp(argv[i+1],"X")) T = X;
66  else if (!strcmp(argv[i+1],"Y")) T = Y;
67  else if (!strcmp(argv[i+1],"Z")) T = Z;
68  else {cerr << "stattype unknown" << endl; exit(-1);}
69  }
70  }
71  if (T==XY) { // averaging in z-direction
72  cout << "averaging in z-direction" << endl;
73  CLiveStatistics<XY> stats(argc, argv);
74  stats.setDoPeriodicWalls(false);
75  stats.getLiveStatistics();
76  } else if (T==XZ) { // averaging in x-direction
77  cout << "averaging in y-direction" << endl;
78  CLiveStatistics<XZ> stats(argc, argv);
79  stats.setDoPeriodicWalls(false);
80  stats.getLiveStatistics();
81  } else if (T==YZ) { // averaging in x-direction
82  cout << "averaging in x-direction" << endl;
83  CLiveStatistics<YZ> stats(argc, argv);
84  stats.setDoPeriodicWalls(false);
85  stats.getLiveStatistics();
86  } else if (T==X) { // averaging in yz-direction
87  cout << "averaging in yz-direction" << endl;
88  CLiveStatistics<X> stats(argc, argv);
89  stats.setDoPeriodicWalls(false);
90  stats.getLiveStatistics();
91  } else if (T==Y) { // averaging in yz-direction
92  cout << "averaging in xz-direction" << endl;
93  CLiveStatistics<Y> stats(argc, argv);
94  stats.setDoPeriodicWalls(false);
95  stats.getLiveStatistics();
96  } else if (T==Z) { // averaging in yz-direction
97  cout << "averaging in xy-direction" << endl;
98  CLiveStatistics<Z> stats(argc, argv);
99  stats.setDoPeriodicWalls(false);
100  stats.getLiveStatistics();
101  } else { //default: no averaging
102  CLiveStatistics<XYZ> stats(argc, argv);
103  stats.setDoPeriodicWalls(false);
104  stats.getLiveStatistics();
105  }
106  return 0;
107 }
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
Definition: livestatistics.cpp:9
#define X
Definition: icosphere.cpp:20
#define Z
Definition: icosphere.cpp:21
const char Y
Definition: test/EulerAngles.cpp:32