#include <iostream>
#include <iomanip>
#include <string.h>
#include <stdlib.h>
#include <sstream>
#include "StatisticsVector.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
| This code (p3dstatistics.cpp) can be used to create statistics from p3d files. More...
|
|
int main |
( |
int argc |
, |
|
|
char * |
argv[] |
|
) |
| |
This code (p3dstatistics.cpp) can be used to create statistics from p3d files.
It is a modified version of fstatistics.cpp
Definition at line 35 of file p3statistics.cpp.
References A, AZ, O, R, RA, RAZ, RZ, StatisticsVector< T >::setDoPeriodicWalls(), StatisticsVector< T >::statistics_from_p3(), X, XY, XYZ, XZ, Y, YZ, and Z.
37 if (argc>1&&strcmp(argv[1],
"-help")) std::cout << std::endl <<
"Get statistics for " << argv[1] << std::endl;
41 for (
int i = 2; i<argc; i++) {
42 if (!strcmp(argv[i],
"-stattype")) {
43 if (!strcmp(argv[i+1],
"XYZ")) T =
XYZ;
44 else if (!strcmp(argv[i+1],
"RAZ")) T =
RAZ;
45 else if (!strcmp(argv[i+1],
"RA")) T =
RA;
46 else if (!strcmp(argv[i+1],
"RZ")) T =
RZ;
47 else if (!strcmp(argv[i+1],
"AZ")) T =
AZ;
48 else if (!strcmp(argv[i+1],
"R")) T =
R;
49 else if (!strcmp(argv[i+1],
"A")) T =
A;
50 else if (!strcmp(argv[i+1],
"YZ")) T =
YZ;
51 else if (!strcmp(argv[i+1],
"XZ")) T =
XZ;
52 else if (!strcmp(argv[i+1],
"XY")) T =
XY;
53 else if (!strcmp(argv[i+1],
"X")) T =
X;
54 else if (!strcmp(argv[i+1],
"Y")) T =
Y;
55 else if (!strcmp(argv[i+1],
"Z")) T =
Z;
56 else if (!strcmp(argv[i+1],
"O")) T =
O;
57 else {std::cerr <<
"stattype unknown" << std::endl; exit(-1);}
61 std::cout <<
"averaging in z-direction" << std::endl;
63 stats.setDoPeriodicWalls(
false);
64 stats.statistics_from_p3();
66 std::cout <<
"averaging in y-direction" << std::endl;
68 stats.setDoPeriodicWalls(
false);
69 stats.statistics_from_p3();
71 std::cout <<
"averaging in x-direction" << std::endl;
73 stats.setDoPeriodicWalls(
false);
74 stats.statistics_from_p3();
76 std::cout <<
"averaging in yz-direction" << std::endl;
78 stats.setDoPeriodicWalls(
false);
79 stats.statistics_from_p3();
81 std::cout <<
"averaging in xz-direction" << std::endl;
83 stats.setDoPeriodicWalls(
false);
84 stats.statistics_from_p3();
86 std::cout <<
"averaging in xy-direction" << std::endl;
88 stats.setDoPeriodicWalls(
false);
89 stats.statistics_from_p3();
91 std::cout <<
"averaging in xyz-direction" << std::endl;
93 stats.setDoPeriodicWalls(
false);
94 stats.statistics_from_p3();
120 std::cout <<
"no averaging" << std::endl;
122 std::cout <<
"stats" << std::endl;
123 stats.statistics_from_p3();
124 }
else {std::cerr <<
"stattype not found" << std::endl; exit(-1); }
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.