statistics_while_running.cpp File Reference
#include "Chute.h"
#include "StatisticsVector.h"

Classes

class  statistics_while_running< T >
 

Functions

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

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
210 {
211  //check for '-stattype' option (default Z)
212  StatType T = Z;
213  for (int i = 2; i<argc; i++) {
214  if (!strcmp(argv[i],"-stattype")) {
215  if (!strcmp(argv[i+1],"XYZ")) T = XYZ;
216  else if (!strcmp(argv[i+1],"XY")) T = XY;
217  else if (!strcmp(argv[i+1],"XZ")) T = XZ;
218  else if (!strcmp(argv[i+1],"YZ")) T = YZ;
219  else if (!strcmp(argv[i+1],"X")) T = X;
220  else if (!strcmp(argv[i+1],"Y")) T = Y;
221  else if (!strcmp(argv[i + 1], "Z")) T = Z;
222  else if (!strcmp(argv[i + 1], "O")) T = O;
223  else
224  {
225  logger(ERROR, "stattype unknown");
226  }
227  }
228  }
229  if (T==XY) { // averaging in z-direction
230  logger(INFO, "averaging in z-direction");
232  stats.run(argc, argv);
233  } else if (T==XZ) { // averaging in y-direction
234  logger(INFO, "averaging in y-direction");
236  stats.run(argc, argv);
237  } else if (T==YZ) { // averaging in x-direction
238  logger(INFO, "averaging in x-direction");
240  stats.run(argc, argv);
241  } else if (T==X) { // averaging in yz-direction
242  logger(INFO, "averaging in yz-direction");
244  stats.run(argc, argv);
245  } else if (T==Y) { // averaging in yz-direction
246  logger(INFO, "averaging in xz-direction");
248  stats.run(argc, argv);
249  } else if (T==Z) { // averaging in yz-direction
250  logger(INFO, "averaging in xy-direction");
252  stats.run(argc, argv);
253  } else if (T==O) { // averaging in yz-direction
254  logger(INFO, "averaging in all directions");
256  stats.run(argc, argv);
257  } else { //default: no averaging
258  logger(INFO, "no averaging <XYZ>");
260  stats.run(argc, argv);
261  }
262 }
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
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