StatisticsVector< T > Class Template Reference

This class is used to extract statistical data from MD simulations. More...

#include <StatisticsVector.h>

+ Inheritance diagram for StatisticsVector< T >:

Public Member Functions

void constructor ()
 this is the actual constructor, sets up all basic things More...
 
void constructor (std::string name)
 
 StatisticsVector ()
 Basic constructor only calls constructor() More...
 
 StatisticsVector (std::string name)
 
 StatisticsVector (StatisticsVector &other)
 Copy constructor. More...
 
 StatisticsVector (int argc, char *argv[])
 Advanced constructor that accepts arguments from the command line. More...
 
void readStatArguments (int argc, char *argv[])
 
std::string printStat ()
 Outputs member variable values to a std::string. More...
 
void set_statType ()
 
void writeOutputFiles ()
 Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and .restart (see the Mercury website for more details regarding these files). More...
 
void print_help ()
 
void setNX (int new_)
 
void set_hx (Mdouble hx)
 
void setNY (int new_)
 
void set_hy (Mdouble hy)
 
void setNZ (int new_)
 
void set_hz (Mdouble hz)
 
void setN (int n)
 
void set_h (Mdouble h)
 
int getNX ()
 
int getNY ()
 
int getNZ ()
 
void setCGTimeMin (Mdouble t)
 
void setTimeMaxStat (Mdouble t)
 
void setCGTimeAveragingInterval (Mdouble t)
 
Mdouble getCGTimeMin ()
 
Mdouble getTimeMaxStat ()
 
Mdouble getCGTimeAveragingInterval ()
 
bool check_current_time_for_statistics ()
 
void setCGShape (const char *new_)
 
void setCGShape (CG_TYPE new_)
 
CG_TYPE getCGShape ()
 
void setN (int nx_, int ny_, int nz_)
 
void getN (int &nx_, int &ny_, int &nz_)
 
void setCGWidth (Mdouble w)
 Set CG variables w2 and CG_invvolume. More...
 
void setCGWidth2 (Mdouble new_)
 Set CG variables w2 and CG_invvolume. More...
 
Mdouble getCGWidth ()
 
Mdouble getCGWidthSquared ()
 
Mdouble getCutoff ()
 
Mdouble getCutoff2 ()
 
std::string print_CG ()
 Output coarse graining variables. More...
 
StatisticsPoint< T > average (std::vector< StatisticsPoint< T > > &P)
 Output average of statistical variables. More...
 
virtual void reset_statistics ()
 Set all statistical variables to zero. More...
 
void statistics_from_fstat_and_data ()
 get StatisticsPoint More...
 
void statistics_from_p3 ()
 
void jump_p3c ()
 
void setDoTimeAverage (bool new_)
 
bool getDoTimeAverage ()
 
void setStressTypeForFixedParticles (int new_)
 
int getStressTypeForFixedParticles ()
 
void set_infiniteStressForFixedParticles (bool new_)
 
void setMirrorAtDomainBoundary (Mdouble new_)
 
Mdouble getMirrorAtDomainBoundary ()
 
void setDoVariance (bool new_)
 
bool getDoVariance ()
 
void setDoGradient (bool new_)
 
bool getDoGradient ()
 
void setSuperExact (bool new_)
 
bool getSuperExact ()
 
void setDoIgnoreFixedParticles (bool new_)
 
bool getDoIgnoreFixedParticles ()
 
void verbose ()
 
void setVerbosityLevel (int new_)
 
int getVerbosityLevel () const
 
void setCGWidthalls (bool new_)
 
bool getCGWidthalls ()
 
void setDoPeriodicWalls (bool new_)
 
bool getDoPeriodicWalls ()
 
void setCGWidth_over_rmax (Mdouble new_)
 
Mdouble getCGWidth_over_rmax ()
 
void setPositions ()
 Set position of StatisticsPoint points and set variables to 0. More...
 
bool readNextDataFile (unsigned int format)
 
void gather_force_statistics_from_fstat_and_data ()
 
void gather_force_statistics_from_p3c (int version)
 
void gather_force_statistics_from_p3w (int version, std::vector< int > &index)
 
void evaluate_force_statistics (int wp=0)
 
void evaluate_wall_force_statistics (Vec3D P, int wp=0)
 
void jump_fstat ()
 
void initialiseStatistics ()
 Initializes statistics, i.e. setting w2, setting the grid and writing the header lines in the .stat file. More...
 
void outputStatistics ()
 Calculates statistics for Particles (i.e. not collisions) More...
 
void gatherContactStatistics (unsigned int index1, int index2, Vec3D Contact, Mdouble delta, Mdouble ctheta, Mdouble fdotn, Mdouble fdott, Vec3D P1_P2_normal_, Vec3D P1_P2_tangential)
 Calculates statistics for one collision (can be any kind of collision) More...
 
void processStatistics (bool usethese)
 Processes all gathered statistics and resets them afterwards. (Processing means either calculating time averages or writing out statistics) More...
 
void finishStatistics ()
 Finish all statistics (i.e. write out final data) More...
 
void write_statistics ()
 Writes regular statistics. More...
 
void write_time_average_statistics ()
 Writes out time averaged statistics. More...
 
void evaluate_particle_statistics (std::vector< BaseParticle * >::iterator P, int wp=0)
 Calculates statistics for a single Particle. More...
 
std::vector< StatisticsPoint< T > > getCGPoints ()
 
Mdouble getXMinStat ()
 Functions to acces and change the domain of statistics. More...
 
Mdouble getYMinStat ()
 
Mdouble getZMinStat ()
 
Mdouble getXMaxStat ()
 
Mdouble getYMaxStat ()
 
Mdouble getZMaxStat ()
 
void setXMinStat (Mdouble xMinStat_)
 
void setYMinStat (Mdouble yMinStat_)
 
void setZMinStat (Mdouble zMinStat_)
 
void setXMaxStat (Mdouble xMaxStat_)
 
void setYMaxStat (Mdouble yMaxStat_)
 
void setZMaxStat (Mdouble zMaxStat_)
 
int getNTimeAverage ()
 
Mdouble setInfinitelyLongDistance ()
 
void set_Polynomial (std::vector< Mdouble > new_coefficients, unsigned int new_dim)
 
void set_Polynomial (Mdouble *new_coefficients, unsigned int num_coeff, unsigned int new_dim)
 
void setPolynomialName (const char *new_name)
 
std::string getPolynomialName ()
 
void setDoDoublePoints (bool new_)
 
bool getDoDoublePoints ()
 
void setNTimeAverageReset (int new_)
 
bool getNTimeAverageReset ()
 
void set_rmin (Mdouble new_)
 
void set_rmax (Mdouble new_)
 
void set_hmax (Mdouble new_)
 
Mdouble evaluatePolynomial (Mdouble r)
 
Mdouble evaluatePolynomialGradient (Mdouble r)
 
Mdouble evaluateIntegral (Mdouble n1, Mdouble n2, Mdouble t)
 
unsigned int getStepSize () const
 
void setStepSize (unsigned int stepSize)
 
void setIndSpecies (unsigned int indSpecies)
 
- Public Member Functions inherited from DPMBase
void constructor ()
 A function which initialises the member variables to default values, so that the problem can be solved off the shelf; sets up a basic two dimensional problem which can be solved off the shelf. It is called in the constructor DPMBase(). More...
 
 DPMBase ()
 Constructor that calls the "void constructor()". More...
 
 DPMBase (const DPMBase &other)
 Copy constructor type-2. More...
 
virtual ~DPMBase ()
 virtual destructor More...
 
void autoNumber ()
 The autoNumber() function calls three functions: setRunNumber(), readRunNumberFromFile() and incrementRunNumberInFile(). More...
 
std::vector< int > get1DParametersFromRunNumber (int size_x) const
 This turns a counter into 1 index, which is a useful feature for performing 1D parameter study. The index run from 1:size_x, while the study number starts at 0 (initially the counter=1 in COUNTER_DONOTDEL) More...
 
std::vector< int > get2DParametersFromRunNumber (int size_x, int size_y) const
 This turns a counter into 2 indices which is a very useful feature for performing a 2D study. The indices run from 1:size_x and 1:size_y, while the study number starts at 0 ( initially the counter=1 in COUNTER_DONOTDEL) More...
 
std::vector< int > get3DParametersFromRunNumber (int size_x, int size_y, int size_z) const
 This turns a counter into 3 indices, which is a useful feature for performing a 3D parameter study. The indices run from 1:size_x, 1:size_y and 1:size_z, while the study number starts at 0 ( initially the counter=1 in COUNTER_DONOTDEL) More...
 
int launchNewRun (const char *name, bool quick=false)
 This launches a code from within this code. Please pass the name of the code to run. More...
 
void setRunNumber (int runNumber)
 This sets the counter/Run number, overriding the defaults. More...
 
int getRunNumber () const
 This returns the current value of the counter (runNumber_) More...
 
virtual void decompose ()
 Sends particles from processorId to the root processor. More...
 
void solve ()
 The work horse of the code. More...
 
void initialiseSolve ()
 Beginning of the solve routine, before time stepping. More...
 
void finaliseSolve ()
 End of the solve routine, after time stepping. More...
 
virtual void computeOneTimeStep ()
 Performs everything needed for one time step, used in the time-loop of solve(). More...
 
void checkSettings ()
 Checks if the essentials are set properly to go ahead with solving the problem. More...
 
void forceWriteOutputFiles ()
 Writes output files immediately, even if the current time step was not meant to be written. Also resets the last saved time step. More...
 
void solve (int argc, char *argv[])
 The work horse of the code. Can handle flags from the command line. More...
 
virtual void setupInitialConditions ()
 This function allows to set the initial conditions for our problem to be solved, by default particle locations are randomly set. Remember particle properties must also be defined here. More...
 
virtual void writeXBallsScript () const
 This writes a script which can be used to load the xballs problem to display the data just generated. More...
 
virtual Mdouble getInfo (const BaseParticle &P) const
 A virtual function that returns some user-specified information about a particle. More...
 
ParticleVtkWritergetVtkWriter () const
 
virtual void writeRestartFile ()
 Stores all the particle data for current save time step to a "restart" file, which is a file simply intended to store all the information necessary to "restart" a simulation from a given time step (see also MercuryDPM.org for more information on restart files). More...
 
void writeDataFile ()
 
void writeEneFile ()
 
void writeFStatFile ()
 
void fillDomainWithParticles (unsigned N=50)
 
bool readRestartFile (ReadOptions opt=ReadOptions::ReadAll)
 Reads all the particle data corresponding to a given, existing . restart file (for more details regarding restart files, refer to the training materials on the MercuryDPM website).Returns true if it is successful, false otherwise. More...
 
int readRestartFile (std::string fileName, ReadOptions opt=ReadOptions::ReadAll)
 The same as readRestartFile(bool), but also reads all the particle data corresponding to the current saved time step. More...
 
