Go to the source code of this file.
void Statistics |
( |
unsigned int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
this is the function the user should call
Definition at line 31 of file Statistics.h.
References A, AZ, O, R, RA, RAZ, RZ, StatisticsVector< T >::set_periodicWalls(), StatisticsVector< T >::statistics_from_fstat_and_data(), X, XY, XYZ, XZ, Y, YZ, and Z.
33 if (argc>1&&strcmp(argv[1],
"-help")) std::cout << std::endl <<
"Get statistics for " << argv[1] << std::endl;
37 for (
unsigned int i = 2; i<argc; i++) {
38 if (!strcmp(argv[i],
"-stattype")) {
39 if (!strcmp(argv[i+1],
"XYZ")) T =
XYZ;
40 else if (!strcmp(argv[i+1],
"RAZ")) T =
RAZ;
41 else if (!strcmp(argv[i+1],
"RA")) T =
RA;
42 else if (!strcmp(argv[i+1],
"RZ")) T =
RZ;
43 else if (!strcmp(argv[i+1],
"AZ")) T =
AZ;
44 else if (!strcmp(argv[i+1],
"R")) T =
R;
45 else if (!strcmp(argv[i+1],
"A")) T =
A;
46 else if (!strcmp(argv[i+1],
"XY")) T =
XY;
47 else if (!strcmp(argv[i+1],
"XZ")) T =
XZ;
48 else if (!strcmp(argv[i+1],
"YZ")) T =
YZ;
49 else if (!strcmp(argv[i+1],
"X")) T =
X;
50 else if (!strcmp(argv[i+1],
"Y")) T =
Y;
51 else if (!strcmp(argv[i+1],
"Z")) T =
Z;
52 else if (!strcmp(argv[i+1],
"O")) T =
O;
53 else {std::cerr <<
"stattype unknown" << std::endl; exit(-1);}
57 std::cout <<
"averaging in z-direction" << std::endl;
59 stats.set_periodicWalls(
false);
60 stats.statistics_from_fstat_and_data();
62 std::cout <<
"averaging in y-direction" << std::endl;
64 stats.set_periodicWalls(
false);
65 stats.statistics_from_fstat_and_data();
67 std::cout <<
"averaging in y-direction" << std::endl;
69 stats.set_periodicWalls(
false);
70 stats.statistics_from_fstat_and_data();
72 std::cout <<
"averaging in x-direction" << std::endl;
74 stats.set_periodicWalls(
false);
75 stats.statistics_from_fstat_and_data();
77 std::cout <<
"averaging in yz-direction" << std::endl;
79 stats.set_periodicWalls(
false);
80 stats.statistics_from_fstat_and_data();
82 std::cout <<
"averaging in xz-direction" << std::endl;
84 stats.set_periodicWalls(
false);
85 stats.statistics_from_fstat_and_data();
87 std::cout <<
"averaging in xy-direction" << std::endl;
89 stats.set_periodicWalls(
false);
90 stats.statistics_from_fstat_and_data();
92 std::cout <<
"averaging in xyz-direction" << std::endl;
94 stats.set_periodicWalls(
false);
95 stats.statistics_from_fstat_and_data();
97 std::cout <<
"cylindrical, no averaging" << std::endl;
99 stats.statistics_from_fstat_and_data();
101 std::cout <<
"cylindrical, Z averaging" << std::endl;
103 stats.statistics_from_fstat_and_data();
105 std::cout <<
"cylindrical, A averaging" << std::endl;
107 stats.statistics_from_fstat_and_data();
109 std::cout <<
"cylindrical, R averaging" << std::endl;
111 stats.statistics_from_fstat_and_data();
113 std::cout <<
"cylindrical, RZ averaging" << std::endl;
115 stats.statistics_from_fstat_and_data();
117 std::cout <<
"cylindrical, AZ averaging" << std::endl;
119 stats.statistics_from_fstat_and_data();
121 std::cout <<
"no averaging" << std::endl;
123 stats.statistics_from_fstat_and_data();
StatType
Creates averaged statistics (only valid if density field is homogenous along averaged direction) ...
This class is used to extract statistical data from MD simulations.