HG-MD
1
|
#include "StatisticsVector.h"
Go to the source code of this file.
Functions | |
void | Statistics (unsigned int argc, char *argv[]) |
this is the function the user should call |
void Statistics | ( | unsigned int | argc, |
char * | argv[] | ||
) |
this is the function the user should call
References O, StatisticsVector< T >::set_periodicWalls(), StatisticsVector< T >::statistics_from_fstat_and_data(), X, XY, XYZ, XZ, Y, YZ, and Z.
{ if (argc>1&&strcmp(argv[1],"-help")) cout << endl << "Get statistics for " << argv[1] << endl; //check for '-stattype' option StatType T = XYZ; for (unsigned int i = 2; i<argc; i++) { if (!strcmp(argv[i],"-stattype")) { if (!strcmp(argv[i+1],"XYZ")) T = XYZ; else if (!strcmp(argv[i+1],"XY")) T = XY; else if (!strcmp(argv[i+1],"XZ")) T = XZ; else if (!strcmp(argv[i+1],"YZ")) T = YZ; else if (!strcmp(argv[i+1],"X")) T = X; else if (!strcmp(argv[i+1],"Y")) T = Y; else if (!strcmp(argv[i+1],"Z")) T = Z; else if (!strcmp(argv[i+1],"O")) T = O; else {cerr << "stattype unknown" << endl; exit(-1);} } } if (T==XY) { // averaging in z-direction cout << "averaging in z-direction" << endl; StatisticsVector<XY> stats(argc, argv); stats.set_periodicWalls(false); stats.statistics_from_fstat_and_data(); } else if (T==XZ) { // averaging in y-direction cout << "averaging in y-direction" << endl; StatisticsVector<XZ> stats(argc, argv); stats.set_periodicWalls(false); stats.statistics_from_fstat_and_data(); } else if (T==YZ) { // averaging in x-direction cout << "averaging in x-direction" << endl; StatisticsVector<YZ> stats(argc, argv); stats.set_periodicWalls(false); stats.statistics_from_fstat_and_data(); } else if (T==X) { // averaging in yz-direction cout << "averaging in yz-direction" << endl; StatisticsVector<X> stats(argc, argv); stats.set_periodicWalls(false); stats.statistics_from_fstat_and_data(); } else if (T==Y) { // averaging in yz-direction cout << "averaging in xz-direction" << endl; StatisticsVector<Y> stats(argc, argv); stats.set_periodicWalls(false); stats.statistics_from_fstat_and_data(); } else if (T==Z) { // averaging in yz-direction cout << "averaging in xy-direction" << endl; StatisticsVector<Z> stats(argc, argv); stats.set_periodicWalls(false); stats.statistics_from_fstat_and_data(); } else { //default: no averaging StatisticsVector<XYZ> stats(argc, argv); stats.statistics_from_fstat_and_data(); } }