virtual void write (std::ostream &os, bool writeAllParticles=true) const
 
virtual void read (std::istream &is, ReadOptions opt=ReadOptions::ReadAll)
 Reads all data from a restart file, e.g. domain data and particle data. More...
 
virtual BaseWallreadUserDefinedWall (const std::string &type) const
 Allows you to read in a wall defined in a Driver directory; see USER/Luca/ScrewFiller. More...
 
virtual void readOld (std::istream &is)
 Reads all data from a restart file, e.g. domain data and particle data; old version. More...
 
bool readDataFile (std::string fileName="", unsigned int format=0)
 This allows particle data to be reloaded from data files. More...
 
bool readParAndIniFiles (std::string fileName)
 Allows the user to read par.ini files (useful to read files produced by the MDCLR simulation code - external to MercuryDPM) More...
 
bool readNextDataFile (unsigned int format=0)
 Reads the next data file with default format=0. However, one can modify the format based on whether the particle data corresponds to 3D or 2D data- see Visualising data in xballs. More...
 
void readNextFStatFile ()
 Reads the next fstat file. More...
 
bool findNextExistingDataFile (Mdouble tMin, bool verbose=true)
 Finds and opens the next data file, if such a file exists. More...
 
bool readArguments (int argc, char *argv[])
 Can interpret main function input arguments that are passed by the driver codes. More...
 
virtual bool readNextArgument (int &i, int argc, char *argv[])
 Interprets the i^th command-line argument. More...
 
virtual bool checkParticleForInteraction (const BaseParticle &P)
 Checks whether a particle P has any interaction with walls or other particles. More...
 
virtual bool checkParticleForInteractionLocal (const BaseParticle &P)
 Checks if a particle P has any interaction with walls or other particles in the local domain. More...
 
bool checkParticleForInteractionLocalPeriodic (const BaseParticle &P)
 
void readSpeciesFromDataFile (bool read=true)
 
void importParticlesAs (ParticleHandler &particleHandler, InteractionHandler &interactionHandler, const ParticleSpecies *species)
 Copies particles, interactions assigning species from a local simulation to a global one. Useful for the creation of a cluster. More...
 
MERCURYDPM_DEPRECATED FilegetDataFile ()
 The non const version. Allows one to edit the File::dataFile. More...
 
MERCURYDPM_DEPRECATED FilegetEneFile ()
 The non const version. Allows to edit the File::eneFile. More...
 
MERCURYDPM_DEPRECATED FilegetFStatFile ()
 The non const version. Allows to edit the File::fStatFile. More...
 
MERCURYDPM_DEPRECATED FilegetRestartFile ()
 The non const version. Allows to edit the File::restartFile. More...
 
MERCURYDPM_DEPRECATED FilegetStatFile ()
 The non const version. Allows to edit the File::statFile. More...
 
FilegetInteractionFile ()
 Return a reference to the file InteractionsFile. More...
 
MERCURYDPM_DEPRECATED const FilegetDataFile () const
 The const version. Does not allow for any editing of the File::dataFile. More...
 
MERCURYDPM_DEPRECATED const FilegetEneFile () const
 The const version. Does not allow for any editing of the File::eneFile. More...
 
MERCURYDPM_DEPRECATED const FilegetFStatFile () const
 The const version. Does not allow for any editing of the File::fStatFile. More...
 
MERCURYDPM_DEPRECATED const FilegetRestartFile () const
 The const version. Does not allow for any editing of the File::restartFile. More...
 
MERCURYDPM_DEPRECATED const FilegetStatFile () const
 The const version. Does not allow for any editing of the File::statFile. More...
 
const FilegetInteractionFile () const
 
const std::string & getName () const
 Returns the name of the file. Does not allow to change it though. More...
 
void setName (const std::string &name)
 Allows to set the name of all the files (ene, data, fstat, restart, stat) More...
 
void setName (const char *name)
 Calls setName(std::string) More...
 
void setSaveCount (unsigned int saveCount)
 Sets File::saveCount_ for all files (ene, data, fstat, restart, stat) More...
 
void setFileType (FileType fileType)
 Sets File::fileType_ for all files (ene, data, fstat, restart, stat) More...
 
void setOpenMode (std::fstream::openmode openMode)
 Sets File::openMode_ for all files (ene, data, fstat, restart, stat) More...
 
void resetFileCounter ()
 Resets the file counter for each file i.e. for ene, data, fstat, restart, stat) More...
 
void closeFiles ()
 Closes all files (ene, data, fstat, restart, stat) that were opened to read or write. More...
 
void setLastSavedTimeStep (unsigned int nextSavedTimeStep)
 Sets the next time step for all the files (ene, data, fstat, restart, stat) at which the data is to be written or saved. More...
 
Mdouble getTime () const
 Returns the current simulation time. More...
 
Mdouble getNextTime () const
 Returns the current simulation time. More...
 
unsigned int getNumberOfTimeSteps () const
 Returns the current counter of time-steps, i.e. the number of time-steps that the simulation has undergone so far. More...
 
void setTime (Mdouble time)
 Sets a new value for the current simulation time. More...
 
void setTimeMax (Mdouble newTMax)
 Sets a new value for the maximum simulation duration. More...
 
Mdouble getTimeMax () const
 Returns the maximum simulation duration. More...
 
void setLogarithmicSaveCount (Mdouble logarithmicSaveCountBase)
 Sets File::logarithmicSaveCount_ for all files (ene, data, fstat, restart, stat) More...
 
void setNToWrite (int nToWrite)
 set the number of elements to write to the screen More...
 
int getNToWrite () const
 get the number of elements to write to the More...
 
void setRotation (bool rotation)
 Sets whether particle rotation is enabled or disabled. More...
 
bool getRotation () const
 Indicates whether particle rotation is enabled or disabled. More...
 
MERCURYDPM_DEPRECATED void setWallsWriteVTK (FileType writeWallsVTK)
 Sets whether walls are written into a VTK file. More...
 
MERCURYDPM_DEPRECATED void setWallsWriteVTK (bool)
 Sets whether walls are written into a VTK file. More...
 
MERCURYDPM_DEPRECATED void setInteractionsWriteVTK (bool)
 Sets whether interactions are written into a VTK file. More...
 
void setParticlesWriteVTK (bool writeParticlesVTK)
 Sets whether particles are written in a VTK file. More...
 
void setSuperquadricParticlesWriteVTK (bool writeSuperquadricParticlesVTK)
 
MERCURYDPM_DEPRECATED FileType getWallsWriteVTK () const
 Returns whether walls are written in a VTK file. More...
 
bool getParticlesWriteVTK () const
 Returns whether particles are written in a VTK file. More...
 
bool getSuperquadricParticlesWriteVTK () const
 
Mdouble getXMin () const
 If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin. More...
 
Mdouble getXMax () const
 If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax. More...
 
Mdouble getYMin () const
 If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin. More...
 
Mdouble getYMax () const
 If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax. More...
 
Mdouble getZMin () const
 If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin. More...
 
Mdouble getZMax () const
 If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax. More...
 
Mdouble getXCenter () const
 
Mdouble getYCenter () const
 
Mdouble getZCenter () const
 
Vec3D getMin () const
 
Vec3D getMax () const
 
void setXMin (Mdouble newXMin)
 Sets the value of XMin, the lower bound of the problem domain in the x-direction. More...
 
void setYMin (Mdouble newYMin)
 Sets the value of YMin, the lower bound of the problem domain in the y-direction. More...
 
void setZMin (Mdouble newZMin)
 Sets the value of ZMin, the lower bound of the problem domain in the z-direction. More...
 
void setXMax (Mdouble newXMax)
 Sets the value of XMax, the upper bound of the problem domain in the x-direction. More...
 
void setYMax (Mdouble newYMax)
 Sets the value of YMax, the upper bound of the problem domain in the y-direction. More...
 
void setZMax (Mdouble newZMax)
 Sets the value of ZMax, the upper bound of the problem domain in the z-direction. More...
 
void setMax (const Vec3D &max)
 Sets the maximum coordinates of the problem domain. More...
 
void setMax (Mdouble, Mdouble, Mdouble)
 Sets the maximum coordinates of the problem domain. More...
 
void setDomain (const Vec3D &min, const Vec3D &max)
 Sets the minimum coordinates of the problem domain. More...
 
void setMin (const Vec3D &min)
 Sets the minimum coordinates of the problem domain. More...
 
void setMin (Mdouble, Mdouble, Mdouble)
 Sets the minimum coordinates of the problem domain. More...
 
void setTimeStep (Mdouble newDt)
 Sets a new value for the simulation time step. More...
 
Mdouble getTimeStep () const
 Returns the simulation time step. More...
 
void setNumberOfOMPThreads (int numberOfOMPThreads)
 
int getNumberOfOMPThreads () const
 
void setXBallsColourMode (int newCMode)
 Set the xballs output mode. More...
 
int getXBallsColourMode () const
 Get the xballs colour mode (CMode). More...
 
void setXBallsVectorScale (double newVScale)
 Set the scale of vectors in xballs. More...
 
double getXBallsVectorScale () const
 Returns the scale of vectors used in xballs. More...
 
void setXBallsAdditionalArguments (std::string newXBArgs)
 Set the additional arguments for xballs. More...
 
std::string getXBallsAdditionalArguments () const
 Returns the additional arguments for xballs. More...
 
void setXBallsScale (Mdouble newScale)
 Sets the scale of the view (either normal, zoom in or zoom out) to display in xballs. The default is fit to screen. More...
 
double getXBallsScale () const
 Returns the scale of the view in xballs. More...
 
void setGravity (Vec3D newGravity)
 Sets a new value for the gravitational acceleration. More...
 
Vec3D getGravity () const
 Returns the gravitational acceleration. More...
 
void setBackgroundDrag (Mdouble backgroundDrag)
 Simple access function to turn on a background drag. The force of particleVelocity*drag is applied (note, it allowd to be negaitve i.e. create energy) More...
 
const Mdouble getBackgroundDrag () const
 Return the background drag. More...
 
void setDimension (unsigned int newDim)
 Sets both the system dimensions and the particle dimensionality. More...
 
void setSystemDimensions (unsigned int newDim)
 Sets the system dimensionality. More...
 
unsigned int getSystemDimensions () const
 Returns the system dimensionality. More...
 
void setParticleDimensions (unsigned int particleDimensions)
 Sets the particle dimensionality. More...
 
unsigned int getParticleDimensions () const
 Returns the particle dimensionality. More...
 
std::string getRestartVersion () const
 This is to take into account for different Mercury versions. Returns the version of the restart file. More...
 
void setRestartVersion (std::string newRV)
 Sets restart_version. More...
 
bool getRestarted () const
 Returns the flag denoting if the simulation was restarted or not. More...
 
void setRestarted (bool newRestartedFlag)
 Allows to set the flag stating if the simulation is to be restarted or not. More...
 
