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