26 #ifndef STATISTICSVECTOR_H
27 #define STATISTICSVECTOR_H
40 O,
X,
Y,
Z,
XY,
XZ,
YZ,
XYZ,
RAZ,
RZ,
AZ,
RA,
R,
A
160 std::cerr <<
"Warning in set_nz: dimension less than 3" << std::endl;
296 void setN(
int nx_,
int ny_,
int nz_)
303 void getN(
int& nx_,
int& ny_,
int& nz_)
328 return std::sqrt(
w2);
814 CGPolynomial.set_polynomial(new_coefficients, num_coeff, new_dim);
967 std::vector<StatisticsPoint<T> >
dx;
971 std::vector<StatisticsPoint<T> >
dy;
975 std::vector<StatisticsPoint<T> >
dz;
1220 #include "StatisticsPoint.hcc"
1221 #include "StatisticsVector.hcc"
StatisticsVector()
Basic constructor only calls constructor()
void readStatArguments(int argc, char *argv[])
bool periodicWalls
Turns off periodic walls before evaluation (needed for averaging, because we do not yet check if part...
Vec3D VelocityProfile_Min
void gather_force_statistics_from_fstat_and_data()
std::vector< StatisticsPoint< T > > dyTimeAverage
a vector used to sum up all statistical gradients in dy for time-averaging
void setPolynomialName(const char *new_name)
void getN(int &nx_, int &ny_, int &nz_)
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
Vec3D P2
Position of second contact point.
bool walls
Turns off walls before evaluation.
StatType statType
Possible values X,Y,Z,XY,XZ,YZ,XYZ,RAZ,RA,RZ,AZ,R,A are used to determine if the statistics are avera...
bool check_current_time_for_statistics()
void setXMinStat(Mdouble xMinStat_)
Vec3D P1_P2_TangentialTraction
Traction from tangential forces at contact of flow with fixed particles or walls. ...
void initialiseStatistics()
Initializes statistics, i.e. setting w2, setting the grid and writing the header lines in the ...
void setNTimeAverageReset(int new_)
StatType
Creates averaged statistics (only valid if density field is homogenous along averaged direction) ...
void write_time_average_statistics()
Writes out time averaged statistics.
unsigned int getSystemDimensions() const
Returns the dimension of the simulation. Note there is also a particle dimension. ...
Mdouble getCGTimeAveragingInterval()
void processStatistics(bool usethese)
Processes all gathered statistics and resets them afterwards. (Processing means either calculating ti...
Mdouble evaluatePolynomialGradient(Mdouble r)
bool satisfiesInclusionCriteria(BaseParticle *P)
Mdouble w_over_rmax
if w is not set manually then w will be set by multiplying this value by the largest particle radius ...
void setMirrorAtDomainBoundary(Mdouble new_)
std::vector< Vec3D > VelocityProfile
Mdouble getMirrorAtDomainBoundary()
std::vector< StatisticsPoint< T > > dz
A vector that stores the gradient in z of all statistical variables at a given position.
Mdouble cutoff
The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polyn...
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax...
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
void gather_force_statistics_from_p3w(int version, std::vector< int > &index)
std::vector< StatisticsPoint< T > > dy
A vector that stores the gradient in y of all statistical variables at a given position.
Mdouble getCGWidth_over_rmax()
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
void constructor()
this is the actual constructor, sets up all basic things
bool loadPositions(const char *filename)
StatisticsVector(std::string name)
void setDoVariance(bool new_)
Vec3D P1
Position of first contact point.
bool loadVelocityProfile(const char *filename)
Mdouble w2
coarse graining width squared; for HeavisideSphere and Gaussian
Mdouble getXMinStat()
Functions to acces and change the domain of statistics.
void write_statistics()
Writes regular statistics.
bool readNextDataFile(unsigned int format)
Mdouble P1_P2_Dissipation
not yet working
std::string getPolynomialName()
void setCGShape(const char *new_)
std::vector< StatisticsPoint< T > > dx
A vector that stores the gradient in x of all statistical variables at a given position.
Mdouble P1_P2_distance
Length of contact line.
void setStepSize(unsigned int stepSize)
void set_infiniteStressForFixedParticles(bool new_)
void evaluate_wall_force_statistics(Vec3D P, int wp=0)
void setStressTypeForFixedParticles(int new_)
void setDoGradient(bool new_)
T square(T val)
squares a number
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
Mdouble tIntStat
Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat.
void setZMinStat(Mdouble zMinStat_)
Mdouble evaluatePolynomial(Mdouble r)
void setCGTimeMin(Mdouble t)
bool read_next_from_p3p_file()
CG
enum used to store the type of coarse-graining function used
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
bool getDoPeriodicWalls()
void setYMaxStat(Mdouble yMaxStat_)
int nTimeAverage
A counter needed to average over time.
void setDoPeriodicWalls(bool new_)
Mdouble getCGWidthSquared()
void setCGWidth2(Mdouble new_)
Set CG variables w2 and CG_invvolume.
int nTimeAverageReset
Determines after how many timesteps the time average is reset.
std::vector< StatisticsPoint< T > > dxTimeAverage
a vector used to sum up all statistical gradients in dx for time-averaging
std::vector< Vec3D > positions_
std::vector< StatisticsPoint< T > > dzTimeAverage
a vector used to sum up all statistical gradients in dz for time-averaging
std::string prIntStat()
Outputs member variable values to a std::string.
Mdouble indSpecies
defines the species for which statistics are extracted (-1 for all species)
void evaluate_force_statistics(int wp=0)
void statistics_from_p3()
Mdouble tMinStat
Statistical output will only be created if t>tMinStat.
Mdouble rmin
defines the minimum radius of the particles for which statistics are extracted
Vec3D getVelocityProfile(Vec3D Position)
void set_rmax(Mdouble new_)
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
std::vector< StatisticsPoint< T > > getCGPoints()
void setIndSpecies(unsigned int indSpecies)
bool getDoIgnoreFixedParticles()
void setCGWidthalls(bool new_)
void statistics_from_fstat_and_data()
get StatisticsPoint
void evaluate_particle_statistics(std::vector< BaseParticle * >::iterator P, int wp=0)
Calculates statistics for a single Particle.
void setTimeMaxStat(Mdouble t)
Vec3D P1_P2_normal
Direction of contact.
int format
format of the data input file
bool doTimeAverage
Determines if output is averaged over time.
void set_Polynomial(std::vector< Mdouble > new_coefficients, unsigned int new_dim)
void setSuperExact(bool new_)
std::vector< StatisticsPoint< T > > timeVariance
a vector used to sum up the variance in time of all statistical values
void setN(int nx_, int ny_, int nz_)
void setYMinStat(Mdouble yMinStat_)
Mdouble mirrorAtDomainBoundary
0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at...
bool doVariance
Determines if variance is outputted.
void setCGWidth(Mdouble w)
Set CG variables w2 and CG_invvolume.
unsigned int getStepSize() const
Mdouble xMinStat
By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain va...
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
void setDoDoublePoints(bool new_)
MatrixSymmetric3D P1_P2_Fabric
Fabric.
void set_hmax(Mdouble new_)
void setZMaxStat(Mdouble zMaxStat_)
Matrix3D P1_P2_NormalStress
Contact stress from normal forces along the line of contact.
Vec3D P1_P2_CollisionalHeatFlux
not yet working
std::vector< StatisticsPoint< T > > Points
A vector that stores the values of the statistical variables at a given position. ...
int getStressTypeForFixedParticles()
This class stores statistical values for a given spatial position; to be used in combination with Sta...
int verbosity
Determines how much is outputted to the terminal.
StatisticsPoint< T > average(std::vector< StatisticsPoint< T > > &P)
Output average of statistical variables.
void outputStatistics()
Calculates statistics for Particles (i.e. not collisions)
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
CG CG_type
coarse graining type (Gaussian, Heaviside, Polynomial)
void gatherContactStatistics()
Mdouble hmax
defines the maximum height of the particles for which statistics are extracted
This class is used to extract statistical data from MD simulations.
Matrix3D P1_P2_ContactCoupleStress
void writeOutputFiles()
Writes the simulation data onto all the files i.e. .data, .ene, .fstat ...
std::vector< StatisticsPoint< T > > timeAverage
A vector used to sum up all statistical values in Points for time-averaging.
This class is used to define polynomial axisymmetric coarse-graining functions.
int getVerbosityLevel() const
void setVerbosityLevel(int new_)
Mdouble setInfinitelyLongDistance()
bool superexact
If true, cutoff radius for Gaussian is set to 5*w (from 3*w)
void set_Polynomial(Mdouble *new_coefficients, unsigned int num_coeff, unsigned int new_dim)
void finishStatistics()
Finish all statistics (i.e. write out final data)
bool ignoreFixedParticles
Determines if fixed particles contribute to particle statistics (density, ...)
void setDoIgnoreFixedParticles(bool new_)
void setPositions()
Set position of StatisticsPoint points and set variables to 0.
Implementation of a 3D matrix.
void setCGWidth_over_rmax(Mdouble new_)
Implementation of a 3D vector (by Vitaliy).
Mdouble getTimeStep() const
Allows the time step dt to be accessed.
int StressTypeForFixedParticles
Stress type for fixed particles.
bool getNTimeAverageReset()
Mdouble P1_P2_Potential
not yet working
Mdouble evaluateIntegral(Mdouble n1, Mdouble n2, Mdouble t)
Mdouble rmax
defines the maximum radius of the particles for which statistics are extracted
Mdouble getTime() const
Access function for the time.
void set_rmin(Mdouble new_)
Implementation of a 3D symmetric matrix.
Mdouble getTimeMax() const
Allows the user to access the total simulation time during the simulation. Cannot change it though...
Mdouble tMaxStat
Statistical output will only be created if t
void setCGTimeAveragingInterval(Mdouble t)
std::string print_CG()
Output coarse graining variables.
void setXMaxStat(Mdouble xMaxStat_)
void setDoTimeAverage(bool new_)
virtual void reset_statistics()
Set all statistical variables to zero.
Matrix3D P1_P2_TangentialStress
Contact stress from tangential forces along the line of contact.
bool doGradient
Determines if gradient is outputted.
Vec3D P1_P2_NormalTraction
Traction from normal forces at contact of flow with fixed particles or walls.
void gather_force_statistics_from_p3c(int version)
int nxMirrored
extension of grid size from mirrored points