bool getAppend () const
 Returns whether the "append" option is on or off. More...
 
void setAppend (bool newAppendFlag)
 Sets whether the "append" option is on or off. More...
 
Mdouble getElasticEnergy () const
 Returns the global elastic energy within the system. More...
 
Mdouble getKineticEnergy () const
 Returns the global kinetic energy stored in the system. More...
 
Mdouble getGravitationalEnergy () const
 Returns the global gravitational potential energy stored in the system. More...
 
Mdouble getRotationalEnergy () const
 JMFT Returns the global rotational energy stored in the system. More...
 
Mdouble getTotalEnergy () const
 
Mdouble getTotalMass () const
 JMFT: Return the total mass of the system, excluding fixed particles. More...
 
Vec3D getCentreOfMass () const
 JMFT: Return the centre of mass of the system, excluding fixed particles. More...
 
Vec3D getTotalMomentum () const
 JMFT: Return the total momentum of the system, excluding fixed particles. More...
 
double getCPUTime ()
 
double getWallTime ()
 
virtual void hGridInsertParticle (BaseParticle *obj UNUSED)
 
virtual void hGridUpdateParticle (BaseParticle *obj UNUSED)
 
virtual void hGridRemoveParticle (BaseParticle *obj UNUSED)
 
virtual void hGridUpdateMove (BaseParticle *, Mdouble)
 
bool mpiIsInCommunicationZone (BaseParticle *particle)
 Checks if the position of the particle is in an mpi communication zone or not. More...
 
bool mpiInsertParticleCheck (BaseParticle *P)
 Function that checks if the mpi particle should really be inserted by the current domain. More...
 
void insertGhostParticle (BaseParticle *P)
 This function inserts a particle in the mpi communication boundaries. More...
 
void updateGhostGrid (BaseParticle *P)
 Checks if the Domain/periodic interaction distance needs to be updated and updates it accordingly. More...
 
void setNumberOfDomains (std::vector< unsigned > direction)
 Sets the number of domains in x-,y- and z-direction. Required for parallel computations. More...
 
void splitDomain (DomainSplit domainSplit)
 
std::vector< unsigned > getNumberOfDomains ()
 returns the number of domains More...
 
DomaingetCurrentDomain ()
 Function that returns a pointer to the domain corresponding to the processor. More...
 
void removeOldFiles () const
 
virtual void hGridGetInteractingParticleList (BaseParticle *obj, std::vector< BaseParticle * > &list)
 Creates a list of neighbour particles obtained from the hgrid. More...
 
virtual void computeWallForces (BaseWall *w)
 
virtual bool getHGridUpdateEachTimeStep () const
 
void setMeanVelocity (Vec3D V_mean_goal)
 This function will help you set a fixed kinetic energy and mean velocity in your system. More...
 
void setMeanVelocityAndKineticEnergy (Vec3D V_mean_goal, Mdouble Ek_goal)
 This function will help you set a fixed kinetic energy and mean velocity in your system. More...
 
Mdouble getTotalVolume () const
 Get the total volume of the cuboid system. More...
 
Matrix3D getKineticStress () const
 Calculate the kinetic stress tensor in the system averaged over the whole volume. More...
 
Matrix3D getStaticStress () const
 Calculate the static stress tensor in the system averaged over the whole volume. More...
 
Matrix3D getTotalStress () const
 Calculate the total stress tensor in the system averaged over the whole volume. More...
 
virtual void handleParticleRemoval (unsigned int id)
 Handles the removal of particles from the particleHandler. More...
 
virtual void handleParticleAddition (unsigned int id, BaseParticle *p)
 
void writePythonFileForVTKVisualisation () const
 
void setWritePythonFileForVTKVisualisation (bool forceWritePythonFileForVTKVisualisation)
 
bool getWritePythonFileForVTKVisualisation () const
 
WallVTKWritergetWallVTKWriter ()
 

Protected Member Functions

bool satisfiesInclusionCriteria (BaseParticle *P)
 
bool loadVelocityProfile (const char *filename)
 
bool loadPositions (const char *filename)
 
Vec3D getVelocityProfile (Vec3D Position)
 
bool read_next_from_p3p_file ()
 
void autoSetSystemDimensions ()
 
- Protected Member Functions inherited from DPMBase
virtual void computeAllForces ()
 Computes all the forces acting on the particles using the BaseInteractable::setForce() and BaseInteractable::setTorque() More...
 
virtual void computeInternalForces (BaseParticle *)
 Computes the internal forces on particle i (internal in the sense that the sum over all these forces is zero i.e. fully modelled forces) More...
 
virtual void computeInternalForce (BaseParticle *, BaseParticle *)
 Computes the forces between two particles (internal in the sense that the sum over all these forces is zero i.e. fully modelled forces) More...
 
virtual void computeExternalForces (BaseParticle *)
 Computes the external forces, such as gravity, acting on particles. More...
 
virtual void computeForcesDueToWalls (BaseParticle *, BaseWall *)
 Computes the forces on the particles due to the walls (normals are outward normals) More...
 
virtual void actionsOnRestart ()
 A virtual function where the users can add extra code which is executed only when the code is restarted. More...
 
virtual void actionsBeforeTimeLoop ()
 A virtual function. Allows one to carry out any operations before the start of the time loop. More...
 
virtual void hGridActionsBeforeTimeLoop ()
 A virtual function that allows one to carry out hGrid operations before the start of the time loop. More...
 
virtual void hGridActionsBeforeTimeStep ()
 A virtual function that allows one to set or execute hGrid parameters or operations before every simulation time step. More...
 
virtual void actionsBeforeTimeStep ()
 A virtual function which allows to define operations to be executed before the new time step. More...
 
virtual void computeAdditionalForces ()
 A virtual function which allows to define operations to be executed prior to the OMP force collect. More...
 
virtual void actionsAfterSolve ()
 A virtual function which allows to define operations to be executed after the solve(). More...
 
virtual void actionsAfterTimeStep ()
 A virtual function which allows to define operations to be executed after time step. More...
 
void writeVTKFiles () const
 
virtual void outputXBallsData (std::ostream &os) const
 This function writes the location of the walls and particles in a format the XBalls program can read. For more information on the XBalls program, see Visualising data in xballs. More...
 
virtual void outputXBallsDataParticle (unsigned int i, unsigned int format, std::ostream &os) const
 This function writes out the particle locations into an output stream in a format the XBalls program can read. For more information on the XBalls program, see Visualising data in xballs. More...
 
virtual void writeEneHeader (std::ostream &os) const
 Writes a header with a certain format for ENE file. More...
 
virtual void writeFstatHeader (std::ostream &os) const
 Writes a header with a certain format for FStat file. More...
 
virtual void writeEneTimeStep (std::ostream &os) const
 Write the global kinetic, potential energy, etc. in the system. More...
 
void gatherContactStatistics ()
 
virtual void integrateBeforeForceComputation ()
 Update particles' and walls' positions and velocities before force computation. More...
 
virtual void integrateAfterForceComputation ()
 Update particles' and walls' positions and velocities after force computation. More...
 
virtual void checkInteractionWithBoundaries ()
 There are a range of boundaries one could implement depending on ones' problem. This methods checks for interactions between particles and such range of boundaries. See BaseBoundary.h and all the boundaries in the Boundaries folder. More...
 
virtual void hGridActionsBeforeIntegration ()
 This function has to be called before integrateBeforeForceComputation. More...
 
virtual void hGridActionsAfterIntegration ()
 This function has to be called after integrateBeforeForceComputation. More...
 
void setFixedParticles (unsigned int n)
 Sets a number, n, of particles in the particleHandler as "fixed particles". More...
 
virtual void printTime () const
 Displays the current simulation time and the maximum simulation duration. More...
 
virtual bool continueSolve () const
 A virtual function for deciding whether to continue the simulation, based on a user-specified criterion. More...
 
void outputInteractionDetails () const
 Displays the interaction details corresponding to the pointer objects in the interaction handler. More...
 
bool isTimeEqualTo (Mdouble time) const
 Checks whether the input variable "time" is the current time in the simulation. More...
 
void removeDuplicatePeriodicParticles ()
 Removes periodic duplicate Particles. More...
 
void checkAndDuplicatePeriodicParticles ()
 For simulations using periodic boundaries, checks and adds particles when necessary into the particle handler. See DPMBase.cc and PeriodicBoundary.cc for more details. More...
 
void performGhostParticleUpdate ()
 When the Verlet scheme updates the positions and velocities of particles, ghost particles will need an update as wel. Their status will also be updated accordingly. More...
 
void deleteGhostParticles (std::set< BaseParticle * > &particlesToBeDeleted)
 
void synchroniseParticle (BaseParticle *, unsigned fromProcessor=0)
 
void performGhostVelocityUpdate ()
 updates the final time-step velocity of the ghost particles More...
 
void setSoftStop ()
 function for setting sigaction constructor. More...
 

Protected Attributes

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 averaged; f.e. StatType X is averaged over y and z. More...
 
int nx
 Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat,xMaxStat]x[yMinStat,yMaxStat]x[zMinStat,zMaxStat]. More...
 
int ny
 see nx More...
 
int nz
 see nx More...
 
Mdouble xMinStat
 By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain values to nan), but can be resized. More...
 
Mdouble xMaxStat
 
Mdouble yMinStat
 
Mdouble yMaxStat
 
Mdouble zMinStat
 
Mdouble zMaxStat
 
int nxMirrored
 extension of grid size from mirrored points More...
 
int nyMirrored
 
int nzMirrored
 
std::vector< StatisticsPoint< T > > Points
 A vector that stores the values of the statistical variables at a given position. More...
 
std::vector< StatisticsPoint< T > > dx
 A vector that stores the gradient in x of all statistical variables at a given position. More...
 
std::vector< StatisticsPoint< T > > dy
 A vector that stores the gradient in y of all statistical variables at a given position. More...
 
std::vector< StatisticsPoint< T > > dz
 A vector that stores the gradient in z of all statistical variables at a given position. More...
 
std::vector< StatisticsPoint< T > > timeAverage
 A vector used to sum up all statistical values in Points for time-averaging. More...
 
std::vector< StatisticsPoint< T > > timeVariance
 a vector used to sum up the variance in time of all statistical values More...
 
std::vector< StatisticsPoint< T > > dxTimeAverage
 a vector used to sum up all statistical gradients in dx for time-averaging More...
 
std::vector< StatisticsPoint< T > > dyTimeAverage
 a vector used to sum up all statistical gradients in dy for time-averaging More...
 
std::vector< StatisticsPoint< T > > dzTimeAverage
 a vector used to sum up all statistical gradients in dz for time-averaging More...
 
bool doTimeAverage
 Determines if output is averaged over time. More...
 
int nTimeAverageReset
 Determines after how many time steps the time average is reset. More...
 
