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[] 
)
74  {
75 
76  if (argc>1&&strcmp(argv[1],"-help")) cout << endl << "Get statistics for " << argv[1] << endl;
77 
78  //check for '-stattype' option
79  StatType T = XYZ;
80  for (int i = 2; i<argc; i++) {
81  if (!strcmp(argv[i],"-stattype")) {
82  if (!strcmp(argv[i+1],"XYZ")) T = XYZ;
83  else if (!strcmp(argv[i+1],"XY")) T = XY;
84  else if (!strcmp(argv[i+1],"XZ")) T = XZ;
85  else if (!strcmp(argv[i+1],"YZ")) T = YZ;
86  else if (!strcmp(argv[i+1],"X")) T = X;
87  else if (!strcmp(argv[i+1],"Y")) T = Y;
88  else if (!strcmp(argv[i+1],"Z")) T = Z;
89  else {cerr << "stattype unknown" << endl; exit(-1);}
90  }
91  }
92  if (T==XY) { // averaging in z-direction
93  cout << "averaging in z-direction" << endl;
94  CLiveStatistics<XY> stats(argc, argv);
95  stats.setDoPeriodicWalls(false);
96  stats.getLiveStatistics();
97  } else if (T==XZ) { // averaging in x-direction
98  cout << "averaging in y-direction" << endl;
99  CLiveStatistics<XZ> stats(argc, argv);
100  stats.setDoPeriodicWalls(false);
101  stats.getLiveStatistics();
102  } else if (T==YZ) { // averaging in x-direction
103  cout << "averaging in x-direction" << endl;
104  CLiveStatistics<YZ> stats(argc, argv);
105  stats.setDoPeriodicWalls(false);
106  stats.getLiveStatistics();
107  } else if (T==X) { // averaging in yz-direction
108  cout << "averaging in yz-direction" << endl;
109  CLiveStatistics<X> stats(argc, argv);
110  stats.setDoPeriodicWalls(false);
111  stats.getLiveStatistics();
112  } else if (T==Y) { // averaging in yz-direction
113  cout << "averaging in xz-direction" << endl;
114  CLiveStatistics<Y> stats(argc, argv);
115  stats.setDoPeriodicWalls(false);
116  stats.getLiveStatistics();
117  } else if (T==Z) { // averaging in yz-direction
118  cout << "averaging in xy-direction" << endl;
119  CLiveStatistics<Z> stats(argc, argv);
120  stats.setDoPeriodicWalls(false);
121  stats.getLiveStatistics();
122  } else { //default: no averaging
123  CLiveStatistics<XYZ> stats(argc, argv);
124  stats.setDoPeriodicWalls(false);
125  stats.getLiveStatistics();
126  }
127  return 0;
128 }
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
Definition: livestatistics.cpp:30
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51