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

Classes

class  CLiveStatistics< T >
 

Functions

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

Function Documentation

◆ main()

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