bool doVariance
 Determines if variance is outputted. More...
 
bool doGradient
 Determines if gradient is outputted. More...
 
int nTimeAverage
 A counter needed to average over time. More...
 
CG_TYPE CG_type
 coarse graining type (Gaussian, Heaviside, Polynomial) More...
 
NORMALIZED_POLYNOMIAL< T > CGPolynomial
 Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r. More...
 
Mdouble w2
 coarse graining width squared; for HeavisideSphere and Gaussian More...
 
Mdouble cutoff
 The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polynomial, 3*w for Gaussian. More...
 
Mdouble cutoff2
 
Mdouble w_over_rmax
 if w is not set manually then w will be set by multiplying this value by the largest particle radius at t=0 More...
 
Mdouble tMinStat
 Statistical output will only be created if t>tMinStat. More...
 
Mdouble tMaxStat
 Statistical output will only be created if t<tMaxStat. More...
 
Mdouble tIntStat
 Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat. More...
 
Mdouble indSpecies
 defines the species for which statistics are extracted (-1 for all species) More...
 
Mdouble rmin
 defines the minimum radius of the particles for which statistics are extracted More...
 
Mdouble rmax
 defines the maximum radius of the particles for which statistics are extracted More...
 
Mdouble hmax
 defines the maximum height of the particles for which statistics are extracted More...
 
bool walls
 Turns off walls before evaluation. More...
 
bool periodicWalls
 Turns off periodic walls before evaluation (needed for averaging, because we do not yet check if particle is in domain) More...
 
bool ignoreFixedParticles
 Determines if fixed particles contribute to particle statistics (density, ...) More...
 
int StressTypeForFixedParticles
 Stress type for fixed particles. More...
 
int verbosity
 Determines how much is outputted to the terminal. More...
 
int format
 format of the data input file More...
 
Mdouble mirrorAtDomainBoundary
 0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at the domain boundaries; up to a maximum depth specified by this number More...
 
bool isMDCLR
 
bool superexact
 If true, cutoff radius for Gaussian is set to 5*w (from 3*w) More...
 
bool doDoublePoints
 
Vec3D P1
 Position of first contact point. More...
 
Vec3D P2
 Position of second contact point. More...
 
Vec3D P1_P2_normal
 Direction of contact. More...
 
Mdouble P1_P2_distance
 Length of contact line. More...
 
Matrix3D P1_P2_NormalStress
 Contact stress from normal forces along the line of contact. More...
 
Matrix3D P1_P2_ContactCoupleStress
 
Vec3D P1_P2_Contact
 
Matrix3D P1_P2_TangentialStress
 Contact stress from tangential forces along the line of contact. More...
 
Vec3D P1_P2_NormalTraction
 Traction from normal forces at contact of flow with fixed particles or walls. More...
 
Vec3D P1_P2_TangentialTraction
 Traction from tangential forces at contact of flow with fixed particles or walls. More...
 
MatrixSymmetric3D P1_P2_Fabric
 Fabric. More...
 
Vec3D P1_P2_CollisionalHeatFlux
 not yet working More...
 
Mdouble P1_P2_Dissipation
 not yet working More...
 
Mdouble P1_P2_Potential
 not yet working More...
 
std::vector< Vec3DVelocityProfile
 
Vec3D VelocityProfile_Min
 
Vec3D VelocityProfile_D
 
std::fstream p3p_file
 
std::fstream p3c_file
 
std::fstream p3w_file
 
bool p3Format = true
 
unsigned int stepSize_
 
std::vector< Vec3Dpositions_
 
bool centerPointInFStat_ = true
 

Additional Inherited Members

- Public Types inherited from DPMBase
enum class  ReadOptions : int { ReadAll , ReadNoInteractions , ReadNoParticlesAndInteractions }
 
enum class  DomainSplit {
  X , Y , Z , XY ,
  XZ , YZ , XYZ
}
 
- Static Public Member Functions inherited from DPMBase
static void incrementRunNumberInFile ()
 Increment the run Number (counter value) stored in the file_counter (COUNTER_DONOTDEL) by 1 and store the new value in the counter file. More...
 
static int readRunNumberFromFile ()
 Read the run number or the counter from the counter file (COUNTER_DONOTDEL) More...
 
static bool areInContact (const BaseParticle *pI, const BaseParticle *pJ)
 Checks if two particle are in contact or is there any positive overlap. More...
 
- Public Attributes inherited from DPMBase
SpeciesHandler speciesHandler
 A handler to that stores the species type i.e. LinearViscoelasticSpecies, etc. More...
 
RNG random
 This is a random generator, often used for setting up the initial conditions etc... More...
 
ParticleHandler particleHandler
 An object of the class ParticleHandler, contains the pointers to all the particles created. More...
 
ParticleHandler paoloParticleHandler
 Fake particleHandler created by Paolo needed temporary by just Paolo. More...
 
WallHandler wallHandler
 An object of the class WallHandler. Contains pointers to all the walls created. More...
 
BoundaryHandler boundaryHandler
 An object of the class BoundaryHandler which concerns insertion and deletion of particles into or from regions. More...
 
PeriodicBoundaryHandler periodicBoundaryHandler
 Internal handler that deals with periodic boundaries, especially in a parallel build. More...
 
DomainHandler domainHandler
 An object of the class DomainHandler which deals with parallel code. More...
 
InteractionHandler interactionHandler
 An object of the class InteractionHandler. More...
 
CGHandler cgHandler
 Object of the class cgHandler. More...
 
File dataFile
 An instance of class File to handle in- and output into a .data file. More...
 
File fStatFile
 An instance of class File to handle in- and output into a .fstat file. More...
 
File eneFile
 An instance of class File to handle in- and output into a .ene file. More...
 
File restartFile
 An instance of class File to handle in- and output into a .restart file. More...
 
File statFile
 An instance of class File to handle in- and output into a .stat file. More...
 
File interactionFile
 File class to handle in- and output into .interactions file. This file hold information about interactions. More...
 
Time clock_
 record when the simulation started More...
 
- Static Protected Member Functions inherited from DPMBase
static void signalHandler (int signal)
 signal handler function. More...
 

Detailed Description

template<StatType T>
class StatisticsVector< T >

This class is used to extract statistical data from MD simulations.

When calling statistics_from_fstat_and_data(), statistical data (such as density, pressure, ...) will be extracted at various points in the domain, aligned in a nx*ny*nz grid.

Set functions can be used to define the dimensions of the grid (default: nx=ny=nz=1) and the type and width of the coarse graining function (default: Gaussian, width w=r_max).

Constructor & Destructor Documentation

◆ StatisticsVector() [1/4]

template<StatType T>
StatisticsVector< T >::StatisticsVector ( )
inline

Basic constructor only calls constructor()

78  {
79  constructor();
80  }
void constructor()
this is the actual constructor, sets up all basic things

References StatisticsVector< T >::constructor().

◆ StatisticsVector() [2/4]

template<StatType T>
StatisticsVector< T >::StatisticsVector ( std::string  name)
inline
86  {
88  }
std::string name
Definition: MercuryProb.h:48

References StatisticsVector< T >::constructor(), and units::name.

◆ StatisticsVector() [3/4]

template<StatType T>
StatisticsVector< T >::StatisticsVector ( StatisticsVector< T > &  other)

Copy constructor.

◆ StatisticsVector() [4/4]

template<StatType T>
StatisticsVector< T >::StatisticsVector ( int  argc,
char argv[] 
)

Advanced constructor that accepts arguments from the command line.

Member Function Documentation

◆ autoSetSystemDimensions()

template<StatType T>
void StatisticsVector< T >::autoSetSystemDimensions ( )
protected

◆ average()

template<StatType T>
StatisticsPoint<T> StatisticsVector< T >::average ( std::vector< StatisticsPoint< T > > &  P)

Output average of statistical variables.

◆ check_current_time_for_statistics()

template<StatType T>
bool StatisticsVector< T >::check_current_time_for_statistics ( )
inline
275  {
276  return (getTime() >= getCGTimeMin() && getTime() <= getTimeMaxStat() + getTimeStep());
277  }
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1250
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:808
Mdouble getCGTimeMin()
Definition: StatisticsVector.h:247
Mdouble getTimeMaxStat()
Definition: StatisticsVector.h:255

References StatisticsVector< T >::getCGTimeMin(), DPMBase::getTime(), StatisticsVector< T >::getTimeMaxStat(), and DPMBase::getTimeStep().

◆ constructor() [1/2]

template<StatType T>
void StatisticsVector< T >::constructor ( )

this is the actual constructor, sets up all basic things

Referenced by StatisticsVector< T >::StatisticsVector().

◆ constructor() [2/2]

template<StatType T>
void StatisticsVector< T >::constructor ( std::string  name)

◆ evaluate_force_statistics()

template<StatType T>
void StatisticsVector< T >::evaluate_force_statistics ( int  wp = 0)

◆ evaluate_particle_statistics()

template<StatType T>
void StatisticsVector< T >::evaluate_particle_statistics ( std::vector< BaseParticle * >::iterator  P,
int  wp = 0 
)

Calculates statistics for a single Particle.

◆ evaluate_wall_force_statistics()

template<StatType T>
void StatisticsVector< T >::evaluate_wall_force_statistics ( Vec3D  P,
int  wp = 0 
)

◆ evaluateIntegral()

template<StatType T>
Mdouble StatisticsVector< T >::evaluateIntegral ( Mdouble  n1,
Mdouble  n2,
Mdouble  t 
)
inline
915  {
916  return CGPolynomial.evaluateIntegral(n1, n2, t);
917  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r.
Definition: StatisticsVector.h:1042

References StatisticsVector< T >::CGPolynomial.

◆ evaluatePolynomial()

template<StatType T>
Mdouble StatisticsVector< T >::evaluatePolynomial ( Mdouble  r)
inline
899  {
900  return CGPolynomial.evaluate(r);
901  }

References StatisticsVector< T >::CGPolynomial.

◆ evaluatePolynomialGradient()

template<StatType T>
Mdouble StatisticsVector< T >::evaluatePolynomialGradient ( Mdouble  r)
inline
907  {
908  return CGPolynomial.evaluateGradient(r);
909  }

References StatisticsVector< T >::CGPolynomial.

◆ finishStatistics()

template<StatType T>
void StatisticsVector< T >::finishStatistics ( )
virtual

Finish all statistics (i.e. write out final data)

Reimplemented from DPMBase.

Referenced by statistics_while_running< T >::finishStatistics().

◆ gather_force_statistics_from_fstat_and_data()

template<StatType T>
void StatisticsVector< T >::gather_force_statistics_from_fstat_and_data ( )

◆ gather_force_statistics_from_p3c()

template<StatType T>
void StatisticsVector< T >::gather_force_statistics_from_p3c ( int  version)

◆ gather_force_statistics_from_p3w()

template<StatType T>
void StatisticsVector< T >::gather_force_statistics_from_p3w ( int  version,
std::vector< int > &  index 
)

◆ gatherContactStatistics()

template<StatType T>
void StatisticsVector< T >::gatherContactStatistics ( unsigned int  index1,
int  index2,
Vec3D  Contact,
Mdouble  delta,
Mdouble  ctheta,
Mdouble  fdotn,
Mdouble  fdott,
Vec3D  P1_P2_normal_,
Vec3D  P1_P2_tangential 
)
virtual

Calculates statistics for one collision (can be any kind of collision)

Reimplemented from DPMBase.

◆ getCGPoints()

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::getCGPoints ( )
inline
679  {
680  return Points;
681  }
std::vector< StatisticsPoint< T > > Points
A vector that stores the values of the statistical variables at a given position.
Definition: StatisticsVector.h:969

References StatisticsVector< T >::Points.

◆ getCGShape()

template<StatType T>
CG_TYPE StatisticsVector< T >::getCGShape ( )
inline
294  {
295  return CG_type;
296  }
CG_TYPE CG_type
coarse graining type (Gaussian, Heaviside, Polynomial)
Definition: StatisticsVector.h:1038

References StatisticsVector< T >::CG_type.

◆ getCGTimeAveragingInterval()

template<StatType T>
Mdouble StatisticsVector< T >::getCGTimeAveragingInterval ( )
inline
267  {
268  return tIntStat;
269  }
Mdouble tIntStat
Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat.
Definition: StatisticsVector.h:1077

References StatisticsVector< T >::tIntStat.

◆ getCGTimeMin()

template<StatType T>
Mdouble StatisticsVector< T >::getCGTimeMin ( )
inline
248  {
249  return tMinStat;
250  }
Mdouble tMinStat
Statistical output will only be created if t>tMinStat.
Definition: StatisticsVector.h:1067

References StatisticsVector< T >::tMinStat.

Referenced by StatisticsVector< T >::check_current_time_for_statistics().

◆ getCGWidth()

template<StatType T>
Mdouble StatisticsVector< T >::getCGWidth ( )
inline
332  {
333  return std::sqrt(w2);
334  }
Mdouble w2
coarse graining width squared; for HeavisideSphere and Gaussian
Definition: StatisticsVector.h:1050

References StatisticsVector< T >::w2.

Referenced by statistics_while_running< T >::run().

◆ getCGWidth_over_rmax()

template<StatType T>
Mdouble StatisticsVector< T >::getCGWidth_over_rmax ( )
inline
589  {
590  return w_over_rmax;
591  }
Mdouble w_over_rmax
if w is not set manually then w will be set by multiplying this value by the largest particle radius ...
Definition: StatisticsVector.h:1060

References StatisticsVector< T >::w_over_rmax.

◆ getCGWidthalls()

template<StatType T>
bool StatisticsVector< T >::getCGWidthalls ( )
inline
556  {
557  return walls;
558  }
bool walls
Turns off walls before evaluation.
Definition: StatisticsVector.h:1103

References StatisticsVector< T >::walls.

◆ getCGWidthSquared()

template<StatType T>
Mdouble StatisticsVector< T >::getCGWidthSquared ( )
inline
340  {
341  return w2;
342  }

References StatisticsVector< T >::w2.

◆ getCutoff()

template<StatType T>
Mdouble StatisticsVector< T >::getCutoff ( )
inline
348  {
349  return cutoff;
350  }
Mdouble cutoff
The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polyn...
Definition: StatisticsVector.h:1055

References StatisticsVector< T >::cutoff.

◆ getCutoff2()

template<StatType T>
Mdouble StatisticsVector< T >::getCutoff2 ( )
inline
356  {
357  return mathsFunc::square(cutoff);
358  }
T square(const T val)
squares a number
Definition: ExtendedMath.h:106

References StatisticsVector< T >::cutoff, and mathsFunc::square().

◆ getDoDoublePoints()

template<StatType T>
bool StatisticsVector< T >::getDoDoublePoints ( )
inline
851  {
852  return doDoublePoints;
853  }
bool doDoublePoints
Definition: StatisticsVector.h:1146

References StatisticsVector< T >::doDoublePoints.

◆ getDoGradient()

template<StatType T>
bool StatisticsVector< T >::getDoGradient ( )
inline
484  {
485  return doGradient;
486  }
bool doGradient
Determines if gradient is outputted.
Definition: StatisticsVector.h:1027

References StatisticsVector< T >::doGradient.

◆ getDoIgnoreFixedParticles()

template<StatType T>
bool StatisticsVector< T >::getDoIgnoreFixedParticles ( )
inline
516  {
517  return ignoreFixedParticles;
518  }
bool ignoreFixedParticles
Determines if fixed particles contribute to particle statistics (density, ...)
Definition: StatisticsVector.h:1114

References StatisticsVector< T >::ignoreFixedParticles.

◆ getDoPeriodicWalls()

template<StatType T>
bool StatisticsVector< T >::getDoPeriodicWalls ( )
inline
572  {
573  return periodicWalls;
574  }
bool periodicWalls
Turns off periodic walls before evaluation (needed for averaging, because we do not yet check if part...
Definition: StatisticsVector.h:1109

References StatisticsVector< T >::periodicWalls.

◆ getDoTimeAverage()

template<StatType T>
bool StatisticsVector< T >::getDoTimeAverage ( )
inline
406  {
407  return doTimeAverage;
408  }
bool doTimeAverage
Determines if output is averaged over time.
Definition: StatisticsVector.h:1012

References StatisticsVector< T >::doTimeAverage.

◆ getDoVariance()

template<StatType T>
bool StatisticsVector< T >::getDoVariance ( )
inline
467  {
468  return doVariance;
469  }
bool doVariance
Determines if variance is outputted.
Definition: StatisticsVector.h:1022

References StatisticsVector< T >::doVariance.

◆ getMirrorAtDomainBoundary()

template<StatType T>
Mdouble StatisticsVector< T >::getMirrorAtDomainBoundary ( )
inline
450  {
451  return mirrorAtDomainBoundary;
452  }
Mdouble mirrorAtDomainBoundary
0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at...
Definition: StatisticsVector.h:1138

References StatisticsVector< T >::mirrorAtDomainBoundary.

◆ getN()

template<StatType T>
void StatisticsVector< T >::getN ( int &  nx_,
int &  ny_,
int &  nz_ 
)
inline
309  {
310  nx_ = nx;
311  ny_ = ny;
312  nz_ = nz;
313  }
int ny
see nx
Definition: StatisticsVector.h:954
int nz
see nx
Definition: StatisticsVector.h:955
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
Definition: StatisticsVector.h:953

References StatisticsVector< T >::nx, StatisticsVector< T >::ny, and StatisticsVector< T >::nz.

◆ getNTimeAverage()

template<StatType T>
int StatisticsVector< T >::getNTimeAverage ( )
inline
801  {
802  return nTimeAverage;
803  }
int nTimeAverage
A counter needed to average over time.
Definition: StatisticsVector.h:1032

References StatisticsVector< T >::nTimeAverage.

◆ getNTimeAverageReset()

template<StatType T>
bool StatisticsVector< T >::getNTimeAverageReset ( )
inline
867  {
868  return nTimeAverageReset;
869  }
int nTimeAverageReset
Determines after how many time steps the time average is reset.
Definition: StatisticsVector.h:1017

References StatisticsVector< T >::nTimeAverageReset.

◆ getNX()

template<StatType T>
int StatisticsVector< T >::getNX ( )
inline
200  {
201  return nx;
202  }

References StatisticsVector< T >::nx.

◆ getNY()

template<StatType T>
int StatisticsVector< T >::getNY ( )
inline
208  {
209  return ny;
210  }

References StatisticsVector< T >::ny.

◆ getNZ()

template<StatType T>
int StatisticsVector< T >::getNZ ( )
inline
216  {
217  return nz;
218  }

References StatisticsVector< T >::nz.

◆ getPolynomialName()

template<StatType T>
std::string StatisticsVector< T >::getPolynomialName ( )
inline
835  {
836  return CGPolynomial.getName();
837  }

References StatisticsVector< T >::CGPolynomial.

◆ getStepSize()

template<StatType T>
unsigned int StatisticsVector< T >::getStepSize ( ) const
inline
923  {
924  return stepSize_;
925  }
unsigned int stepSize_
Definition: StatisticsVector.h:1225

References StatisticsVector< T >::stepSize_.

◆ getStressTypeForFixedParticles()

template<StatType T>
int StatisticsVector< T >::getStressTypeForFixedParticles ( )
inline
423  {
425  }
int StressTypeForFixedParticles
Stress type for fixed particles.
Definition: StatisticsVector.h:1123

References StatisticsVector< T >::StressTypeForFixedParticles.

◆ getSuperExact()

template<StatType T>
bool StatisticsVector< T >::getSuperExact ( )
inline
500  {
501  return superexact;
502  }
bool superexact
If true, cutoff radius for Gaussian is set to 5*w (from 3*w)
Definition: StatisticsVector.h:1143

References StatisticsVector< T >::superexact.

◆ getTimeMaxStat()

template<StatType T>
Mdouble StatisticsVector< T >::getTimeMaxStat ( )
inline
256  {
257  if (std::isnan(tMaxStat))
258  return getTimeMax();
259  else
260  return tMaxStat;
261  }
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:888
Mdouble tMaxStat
Statistical output will only be created if t<tMaxStat.
Definition: StatisticsVector.h:1072

References DPMBase::getTimeMax(), and StatisticsVector< T >::tMaxStat.

Referenced by StatisticsVector< T >::check_current_time_for_statistics().

◆ getVelocityProfile()

template<StatType T>
Vec3D StatisticsVector< T >::getVelocityProfile ( Vec3D  Position)
protected

◆ getVerbosityLevel()

template<StatType T>
int StatisticsVector< T >::getVerbosityLevel ( ) const
inline
540  {
541  return verbosity;
542  }
int verbosity
Determines how much is outputted to the terminal.
Definition: StatisticsVector.h:1131

References StatisticsVector< T >::verbosity.

Referenced by statistics_while_running< T >::printTime().

◆ getXMaxStat()

template<StatType T>
Mdouble StatisticsVector< T >::getXMaxStat ( )
inline
720  {
721  if (std::isnan(xMaxStat))
722  return getXMax();
723  else
724  return xMaxStat;
725  }
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax.
Definition: DPMBase.h:626
Mdouble xMaxStat
Definition: StatisticsVector.h:959

References DPMBase::getXMax(), and StatisticsVector< T >::xMaxStat.

Referenced by StatisticsVector< T >::set_hx().

◆ getXMinStat()

template<StatType T>
Mdouble StatisticsVector< T >::getXMinStat ( )
inline

Functions to acces and change the domain of statistics.

687  {
688  if (std::isnan(xMinStat))
689  return getXMin();
690  else
691  return xMinStat;
692  }
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin.
Definition: DPMBase.h:619
Mdouble xMinStat
By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain va...
Definition: StatisticsVector.h:959

References DPMBase::getXMin(), and StatisticsVector< T >::xMinStat.

Referenced by StatisticsVector< T >::set_hx().

◆ getYMaxStat()

template<StatType T>
Mdouble StatisticsVector< T >::getYMaxStat ( )
inline
731  {
732  if (std::isnan(yMaxStat))
733  return getYMax();
734  else
735  return yMaxStat;
736  }
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax.
Definition: DPMBase.h:638
Mdouble yMaxStat
Definition: StatisticsVector.h:959

References DPMBase::getYMax(), and StatisticsVector< T >::yMaxStat.

Referenced by StatisticsVector< T >::set_hy().

◆ getYMinStat()

template<StatType T>
Mdouble StatisticsVector< T >::getYMinStat ( )
inline
698  {
699  if (std::isnan(yMinStat))
700  return getYMin();
701  else
702  return yMinStat;
703  }
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin.
Definition: DPMBase.h:632
Mdouble yMinStat
Definition: StatisticsVector.h:959

References DPMBase::getYMin(), and StatisticsVector< T >::yMinStat.

Referenced by StatisticsVector< T >::set_hy().

◆ getZMaxStat()

template<StatType T>
Mdouble StatisticsVector< T >::getZMaxStat ( )
inline
742  {
743  if (std::isnan(zMaxStat))
744  return getZMax();
745  else
746  return zMaxStat;
747  }
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax.
Definition: DPMBase.h:650
Mdouble zMaxStat
Definition: StatisticsVector.h:959

References DPMBase::getZMax(), and StatisticsVector< T >::zMaxStat.

Referenced by StatisticsVector< T >::set_hz().

◆ getZMinStat()

template<StatType T>
Mdouble StatisticsVector< T >::getZMinStat ( )
inline
709  {
710  if (std::isnan(zMinStat))
711  return getZMin();
712  else
713  return zMinStat;
714  }
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin.
Definition: DPMBase.h:644
Mdouble zMinStat
Definition: StatisticsVector.h:959

References DPMBase::getZMin(), and StatisticsVector< T >::zMinStat.

Referenced by StatisticsVector< T >::set_hz().

◆ initialiseStatistics()

template<StatType T>
void StatisticsVector< T >::initialiseStatistics ( )
virtual

Initializes statistics, i.e. setting w2, setting the grid and writing the header lines in the .stat file.

Reimplemented from DPMBase.

Referenced by statistics_while_running< T >::initialiseStatistics().

◆ jump_fstat()

template<StatType T>
void StatisticsVector< T >::jump_fstat ( )

◆ jump_p3c()

template<StatType T>
void StatisticsVector< T >::jump_p3c ( )

◆ loadPositions()

template<StatType T>
bool StatisticsVector< T >::loadPositions ( const char filename)
protected

◆ loadVelocityProfile()

template<StatType T>
bool StatisticsVector< T >::loadVelocityProfile ( const char filename)
protected

◆ outputStatistics()

template<StatType T>
void StatisticsVector< T >::outputStatistics ( )
virtual

Calculates statistics for Particles (i.e. not collisions)

Reimplemented from DPMBase.

◆ print_CG()

template<StatType T>
std::string StatisticsVector< T >::print_CG ( )

Output coarse graining variables.

◆ print_help()

template<StatType T>
void StatisticsVector< T >::print_help ( )

◆ printStat()

template<StatType T>
std::string StatisticsVector< T >::printStat ( )

Outputs member variable values to a std::string.

Referenced by CLiveStatistics< T >::setupInitialConditions(), and statistics_while_running< T >::setupInitialConditions().

◆ processStatistics()

template<StatType T>
void StatisticsVector< T >::processStatistics ( bool  usethese)
virtual

Processes all gathered statistics and resets them afterwards. (Processing means either calculating time averages or writing out statistics)

Reimplemented from DPMBase.

Referenced by statistics_while_running< T >::processStatistics().

◆ read_next_from_p3p_file()

template<StatType T>
bool StatisticsVector< T >::read_next_from_p3p_file ( )
protected

◆ readNextDataFile()

template<StatType T>
bool StatisticsVector< T >::readNextDataFile ( unsigned int  format)

◆ readStatArguments()

template<StatType T>
void StatisticsVector< T >::readStatArguments ( int  argc,
char argv[] 
)

◆ reset_statistics()

template<StatType T>
virtual void StatisticsVector< T >::reset_statistics ( )
virtual

Set all statistical variables to zero.

◆ satisfiesInclusionCriteria()

template<StatType T>
bool StatisticsVector< T >::satisfiesInclusionCriteria ( BaseParticle P)
protected

◆ set_h()

template<StatType T>
void StatisticsVector< T >::set_h ( Mdouble  h)
inline
190  {
191  set_hx(h);
192  set_hy(h);
193  set_hz(h);
194  }
void set_hy(Mdouble hy)
Definition: StatisticsVector.h:151
void set_hx(Mdouble hx)
Definition: StatisticsVector.h:135
void set_hz(Mdouble hz)
Definition: StatisticsVector.h:171

References StatisticsVector< T >::set_hx(), StatisticsVector< T >::set_hy(), and StatisticsVector< T >::set_hz().

Referenced by main().

◆ set_hmax()

template<StatType T>
void StatisticsVector< T >::set_hmax ( Mdouble  new_)
inline
891  {
892  hmax = new_;
893  }
Mdouble hmax
defines the maximum height of the particles for which statistics are extracted
Definition: StatisticsVector.h:1098

References StatisticsVector< T >::hmax.

◆ set_hx()

template<StatType T>
void StatisticsVector< T >::set_hx ( Mdouble  hx)
inline
136  {
137  setNX(static_cast<int>(std::ceil((getXMaxStat() - getXMinStat()) / hx)));
138  }
Mdouble getXMaxStat()
Definition: StatisticsVector.h:719
Mdouble getXMinStat()
Functions to acces and change the domain of statistics.
Definition: StatisticsVector.h:686
void setNX(int new_)
Definition: StatisticsVector.h:127

References StatisticsVector< T >::getXMaxStat(), StatisticsVector< T >::getXMinStat(), and StatisticsVector< T >::setNX().

Referenced by StatisticsVector< T >::set_h().

◆ set_hy()

template<StatType T>
void StatisticsVector< T >::set_hy ( Mdouble  hy)
inline
152  {
153  setNY(static_cast<int>(std::ceil((getYMaxStat() - getYMinStat()) / hy)));
154  }
Mdouble getYMaxStat()
Definition: StatisticsVector.h:730
Mdouble getYMinStat()
Definition: StatisticsVector.h:697
void setNY(int new_)
Definition: StatisticsVector.h:143

References StatisticsVector< T >::getYMaxStat(), StatisticsVector< T >::getYMinStat(), and StatisticsVector< T >::setNY().

Referenced by StatisticsVector< T >::set_h().

◆ set_hz()

template<StatType T>
void StatisticsVector< T >::set_hz ( Mdouble  hz)
inline
172  {
173  setNZ(static_cast<int>(std::ceil((getZMaxStat() - getZMinStat()) / hz)));
174  }
Mdouble getZMaxStat()
Definition: StatisticsVector.h:741
Mdouble getZMinStat()
Definition: StatisticsVector.h:708
void setNZ(int new_)
Definition: StatisticsVector.h:159

References StatisticsVector< T >::getZMaxStat(), StatisticsVector< T >::getZMinStat(), and StatisticsVector< T >::setNZ().

Referenced by StatisticsVector< T >::set_h().

◆ set_infiniteStressForFixedParticles()

template<StatType T>
void StatisticsVector< T >::set_infiniteStressForFixedParticles ( bool  new_)
inline

◆ set_Polynomial() [1/2]

template<StatType T>
void StatisticsVector< T >::set_Polynomial ( Mdouble new_coefficients,
unsigned int  num_coeff,
unsigned int  new_dim 
)
inline
819  {
820  CGPolynomial.set_polynomial(new_coefficients, num_coeff, new_dim);
821  }

References StatisticsVector< T >::CGPolynomial.

◆ set_Polynomial() [2/2]

template<StatType T>
void StatisticsVector< T >::set_Polynomial ( std::vector< Mdouble new_coefficients,
unsigned int  new_dim 
)
inline
811  {
812  CGPolynomial.set_polynomial(new_coefficients, new_dim);
813  }

References StatisticsVector< T >::CGPolynomial.

◆ set_rmax()

template<StatType T>
void StatisticsVector< T >::set_rmax ( Mdouble  new_)
inline
883  {
884  rmax = new_;
885  }
Mdouble rmax
defines the maximum radius of the particles for which statistics are extracted
Definition: StatisticsVector.h:1093

References StatisticsVector< T >::rmax.

◆ set_rmin()

template<StatType T>
void StatisticsVector< T >::set_rmin ( Mdouble  new_)
inline
875  {
876  rmin = new_;
877  }
Mdouble rmin
defines the minimum radius of the particles for which statistics are extracted
Definition: StatisticsVector.h:1088

References StatisticsVector< T >::rmin.

◆ set_statType()

template<StatType T>
void StatisticsVector< T >::set_statType ( )

◆ setCGShape() [1/2]

template<StatType T>
void StatisticsVector< T >::setCGShape ( CG_TYPE  new_)

◆ setCGShape() [2/2]

template<StatType T>
void StatisticsVector< T >::setCGShape ( const char new_)

Referenced by main().

◆ setCGTimeAveragingInterval()

template<StatType T>
void StatisticsVector< T >::setCGTimeAveragingInterval ( Mdouble  t)
inline
240  {
241  tIntStat = t;
242  }

References StatisticsVector< T >::tIntStat.

◆ setCGTimeMin()

template<StatType T>
void StatisticsVector< T >::setCGTimeMin ( Mdouble  t)
inline

◆ setCGWidth()

template<StatType T>
void StatisticsVector< T >::setCGWidth ( Mdouble  w)
inline

Set CG variables w2 and CG_invvolume.

318  {
320  }
void setCGWidth2(Mdouble new_)
Set CG variables w2 and CG_invvolume.

References StatisticsVector< T >::setCGWidth2(), and mathsFunc::square().

Referenced by main(), statistics_while_running< T >::run(), and statistics_while_running< T >::statistics_while_running().

◆ setCGWidth2()

template<StatType T>
void StatisticsVector< T >::setCGWidth2 ( Mdouble  new_)

Set CG variables w2 and CG_invvolume.

Referenced by StatisticsVector< T >::setCGWidth().

◆ setCGWidth_over_rmax()

template<StatType T>
void StatisticsVector< T >::setCGWidth_over_rmax ( Mdouble  new_)
inline
581  {
582  w_over_rmax = new_;
583  }

References StatisticsVector< T >::w_over_rmax.

◆ setCGWidthalls()

template<StatType T>
void StatisticsVector< T >::setCGWidthalls ( bool  new_)
inline
548  {
549  walls = new_;
550  }

References StatisticsVector< T >::walls.

◆ setDoDoublePoints()

template<StatType T>
void StatisticsVector< T >::setDoDoublePoints ( bool  new_)
inline
843  {
844  doDoublePoints = new_;
845  }

References StatisticsVector< T >::doDoublePoints.

◆ setDoGradient()

template<StatType T>
void StatisticsVector< T >::setDoGradient ( bool  new_)
inline
476  {
477  doGradient = new_;
478  }

References StatisticsVector< T >::doGradient.

◆ setDoIgnoreFixedParticles()

template<StatType T>
void StatisticsVector< T >::setDoIgnoreFixedParticles ( bool  new_)
inline
508  {
509  ignoreFixedParticles = new_;
510  }

References StatisticsVector< T >::ignoreFixedParticles.

◆ setDoPeriodicWalls()

◆ setDoTimeAverage()

template<StatType T>
void StatisticsVector< T >::setDoTimeAverage ( bool  new_)
inline
398  {
399  doTimeAverage = new_;
400  }

References StatisticsVector< T >::doTimeAverage.

◆ setDoVariance()

template<StatType T>
void StatisticsVector< T >::setDoVariance ( bool  new_)
inline
459  {
460  doVariance = new_;
461  }

References StatisticsVector< T >::doVariance.

◆ setIndSpecies()

template<StatType T>
void StatisticsVector< T >::setIndSpecies ( unsigned int  indSpecies)
inline
939  {
940  this->indSpecies = indSpecies;
941  }
Mdouble indSpecies
defines the species for which statistics are extracted (-1 for all species)
Definition: StatisticsVector.h:1082

References StatisticsVector< T >::indSpecies.

◆ setInfinitelyLongDistance()

template<StatType T>
Mdouble StatisticsVector< T >::setInfinitelyLongDistance ( )

◆ setMirrorAtDomainBoundary()

template<StatType T>
void StatisticsVector< T >::setMirrorAtDomainBoundary ( Mdouble  new_)
inline
442  {
443  mirrorAtDomainBoundary = new_;
444  }

References StatisticsVector< T >::mirrorAtDomainBoundary.

◆ setN() [1/2]

template<StatType T>
void StatisticsVector< T >::setN ( int  n)
inline
180  {
181  setNX(n);
182  setNY(n);
183  setNZ(n);
184  }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32

References n, StatisticsVector< T >::setNX(), StatisticsVector< T >::setNY(), and StatisticsVector< T >::setNZ().

Referenced by main(), statistics_while_running< T >::run(), and statistics_while_running< T >::statistics_while_running().

◆ setN() [2/2]

template<StatType T>
void StatisticsVector< T >::setN ( int  nx_,
int  ny_,
int  nz_ 
)
inline
302  {
303  nx = nx_;
304  ny = ny_;
305  nz = nz_;
306  }

References StatisticsVector< T >::nx, StatisticsVector< T >::ny, and StatisticsVector< T >::nz.

◆ setNTimeAverageReset()

template<StatType T>
void StatisticsVector< T >::setNTimeAverageReset ( int  new_)
inline
859  {
860  nTimeAverageReset = new_;
861  }

References StatisticsVector< T >::nTimeAverageReset.

◆ setNX()

template<StatType T>
void StatisticsVector< T >::setNX ( int  new_)
inline

◆ setNY()

template<StatType T>
void StatisticsVector< T >::setNY ( int  new_)
inline

◆ setNZ()

template<StatType T>
void StatisticsVector< T >::setNZ ( int  new_)
inline
160  {
161  nz = new_;
162  if (getSystemDimensions() < 3)
163  {
164  logger(WARN, "Warning in set_nz: dimension less than 3");
165  }
166  }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ WARN
unsigned int getSystemDimensions() const
Returns the system dimensionality.
Definition: DPMBase.cc:1430

References DPMBase::getSystemDimensions(), logger, StatisticsVector< T >::nz, and WARN.

Referenced by main(), StatisticsVector< T >::set_hz(), StatisticsVector< T >::setN(), and statistics_while_running< T >::statistics_while_running().

◆ setPolynomialName()

template<StatType T>
void StatisticsVector< T >::setPolynomialName ( const char new_name)
inline
827  {
828  CGPolynomial.setName(new_name);
829  }

References StatisticsVector< T >::CGPolynomial.

◆ setPositions()

template<StatType T>
void StatisticsVector< T >::setPositions ( )

Set position of StatisticsPoint points and set variables to 0.

◆ setStepSize()

template<StatType T>
void StatisticsVector< T >::setStepSize ( unsigned int  stepSize)
inline
931  {
932  stepSize_ = stepSize;
933  }

References StatisticsVector< T >::stepSize_.

◆ setStressTypeForFixedParticles()

template<StatType T>
void StatisticsVector< T >::setStressTypeForFixedParticles ( int  new_)
inline

◆ setSuperExact()

template<StatType T>
void StatisticsVector< T >::setSuperExact ( bool  new_)
inline
492  {
493  superexact = new_;
494  }

References StatisticsVector< T >::superexact.

Referenced by main().

◆ setTimeMaxStat()

template<StatType T>
void StatisticsVector< T >::setTimeMaxStat ( Mdouble  t)
inline

◆ setVerbosityLevel()

template<StatType T>
void StatisticsVector< T >::setVerbosityLevel ( int  new_)
inline
532  {
533  verbosity = new_;
534  }

References StatisticsVector< T >::verbosity.

Referenced by main().

◆ setXMaxStat()

template<StatType T>
void StatisticsVector< T >::setXMaxStat ( Mdouble  xMaxStat_)
inline
777  {
778  xMaxStat = xMaxStat_;
779  }

References StatisticsVector< T >::xMaxStat.

◆ setXMinStat()

template<StatType T>
void StatisticsVector< T >::setXMinStat ( Mdouble  xMinStat_)
inline
753  {
754  xMinStat = xMinStat_;
755  }

References StatisticsVector< T >::xMinStat.

◆ setYMaxStat()

template<StatType T>
void StatisticsVector< T >::setYMaxStat ( Mdouble  yMaxStat_)
inline
785  {
786  yMaxStat = yMaxStat_;
787  }

References StatisticsVector< T >::yMaxStat.

◆ setYMinStat()

template<StatType T>
void StatisticsVector< T >::setYMinStat ( Mdouble  yMinStat_)
inline
761  {
762  yMinStat = yMinStat_;
763  }

References StatisticsVector< T >::yMinStat.

◆ setZMaxStat()

template<StatType T>
void StatisticsVector< T >::setZMaxStat ( Mdouble  zMaxStat_)
inline
793  {
794  zMaxStat = zMaxStat_;
795  }

References StatisticsVector< T >::zMaxStat.

Referenced by main().

◆ setZMinStat()

template<StatType T>
void StatisticsVector< T >::setZMinStat ( Mdouble  zMinStat_)
inline
769  {
770  zMinStat = zMinStat_;
771  }

References StatisticsVector< T >::zMinStat.

Referenced by main().

◆ statistics_from_fstat_and_data()

template<StatType T>
void StatisticsVector< T >::statistics_from_fstat_and_data ( )

get StatisticsPoint

Referenced by main(), and Statistics().

◆ statistics_from_p3()

template<StatType T>
void StatisticsVector< T >::statistics_from_p3 ( )

Referenced by main().

◆ verbose()

template<StatType T>
void StatisticsVector< T >::verbose ( )
inline

◆ write_statistics()

template<StatType T>
void StatisticsVector< T >::write_statistics ( )

Writes regular statistics.

◆ write_time_average_statistics()

template<StatType T>
void StatisticsVector< T >::write_time_average_statistics ( )

Writes out time averaged statistics.

◆ writeOutputFiles()

template<StatType T>
void StatisticsVector< T >::writeOutputFiles ( )
virtual

Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and .restart (see the Mercury website for more details regarding these files).

Writes headers and all relevant information to the relevant output files. Note that the writeFstatHeader() actually contains within it the functionality to write the full fstat data, whereas for .ene files the functions to write the headers and main data are separate. Note that the interaction file is not written here: it is written with the start and end of each interaction.

The function [X].saveCurrentTimeStep(numberOfTimeSteps_) returns true if:

a) The current time step is greater than or equal to the time step at which the next write or read operation is supposed to happen.

b) The FileType is not "NO_FILE".

c) The file is open.

Reimplemented from DPMBase.

Member Data Documentation

◆ centerPointInFStat_

template<StatType T>
bool StatisticsVector< T >::centerPointInFStat_ = true
protected

◆ CG_type

template<StatType T>
CG_TYPE StatisticsVector< T >::CG_type
protected

coarse graining type (Gaussian, Heaviside, Polynomial)

Referenced by StatisticsVector< T >::getCGShape().

◆ CGPolynomial

◆ cutoff

template<StatType T>
Mdouble StatisticsVector< T >::cutoff
protected

The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polynomial, 3*w for Gaussian.

Referenced by StatisticsVector< T >::getCutoff(), and StatisticsVector< T >::getCutoff2().

◆ cutoff2

template<StatType T>
Mdouble StatisticsVector< T >::cutoff2
protected

◆ doDoublePoints

template<StatType T>
bool StatisticsVector< T >::doDoublePoints
protected

◆ doGradient

template<StatType T>
bool StatisticsVector< T >::doGradient
protected

Determines if gradient is outputted.

Referenced by StatisticsVector< T >::getDoGradient(), and StatisticsVector< T >::setDoGradient().

◆ doTimeAverage

template<StatType T>
bool StatisticsVector< T >::doTimeAverage
protected

Determines if output is averaged over time.

Referenced by StatisticsVector< T >::getDoTimeAverage(), main(), and StatisticsVector< T >::setDoTimeAverage().

◆ doVariance

template<StatType T>
bool StatisticsVector< T >::doVariance
protected

Determines if variance is outputted.

Referenced by StatisticsVector< T >::getDoVariance(), and StatisticsVector< T >::setDoVariance().

◆ dx

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::dx
protected

A vector that stores the gradient in x of all statistical variables at a given position.

◆ dxTimeAverage

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::dxTimeAverage
protected

a vector used to sum up all statistical gradients in dx for time-averaging

◆ dy

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::dy
protected

A vector that stores the gradient in y of all statistical variables at a given position.

◆ dyTimeAverage

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::dyTimeAverage
protected

a vector used to sum up all statistical gradients in dy for time-averaging

◆ dz

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::dz
protected

A vector that stores the gradient in z of all statistical variables at a given position.

◆ dzTimeAverage

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::dzTimeAverage
protected

a vector used to sum up all statistical gradients in dz for time-averaging

◆ format

template<StatType T>
int StatisticsVector< T >::format
protected

format of the data input file

◆ hmax

template<StatType T>
Mdouble StatisticsVector< T >::hmax
protected

defines the maximum height of the particles for which statistics are extracted

Referenced by StatisticsVector< T >::set_hmax().

◆ ignoreFixedParticles

template<StatType T>
bool StatisticsVector< T >::ignoreFixedParticles
protected

Determines if fixed particles contribute to particle statistics (density, ...)

Referenced by StatisticsVector< T >::getDoIgnoreFixedParticles(), and StatisticsVector< T >::setDoIgnoreFixedParticles().

◆ indSpecies

template<StatType T>
Mdouble StatisticsVector< T >::indSpecies
protected

defines the species for which statistics are extracted (-1 for all species)

Referenced by StatisticsVector< T >::setIndSpecies().

◆ isMDCLR

template<StatType T>
bool StatisticsVector< T >::isMDCLR
protected

◆ mirrorAtDomainBoundary

template<StatType T>
Mdouble StatisticsVector< T >::mirrorAtDomainBoundary
protected

0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at the domain boundaries; up to a maximum depth specified by this number

Referenced by StatisticsVector< T >::getMirrorAtDomainBoundary(), and StatisticsVector< T >::setMirrorAtDomainBoundary().

◆ nTimeAverage

template<StatType T>
int StatisticsVector< T >::nTimeAverage
protected

A counter needed to average over time.

Referenced by StatisticsVector< T >::getNTimeAverage().

◆ nTimeAverageReset

template<StatType T>
int StatisticsVector< T >::nTimeAverageReset
protected

Determines after how many time steps the time average is reset.

Referenced by StatisticsVector< T >::getNTimeAverageReset(), and StatisticsVector< T >::setNTimeAverageReset().

◆ nx

template<StatType T>
int StatisticsVector< T >::nx
protected

Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat,xMaxStat]x[yMinStat,yMaxStat]x[zMinStat,zMaxStat].

Referenced by StatisticsVector< T >::getN(), StatisticsVector< T >::getNX(), StatisticsVector< T >::setN(), and StatisticsVector< T >::setNX().

◆ nxMirrored

template<StatType T>
int StatisticsVector< T >::nxMirrored
protected

extension of grid size from mirrored points

◆ ny

◆ nyMirrored

template<StatType T>
int StatisticsVector< T >::nyMirrored
protected

◆ nz

◆ nzMirrored

template<StatType T>
int StatisticsVector< T >::nzMirrored
protected

◆ P1

template<StatType T>
Vec3D StatisticsVector< T >::P1
protected

Position of first contact point.

◆ P1_P2_CollisionalHeatFlux

template<StatType T>
Vec3D StatisticsVector< T >::P1_P2_CollisionalHeatFlux
protected

not yet working

◆ P1_P2_Contact

template<StatType T>
Vec3D StatisticsVector< T >::P1_P2_Contact
protected

◆ P1_P2_ContactCoupleStress

template<StatType T>
Matrix3D StatisticsVector< T >::P1_P2_ContactCoupleStress
protected

◆ P1_P2_Dissipation

template<StatType T>
Mdouble StatisticsVector< T >::P1_P2_Dissipation
protected

not yet working

◆ P1_P2_distance

template<StatType T>
Mdouble StatisticsVector< T >::P1_P2_distance
protected

Length of contact line.

◆ P1_P2_Fabric

template<StatType T>
MatrixSymmetric3D StatisticsVector< T >::P1_P2_Fabric
protected

Fabric.

◆ P1_P2_normal

template<StatType T>
Vec3D StatisticsVector< T >::P1_P2_normal
protected

Direction of contact.

◆ P1_P2_NormalStress

template<StatType T>
Matrix3D StatisticsVector< T >::P1_P2_NormalStress
protected

Contact stress from normal forces along the line of contact.

◆ P1_P2_NormalTraction

template<StatType T>
Vec3D StatisticsVector< T >::P1_P2_NormalTraction
protected

Traction from normal forces at contact of flow with fixed particles or walls.

◆ P1_P2_Potential

template<StatType T>
Mdouble StatisticsVector< T >::P1_P2_Potential
protected

not yet working

◆ P1_P2_TangentialStress

template<StatType T>
Matrix3D StatisticsVector< T >::P1_P2_TangentialStress
protected

Contact stress from tangential forces along the line of contact.

◆ P1_P2_TangentialTraction

template<StatType T>
Vec3D StatisticsVector< T >::P1_P2_TangentialTraction
protected

Traction from tangential forces at contact of flow with fixed particles or walls.

◆ P2

template<StatType T>
Vec3D StatisticsVector< T >::P2
protected

Position of second contact point.

◆ p3c_file

template<StatType T>
std::fstream StatisticsVector< T >::p3c_file
protected

◆ p3Format

template<StatType T>
bool StatisticsVector< T >::p3Format = true
protected

◆ p3p_file

template<StatType T>
std::fstream StatisticsVector< T >::p3p_file
protected

◆ p3w_file

template<StatType T>
std::fstream StatisticsVector< T >::p3w_file
protected

◆ periodicWalls

template<StatType T>
bool StatisticsVector< T >::periodicWalls
protected

Turns off periodic walls before evaluation (needed for averaging, because we do not yet check if particle is in domain)

Todo:
{Thomas: the case periodicWalls=true seems to mess up some statistics. Needs to be checked or removed}

Referenced by StatisticsVector< T >::getDoPeriodicWalls(), and StatisticsVector< T >::setDoPeriodicWalls().

◆ Points

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::Points
protected

A vector that stores the values of the statistical variables at a given position.

Referenced by StatisticsVector< T >::getCGPoints().

◆ positions_

template<StatType T>
std::vector<Vec3D> StatisticsVector< T >::positions_
protected

◆ rmax

template<StatType T>
Mdouble StatisticsVector< T >::rmax
protected

defines the maximum radius of the particles for which statistics are extracted

Referenced by StatisticsVector< T >::set_rmax().

◆ rmin

template<StatType T>
Mdouble StatisticsVector< T >::rmin
protected

defines the minimum radius of the particles for which statistics are extracted

Todo:
Thomas: maybe this fixed condition should be replaced by a condition function, bool include_statistics_if()

Referenced by StatisticsVector< T >::set_rmin().

◆ statType

template<StatType T>
StatType StatisticsVector< T >::statType
protected

Possible values X,Y,Z,XY,XZ,YZ,XYZ,RAZ,RA,RZ,AZ,R,A are used to determine if the statistics are averaged; f.e. StatType X is averaged over y and z.

◆ stepSize_

template<StatType T>
unsigned int StatisticsVector< T >::stepSize_
protected

◆ StressTypeForFixedParticles

template<StatType T>
int StatisticsVector< T >::StressTypeForFixedParticles
protected

Stress type for fixed particles.

0 no Stress from fixed particles
1 Stress from fixed particles distributed between Contact and flowing Particle COM (default)
2 Stress from fixed particles distributed between fixed and flowing Particle COM
3 Stress from fixed particles extends from flowing particle to infinity

Referenced by StatisticsVector< T >::getStressTypeForFixedParticles(), StatisticsVector< T >::set_infiniteStressForFixedParticles(), and StatisticsVector< T >::setStressTypeForFixedParticles().

◆ superexact

template<StatType T>
bool StatisticsVector< T >::superexact
protected

If true, cutoff radius for Gaussian is set to 5*w (from 3*w)

Referenced by StatisticsVector< T >::getSuperExact(), and StatisticsVector< T >::setSuperExact().

◆ timeAverage

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::timeAverage
protected

A vector used to sum up all statistical values in Points for time-averaging.

◆ timeVariance

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::timeVariance
protected

a vector used to sum up the variance in time of all statistical values

◆ tIntStat

template<StatType T>
Mdouble StatisticsVector< T >::tIntStat
protected

Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat.

Referenced by StatisticsVector< T >::getCGTimeAveragingInterval(), and StatisticsVector< T >::setCGTimeAveragingInterval().

◆ tMaxStat

template<StatType T>
Mdouble StatisticsVector< T >::tMaxStat
protected

Statistical output will only be created if t<tMaxStat.

Referenced by StatisticsVector< T >::getTimeMaxStat(), and StatisticsVector< T >::setTimeMaxStat().

◆ tMinStat

template<StatType T>
Mdouble StatisticsVector< T >::tMinStat
protected

Statistical output will only be created if t>tMinStat.

Referenced by StatisticsVector< T >::getCGTimeMin(), and StatisticsVector< T >::setCGTimeMin().

◆ VelocityProfile

template<StatType T>
std::vector<Vec3D> StatisticsVector< T >::VelocityProfile
protected

◆ VelocityProfile_D

template<StatType T>
Vec3D StatisticsVector< T >::VelocityProfile_D
protected

◆ VelocityProfile_Min

template<StatType T>
Vec3D StatisticsVector< T >::VelocityProfile_Min
protected

◆ verbosity

template<StatType T>
int StatisticsVector< T >::verbosity
protected

Determines how much is outputted to the terminal.

0 no output
1 basic output (time steps)
2 full output (number of forces and particles, md and stat parameters)

Referenced by StatisticsVector< T >::getVerbosityLevel(), StatisticsVector< T >::setVerbosityLevel(), and StatisticsVector< T >::verbose().

◆ w2

template<StatType T>
Mdouble StatisticsVector< T >::w2
protected

coarse graining width squared; for HeavisideSphere and Gaussian

Referenced by StatisticsVector< T >::getCGWidth(), and StatisticsVector< T >::getCGWidthSquared().

◆ w_over_rmax

template<StatType T>
Mdouble StatisticsVector< T >::w_over_rmax
protected

if w is not set manually then w will be set by multiplying this value by the largest particle radius at t=0

Referenced by StatisticsVector< T >::getCGWidth_over_rmax(), and StatisticsVector< T >::setCGWidth_over_rmax().

◆ walls

template<StatType T>
bool StatisticsVector< T >::walls
protected

Turns off walls before evaluation.

Referenced by StatisticsVector< T >::getCGWidthalls(), and StatisticsVector< T >::setCGWidthalls().

◆ xMaxStat

template<StatType T>
Mdouble StatisticsVector< T >::xMaxStat
protected

◆ xMinStat

template<StatType T>
Mdouble StatisticsVector< T >::xMinStat
protected

By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain values to nan), but can be resized.

Referenced by StatisticsVector< T >::getXMinStat(), and StatisticsVector< T >::setXMinStat().

◆ yMaxStat

template<StatType T>
Mdouble StatisticsVector< T >::yMaxStat
protected

◆ yMinStat

template<StatType T>
Mdouble StatisticsVector< T >::yMinStat
protected

◆ zMaxStat

template<StatType T>
Mdouble StatisticsVector< T >::zMaxStat
protected

◆ zMinStat

template<StatType T>
Mdouble StatisticsVector< T >::zMinStat
protected

The documentation for this class was generated from the following files: