MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StatisticsVector< T > Class Template Reference

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

#include <StatisticsPoint.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...
 
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)
 Inserts particles in the whole domain. More...
 
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
 Loads all MD data and plots statistics for all time steps in the .data file. More...
 
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...
 
MERCURY_DEPRECATED FilegetDataFile ()
 The non const version. Allows one to edit the File::dataFile. More...
 
MERCURY_DEPRECATED FilegetEneFile ()
 The non const version. Allows to edit the File::eneFile. More...
 
MERCURY_DEPRECATED FilegetFStatFile ()
 The non const version. Allows to edit the File::fStatFile. More...
 
MERCURY_DEPRECATED FilegetRestartFile ()
 The non const version. Allows to edit the File::restartFile. More...
 
MERCURY_DEPRECATED FilegetStatFile ()
 The non const version. Allows to edit the File::statFile. More...
 
FilegetInteractionFile ()
 Return a reference to the file InteractionsFile. More...
 
MERCURY_DEPRECATED const FilegetDataFile () const
 The const version. Does not allow for any editing of the File::dataFile. More...
 
MERCURY_DEPRECATED const FilegetEneFile () const
 The const version. Does not allow for any editing of the File::eneFile. More...
 
MERCURY_DEPRECATED const FilegetFStatFile () const
 The const version. Does not allow for any editing of the File::fStatFile. More...
 
MERCURY_DEPRECATED const FilegetRestartFile () const
 The const version. Does not allow for any editing of the File::restartFile. More...
 
MERCURY_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 setRotation (bool rotation)
 Sets whether particle rotation is enabled or disabled. More...
 
bool getRotation () const
 Indicates whether particle rotation is enabled or disabled. More...
 
void setWallsWriteVTK (FileType writeWallsVTK)
 Sets whether walls are written into a VTK file. More...
 
void setWallsWriteVTK (bool)
 Sets whether walls are written into a VTK file. More...
 
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)
 
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...
 
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 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...
 
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< unsignedgetNumberOfDomains ()
 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...
 
void writePythonFileForVTKVisualisation () const
 record when the simulation started More...
 

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...
 
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 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...
 

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  ReadOptions : int { ReadOptions::ReadAll, ReadOptions::ReadNoInteractions, ReadOptions::ReadNoParticlesAndInteractions }
 
enum  DomainSplit {
  DomainSplit::X, DomainSplit::Y, DomainSplit::Z, DomainSplit::XY,
  DomainSplit::XZ, DomainSplit::YZ, DomainSplit::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...
 

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).

Definition at line 36 of file StatisticsPoint.h.

Constructor & Destructor Documentation

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

Basic constructor only calls constructor()

Definition at line 77 of file StatisticsVector.h.

References StatisticsVector< T >::constructor().

78  {
79  constructor();
80  }
void constructor()
this is the actual constructor, sets up all basic things
template<StatType T>
StatisticsVector< T >::StatisticsVector ( std::string  name)
inline

Definition at line 85 of file StatisticsVector.h.

References StatisticsVector< T >::constructor().

86  {
87  constructor(name);
88  }
void constructor()
this is the actual constructor, sets up all basic things
template<StatType T>
StatisticsVector< T >::StatisticsVector ( StatisticsVector< T > &  other)

Copy constructor.

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

Advanced constructor that accepts arguments from the command line.

Member Function Documentation

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

Output average of statistical variables.

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

Definition at line 272 of file StatisticsVector.h.

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

273  {
274  return (getTime() >= getCGTimeMin() && getTime() <= getTimeMaxStat() + getTimeStep());
275  }
Mdouble getTimeMaxStat()
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1211
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:797
template<StatType T>
void StatisticsVector< T >::constructor ( )

this is the actual constructor, sets up all basic things

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

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

Calculates statistics for a single Particle.

template<StatType T>
void StatisticsVector< T >::evaluate_wall_force_statistics ( Vec3D  P,
int  wp = 0 
)
template<StatType T>
Mdouble StatisticsVector< T >::evaluateIntegral ( Mdouble  n1,
Mdouble  n2,
Mdouble  t 
)
inline

Definition at line 912 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

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

Definition at line 896 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

897  {
898  return CGPolynomial.evaluate(r);
899  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
template<StatType T>
Mdouble StatisticsVector< T >::evaluatePolynomialGradient ( Mdouble  r)
inline

Definition at line 904 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

905  {
906  return CGPolynomial.evaluateGradient(r);
907  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
template<StatType T>
void StatisticsVector< T >::finishStatistics ( )
virtual

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

Reimplemented from DPMBase.

template<StatType T>
void StatisticsVector< T >::gather_force_statistics_from_fstat_and_data ( )
template<StatType T>
void StatisticsVector< T >::gather_force_statistics_from_p3c ( int  version)
template<StatType T>
void StatisticsVector< T >::gather_force_statistics_from_p3w ( int  version,
std::vector< int > &  index 
)
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.

template<StatType T>
std::vector<StatisticsPoint<T> > StatisticsVector< T >::getCGPoints ( )
inline

Definition at line 676 of file StatisticsVector.h.

References StatisticsVector< T >::Points.

677  {
678  return Points;
679  }
std::vector< StatisticsPoint< T > > Points
A vector that stores the values of the statistical variables at a given position. ...
template<StatType T>
CG_TYPE StatisticsVector< T >::getCGShape ( )
inline

Definition at line 291 of file StatisticsVector.h.

References StatisticsVector< T >::CG_type.

292  {
293  return CG_type;
294  }
CG_TYPE CG_type
coarse graining type (Gaussian, Heaviside, Polynomial)
template<StatType T>
Mdouble StatisticsVector< T >::getCGTimeAveragingInterval ( )
inline

Definition at line 264 of file StatisticsVector.h.

References StatisticsVector< T >::tIntStat.

265  {
266  return tIntStat;
267  }
Mdouble tIntStat
Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat.
template<StatType T>
Mdouble StatisticsVector< T >::getCGTimeMin ( )
inline

Definition at line 245 of file StatisticsVector.h.

References StatisticsVector< T >::tMinStat.

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

246  {
247  return tMinStat;
248  }
Mdouble tMinStat
Statistical output will only be created if t>tMinStat.
template<StatType T>
Mdouble StatisticsVector< T >::getCGWidth ( )
inline

Definition at line 329 of file StatisticsVector.h.

References StatisticsVector< T >::w2.

330  {
331  return std::sqrt(w2);
332  }
Mdouble w2
coarse graining width squared; for HeavisideSphere and Gaussian
template<StatType T>
Mdouble StatisticsVector< T >::getCGWidth_over_rmax ( )
inline

Definition at line 586 of file StatisticsVector.h.

References StatisticsVector< T >::w_over_rmax.

587  {
588  return w_over_rmax;
589  }
Mdouble w_over_rmax
if w is not set manually then w will be set by multiplying this value by the largest particle radius ...
template<StatType T>
bool StatisticsVector< T >::getCGWidthalls ( )
inline

Definition at line 553 of file StatisticsVector.h.

References StatisticsVector< T >::walls.

554  {
555  return walls;
556  }
bool walls
Turns off walls before evaluation.
template<StatType T>
Mdouble StatisticsVector< T >::getCGWidthSquared ( )
inline

Definition at line 337 of file StatisticsVector.h.

References StatisticsVector< T >::w2.

338  {
339  return w2;
340  }
Mdouble w2
coarse graining width squared; for HeavisideSphere and Gaussian
template<StatType T>
Mdouble StatisticsVector< T >::getCutoff ( )
inline

Definition at line 345 of file StatisticsVector.h.

References StatisticsVector< T >::cutoff.

346  {
347  return cutoff;
348  }
Mdouble cutoff
The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polyn...
template<StatType T>
Mdouble StatisticsVector< T >::getCutoff2 ( )
inline

Definition at line 353 of file StatisticsVector.h.

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

354  {
355  return mathsFunc::square(cutoff);
356  }
Mdouble cutoff
The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polyn...
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
template<StatType T>
bool StatisticsVector< T >::getDoDoublePoints ( )
inline

Definition at line 848 of file StatisticsVector.h.

References StatisticsVector< T >::doDoublePoints.

849  {
850  return doDoublePoints;
851  }
template<StatType T>
bool StatisticsVector< T >::getDoGradient ( )
inline

Definition at line 481 of file StatisticsVector.h.

References StatisticsVector< T >::doGradient.

482  {
483  return doGradient;
484  }
bool doGradient
Determines if gradient is outputted.
template<StatType T>
bool StatisticsVector< T >::getDoIgnoreFixedParticles ( )
inline

Definition at line 513 of file StatisticsVector.h.

References StatisticsVector< T >::ignoreFixedParticles.

514  {
515  return ignoreFixedParticles;
516  }
bool ignoreFixedParticles
Determines if fixed particles contribute to particle statistics (density, ...)
template<StatType T>
bool StatisticsVector< T >::getDoPeriodicWalls ( )
inline

Definition at line 569 of file StatisticsVector.h.

References StatisticsVector< T >::periodicWalls.

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

Definition at line 403 of file StatisticsVector.h.

References StatisticsVector< T >::doTimeAverage.

404  {
405  return doTimeAverage;
406  }
bool doTimeAverage
Determines if output is averaged over time.
template<StatType T>
bool StatisticsVector< T >::getDoVariance ( )
inline

Definition at line 464 of file StatisticsVector.h.

References StatisticsVector< T >::doVariance.

465  {
466  return doVariance;
467  }
bool doVariance
Determines if variance is outputted.
template<StatType T>
Mdouble StatisticsVector< T >::getMirrorAtDomainBoundary ( )
inline

Definition at line 447 of file StatisticsVector.h.

References StatisticsVector< T >::mirrorAtDomainBoundary.

448  {
449  return mirrorAtDomainBoundary;
450  }
Mdouble mirrorAtDomainBoundary
0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at...
template<StatType T>
void StatisticsVector< T >::getN ( int &  nx_,
int &  ny_,
int &  nz_ 
)
inline

Definition at line 306 of file StatisticsVector.h.

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

307  {
308  nx_ = nx;
309  ny_ = ny;
310  nz_ = nz;
311  }
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
template<StatType T>
int StatisticsVector< T >::getNTimeAverage ( )
inline

Definition at line 798 of file StatisticsVector.h.

References StatisticsVector< T >::nTimeAverage.

799  {
800  return nTimeAverage;
801  }
int nTimeAverage
A counter needed to average over time.
template<StatType T>
bool StatisticsVector< T >::getNTimeAverageReset ( )
inline

Definition at line 864 of file StatisticsVector.h.

References StatisticsVector< T >::nTimeAverageReset.

865  {
866  return nTimeAverageReset;
867  }
int nTimeAverageReset
Determines after how many time steps the time average is reset.
template<StatType T>
int StatisticsVector< T >::getNX ( )
inline

Definition at line 197 of file StatisticsVector.h.

References StatisticsVector< T >::nx.

198  {
199  return nx;
200  }
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
template<StatType T>
int StatisticsVector< T >::getNY ( )
inline

Definition at line 205 of file StatisticsVector.h.

References StatisticsVector< T >::ny.

206  {
207  return ny;
208  }
template<StatType T>
int StatisticsVector< T >::getNZ ( )
inline

Definition at line 213 of file StatisticsVector.h.

References StatisticsVector< T >::nz.

214  {
215  return nz;
216  }
template<StatType T>
std::string StatisticsVector< T >::getPolynomialName ( )
inline

Definition at line 832 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

833  {
834  return CGPolynomial.getName();
835  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
template<StatType T>
unsigned int StatisticsVector< T >::getStepSize ( ) const
inline

Definition at line 920 of file StatisticsVector.h.

References StatisticsVector< T >::stepSize_.

921  {
922  return stepSize_;
923  }
unsigned int stepSize_
template<StatType T>
int StatisticsVector< T >::getStressTypeForFixedParticles ( )
inline

Definition at line 420 of file StatisticsVector.h.

References StatisticsVector< T >::StressTypeForFixedParticles.

421  {
423  }
int StressTypeForFixedParticles
Stress type for fixed particles.
template<StatType T>
bool StatisticsVector< T >::getSuperExact ( )
inline

Definition at line 497 of file StatisticsVector.h.

References StatisticsVector< T >::superexact.

498  {
499  return superexact;
500  }
bool superexact
If true, cutoff radius for Gaussian is set to 5*w (from 3*w)
template<StatType T>
Mdouble StatisticsVector< T >::getTimeMaxStat ( )
inline

Definition at line 253 of file StatisticsVector.h.

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

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

254  {
255  if (std::isnan(tMaxStat))
256  return getTimeMax();
257  else
258  return tMaxStat;
259  }
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:855
Mdouble tMaxStat
Statistical output will only be created if t
template<StatType T>
Vec3D StatisticsVector< T >::getVelocityProfile ( Vec3D  Position)
protected
template<StatType T>
int StatisticsVector< T >::getVerbosityLevel ( ) const
inline

Definition at line 537 of file StatisticsVector.h.

References StatisticsVector< T >::verbosity.

538  {
539  return verbosity;
540  }
int verbosity
Determines how much is outputted to the terminal.
template<StatType T>
Mdouble StatisticsVector< T >::getXMaxStat ( )
inline

Definition at line 717 of file StatisticsVector.h.

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

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

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

Functions to acces and change the domain of statistics.

Definition at line 684 of file StatisticsVector.h.

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

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

685  {
686  if (std::isnan(xMinStat))
687  return getXMin();
688  else
689  return xMinStat;
690  }
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
Definition: DPMBase.h:586
Mdouble xMinStat
By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain va...
template<StatType T>
Mdouble StatisticsVector< T >::getYMaxStat ( )
inline

Definition at line 728 of file StatisticsVector.h.

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

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

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

Definition at line 695 of file StatisticsVector.h.

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

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

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

Definition at line 739 of file StatisticsVector.h.

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

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

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

Definition at line 706 of file StatisticsVector.h.

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

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

707  {
708  if (std::isnan(zMinStat))
709  return getZMin();
710  else
711  return zMinStat;
712  }
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
Definition: DPMBase.h:611
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.

template<StatType T>
void StatisticsVector< T >::jump_fstat ( )
template<StatType T>
void StatisticsVector< T >::jump_p3c ( )
template<StatType T>
bool StatisticsVector< T >::loadPositions ( const char *  filename)
protected
template<StatType T>
bool StatisticsVector< T >::loadVelocityProfile ( const char *  filename)
protected
template<StatType T>
void StatisticsVector< T >::outputStatistics ( )
virtual

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

Reimplemented from DPMBase.

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

Output coarse graining variables.

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

Outputs member variable values to a std::string.

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.

template<StatType T>
bool StatisticsVector< T >::read_next_from_p3p_file ( )
protected
template<StatType T>
bool StatisticsVector< T >::readNextDataFile ( unsigned int  format)
template<StatType T>
void StatisticsVector< T >::readStatArguments ( int  argc,
char *  argv[] 
)
template<StatType T>
virtual void StatisticsVector< T >::reset_statistics ( )
virtual

Set all statistical variables to zero.

template<StatType T>
bool StatisticsVector< T >::satisfiesInclusionCriteria ( BaseParticle P)
protected
template<StatType T>
void StatisticsVector< T >::set_h ( Mdouble  h)
inline

Definition at line 187 of file StatisticsVector.h.

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

188  {
189  set_hx(h);
190  set_hy(h);
191  set_hz(h);
192  }
void set_hx(Mdouble hx)
void set_hy(Mdouble hy)
void set_hz(Mdouble hz)
template<StatType T>
void StatisticsVector< T >::set_hmax ( Mdouble  new_)
inline

Definition at line 888 of file StatisticsVector.h.

References StatisticsVector< T >::hmax.

889  {
890  hmax = new_;
891  }
Mdouble hmax
defines the maximum height of the particles for which statistics are extracted
template<StatType T>
void StatisticsVector< T >::set_hx ( Mdouble  hx)
inline

Definition at line 135 of file StatisticsVector.h.

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

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

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

Definition at line 151 of file StatisticsVector.h.

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

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

152  {
153  setNY(static_cast<int>(std::ceil((getYMaxStat() - getYMinStat()) / hy)));
154  }
void setNY(int new_)
template<StatType T>
void StatisticsVector< T >::set_hz ( Mdouble  hz)
inline

Definition at line 169 of file StatisticsVector.h.

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

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

170  {
171  setNZ(static_cast<int>(std::ceil((getZMaxStat() - getZMinStat()) / hz)));
172  }
void setNZ(int new_)
template<StatType T>
void StatisticsVector< T >::set_infiniteStressForFixedParticles ( bool  new_)
inline

Definition at line 430 of file StatisticsVector.h.

References StatisticsVector< T >::StressTypeForFixedParticles.

431  {
432  StressTypeForFixedParticles = 2 + new_;
433  }
int StressTypeForFixedParticles
Stress type for fixed particles.
template<StatType T>
void StatisticsVector< T >::set_Polynomial ( std::vector< Mdouble new_coefficients,
unsigned int  new_dim 
)
inline

Definition at line 808 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

809  {
810  CGPolynomial.set_polynomial(new_coefficients, new_dim);
811  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
template<StatType T>
void StatisticsVector< T >::set_Polynomial ( Mdouble new_coefficients,
unsigned int  num_coeff,
unsigned int  new_dim 
)
inline

Definition at line 816 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

817  {
818  CGPolynomial.set_polynomial(new_coefficients, num_coeff, new_dim);
819  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
template<StatType T>
void StatisticsVector< T >::set_rmax ( Mdouble  new_)
inline

Definition at line 880 of file StatisticsVector.h.

References StatisticsVector< T >::rmax.

881  {
882  rmax = new_;
883  }
Mdouble rmax
defines the maximum radius of the particles for which statistics are extracted
template<StatType T>
void StatisticsVector< T >::set_rmin ( Mdouble  new_)
inline

Definition at line 872 of file StatisticsVector.h.

References StatisticsVector< T >::rmin.

873  {
874  rmin = new_;
875  }
Mdouble rmin
defines the minimum radius of the particles for which statistics are extracted
template<StatType T>
void StatisticsVector< T >::set_statType ( )
template<StatType T>
void StatisticsVector< T >::setCGShape ( const char *  new_)
template<StatType T>
void StatisticsVector< T >::setCGShape ( CG_TYPE  new_)
template<StatType T>
void StatisticsVector< T >::setCGTimeAveragingInterval ( Mdouble  t)
inline

Definition at line 237 of file StatisticsVector.h.

References StatisticsVector< T >::tIntStat.

238  {
239  tIntStat = t;
240  }
Mdouble tIntStat
Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat.
template<StatType T>
void StatisticsVector< T >::setCGTimeMin ( Mdouble  t)
inline

Definition at line 221 of file StatisticsVector.h.

References StatisticsVector< T >::tMinStat.

222  {
223  tMinStat = t;
224  }
Mdouble tMinStat
Statistical output will only be created if t>tMinStat.
template<StatType T>
void StatisticsVector< T >::setCGWidth ( Mdouble  w)
inline

Set CG variables w2 and CG_invvolume.

Definition at line 315 of file StatisticsVector.h.

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

316  {
318  }
void setCGWidth2(Mdouble new_)
Set CG variables w2 and CG_invvolume.
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
template<StatType T>
void StatisticsVector< T >::setCGWidth2 ( Mdouble  new_)

Set CG variables w2 and CG_invvolume.

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

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

Definition at line 578 of file StatisticsVector.h.

References StatisticsVector< T >::w_over_rmax.

579  {
580  w_over_rmax = new_;
581  }
Mdouble w_over_rmax
if w is not set manually then w will be set by multiplying this value by the largest particle radius ...
template<StatType T>
void StatisticsVector< T >::setCGWidthalls ( bool  new_)
inline

Definition at line 545 of file StatisticsVector.h.

References StatisticsVector< T >::walls.

546  {
547  walls = new_;
548  }
bool walls
Turns off walls before evaluation.
template<StatType T>
void StatisticsVector< T >::setDoDoublePoints ( bool  new_)
inline

Definition at line 840 of file StatisticsVector.h.

References StatisticsVector< T >::doDoublePoints.

841  {
842  doDoublePoints = new_;
843  }
template<StatType T>
void StatisticsVector< T >::setDoGradient ( bool  new_)
inline

Definition at line 473 of file StatisticsVector.h.

References StatisticsVector< T >::doGradient.

474  {
475  doGradient = new_;
476  }
bool doGradient
Determines if gradient is outputted.
template<StatType T>
void StatisticsVector< T >::setDoIgnoreFixedParticles ( bool  new_)
inline

Definition at line 505 of file StatisticsVector.h.

References StatisticsVector< T >::ignoreFixedParticles.

506  {
507  ignoreFixedParticles = new_;
508  }
bool ignoreFixedParticles
Determines if fixed particles contribute to particle statistics (density, ...)
template<StatType T>
void StatisticsVector< T >::setDoPeriodicWalls ( bool  new_)
inline

Definition at line 561 of file StatisticsVector.h.

References StatisticsVector< T >::periodicWalls.

Referenced by Statistics().

562  {
563  periodicWalls = new_;
564  }
bool periodicWalls
Turns off periodic walls before evaluation (needed for averaging, because we do not yet check if part...
template<StatType T>
void StatisticsVector< T >::setDoTimeAverage ( bool  new_)
inline

Definition at line 395 of file StatisticsVector.h.

References StatisticsVector< T >::doTimeAverage.

396  {
397  doTimeAverage = new_;
398  }
bool doTimeAverage
Determines if output is averaged over time.
template<StatType T>
void StatisticsVector< T >::setDoVariance ( bool  new_)
inline

Definition at line 456 of file StatisticsVector.h.

References StatisticsVector< T >::doVariance.

457  {
458  doVariance = new_;
459  }
bool doVariance
Determines if variance is outputted.
template<StatType T>
void StatisticsVector< T >::setIndSpecies ( unsigned int  indSpecies)
inline

Definition at line 936 of file StatisticsVector.h.

References StatisticsVector< T >::indSpecies.

937  {
938  this->indSpecies = indSpecies;
939  }
Mdouble indSpecies
defines the species for which statistics are extracted (-1 for all species)
template<StatType T>
Mdouble StatisticsVector< T >::setInfinitelyLongDistance ( )
template<StatType T>
void StatisticsVector< T >::setMirrorAtDomainBoundary ( Mdouble  new_)
inline

Definition at line 439 of file StatisticsVector.h.

References StatisticsVector< T >::mirrorAtDomainBoundary.

440  {
441  mirrorAtDomainBoundary = new_;
442  }
Mdouble mirrorAtDomainBoundary
0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at...
template<StatType T>
void StatisticsVector< T >::setN ( int  n)
inline

Definition at line 177 of file StatisticsVector.h.

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

178  {
179  setNX(n);
180  setNY(n);
181  setNZ(n);
182  }
void setNX(int new_)
void setNZ(int new_)
void setNY(int new_)
template<StatType T>
void StatisticsVector< T >::setN ( int  nx_,
int  ny_,
int  nz_ 
)
inline

Definition at line 299 of file StatisticsVector.h.

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

300  {
301  nx = nx_;
302  ny = ny_;
303  nz = nz_;
304  }
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
template<StatType T>
void StatisticsVector< T >::setNTimeAverageReset ( int  new_)
inline

Definition at line 856 of file StatisticsVector.h.

References StatisticsVector< T >::nTimeAverageReset.

857  {
858  nTimeAverageReset = new_;
859  }
int nTimeAverageReset
Determines after how many time steps the time average is reset.
template<StatType T>
void StatisticsVector< T >::setNX ( int  new_)
inline

Definition at line 127 of file StatisticsVector.h.

References StatisticsVector< T >::nx.

Referenced by StatisticsVector< T >::set_hx(), and StatisticsVector< T >::setN().

128  {
129  nx = new_;
130  }
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
template<StatType T>
void StatisticsVector< T >::setNY ( int  new_)
inline

Definition at line 143 of file StatisticsVector.h.

References StatisticsVector< T >::ny.

Referenced by StatisticsVector< T >::set_hy(), and StatisticsVector< T >::setN().

144  {
145  ny = new_;
146  }
template<StatType T>
void StatisticsVector< T >::setNZ ( int  new_)
inline

Definition at line 159 of file StatisticsVector.h.

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

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

160  {
161  nz = new_;
162  if (getSystemDimensions() < 3)
163  std::cerr << "Warning in set_nz: dimension less than 3" << std::endl;
164  }
unsigned int getSystemDimensions() const
Returns the system dimensionality.
Definition: DPMBase.cc:1390
template<StatType T>
void StatisticsVector< T >::setPolynomialName ( const char *  new_name)
inline

Definition at line 824 of file StatisticsVector.h.

References StatisticsVector< T >::CGPolynomial.

825  {
826  CGPolynomial.setName(new_name);
827  }
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
template<StatType T>
void StatisticsVector< T >::setPositions ( )

Set position of StatisticsPoint points and set variables to 0.

template<StatType T>
void StatisticsVector< T >::setStepSize ( unsigned int  stepSize)
inline

Definition at line 928 of file StatisticsVector.h.

References StatisticsVector< T >::stepSize_.

929  {
930  stepSize_ = stepSize;
931  }
unsigned int stepSize_
template<StatType T>
void StatisticsVector< T >::setStressTypeForFixedParticles ( int  new_)
inline

Definition at line 412 of file StatisticsVector.h.

References StatisticsVector< T >::StressTypeForFixedParticles.

413  {
415  }
int StressTypeForFixedParticles
Stress type for fixed particles.
template<StatType T>
void StatisticsVector< T >::setSuperExact ( bool  new_)
inline

Definition at line 489 of file StatisticsVector.h.

References StatisticsVector< T >::superexact.

490  {
491  superexact = new_;
492  }
bool superexact
If true, cutoff radius for Gaussian is set to 5*w (from 3*w)
template<StatType T>
void StatisticsVector< T >::setTimeMaxStat ( Mdouble  t)
inline

Definition at line 229 of file StatisticsVector.h.

References StatisticsVector< T >::tMaxStat.

230  {
231  tMaxStat = t;
232  }
Mdouble tMaxStat
Statistical output will only be created if t
template<StatType T>
void StatisticsVector< T >::setVerbosityLevel ( int  new_)
inline

Definition at line 529 of file StatisticsVector.h.

References StatisticsVector< T >::verbosity.

530  {
531  verbosity = new_;
532  }
int verbosity
Determines how much is outputted to the terminal.
template<StatType T>
void StatisticsVector< T >::setXMaxStat ( Mdouble  xMaxStat_)
inline

Definition at line 774 of file StatisticsVector.h.

References StatisticsVector< T >::xMaxStat.

775  {
776  xMaxStat = xMaxStat_;
777  }
template<StatType T>
void StatisticsVector< T >::setXMinStat ( Mdouble  xMinStat_)
inline

Definition at line 750 of file StatisticsVector.h.

References StatisticsVector< T >::xMinStat.

751  {
752  xMinStat = xMinStat_;
753  }
Mdouble xMinStat
By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain va...
template<StatType T>
void StatisticsVector< T >::setYMaxStat ( Mdouble  yMaxStat_)
inline

Definition at line 782 of file StatisticsVector.h.

References StatisticsVector< T >::yMaxStat.

783  {
784  yMaxStat = yMaxStat_;
785  }
template<StatType T>
void StatisticsVector< T >::setYMinStat ( Mdouble  yMinStat_)
inline

Definition at line 758 of file StatisticsVector.h.

References StatisticsVector< T >::yMinStat.

759  {
760  yMinStat = yMinStat_;
761  }
template<StatType T>
void StatisticsVector< T >::setZMaxStat ( Mdouble  zMaxStat_)
inline

Definition at line 790 of file StatisticsVector.h.

References StatisticsVector< T >::zMaxStat.

791  {
792  zMaxStat = zMaxStat_;
793  }
template<StatType T>
void StatisticsVector< T >::setZMinStat ( Mdouble  zMinStat_)
inline

Definition at line 766 of file StatisticsVector.h.

References StatisticsVector< T >::zMinStat.

767  {
768  zMinStat = zMinStat_;
769  }
template<StatType T>
void StatisticsVector< T >::statistics_from_fstat_and_data ( )

get StatisticsPoint

Referenced by Statistics().

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

Definition at line 521 of file StatisticsVector.h.

References StatisticsVector< T >::verbosity.

522  {
523  verbosity = 2;
524  }
int verbosity
Determines how much is outputted to the terminal.
template<StatType T>
void StatisticsVector< T >::write_statistics ( )

Writes regular statistics.

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

Writes out time averaged statistics.

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

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

Definition at line 1227 of file StatisticsVector.h.

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

coarse graining type (Gaussian, Heaviside, Polynomial)

Definition at line 1036 of file StatisticsVector.h.

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

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.

Definition at line 1053 of file StatisticsVector.h.

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

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

Definition at line 1053 of file StatisticsVector.h.

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

Determines if gradient is outputted.

Definition at line 1025 of file StatisticsVector.h.

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

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

Determines if output is averaged over time.

Definition at line 1010 of file StatisticsVector.h.

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

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

Determines if variance is outputted.

Definition at line 1020 of file StatisticsVector.h.

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

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.

Definition at line 971 of file StatisticsVector.h.

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

Definition at line 995 of file StatisticsVector.h.

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.

Definition at line 975 of file StatisticsVector.h.

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

Definition at line 1000 of file StatisticsVector.h.

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.

Definition at line 979 of file StatisticsVector.h.

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

Definition at line 1005 of file StatisticsVector.h.

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

format of the data input file

Definition at line 1131 of file StatisticsVector.h.

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

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

Definition at line 1096 of file StatisticsVector.h.

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

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

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

Definition at line 1112 of file StatisticsVector.h.

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

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

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

Definition at line 1080 of file StatisticsVector.h.

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

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

Definition at line 1139 of file StatisticsVector.h.

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

Definition at line 1136 of file StatisticsVector.h.

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

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

A counter needed to average over time.

Definition at line 1030 of file StatisticsVector.h.

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

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

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

Definition at line 1015 of file StatisticsVector.h.

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

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].

Definition at line 951 of file StatisticsVector.h.

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

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

extension of grid size from mirrored points

Definition at line 961 of file StatisticsVector.h.

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

Definition at line 961 of file StatisticsVector.h.

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

Definition at line 961 of file StatisticsVector.h.

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

Position of first contact point.

Definition at line 1153 of file StatisticsVector.h.

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

not yet working

Definition at line 1175 of file StatisticsVector.h.

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

Definition at line 1165 of file StatisticsVector.h.

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

Definition at line 1163 of file StatisticsVector.h.

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

not yet working

Definition at line 1177 of file StatisticsVector.h.

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

Length of contact line.

Definition at line 1159 of file StatisticsVector.h.

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

Fabric.

Definition at line 1173 of file StatisticsVector.h.

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

Direction of contact.

Definition at line 1157 of file StatisticsVector.h.

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

Contact stress from normal forces along the line of contact.

Definition at line 1161 of file StatisticsVector.h.

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

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

Definition at line 1169 of file StatisticsVector.h.

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

not yet working

Definition at line 1179 of file StatisticsVector.h.

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

Contact stress from tangential forces along the line of contact.

Definition at line 1167 of file StatisticsVector.h.

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

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

Definition at line 1171 of file StatisticsVector.h.

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

Position of second contact point.

Definition at line 1155 of file StatisticsVector.h.

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

Definition at line 1209 of file StatisticsVector.h.

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

Definition at line 1211 of file StatisticsVector.h.

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

Definition at line 1208 of file StatisticsVector.h.

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

Definition at line 1210 of file StatisticsVector.h.

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}

Definition at line 1107 of file StatisticsVector.h.

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

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.

Definition at line 967 of file StatisticsVector.h.

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

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

Definition at line 1225 of file StatisticsVector.h.

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

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

Definition at line 1091 of file StatisticsVector.h.

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

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()

Definition at line 1086 of file StatisticsVector.h.

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

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.

Definition at line 947 of file StatisticsVector.h.

template<StatType T>
unsigned int StatisticsVector< T >::stepSize_
protected
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

Definition at line 1121 of file StatisticsVector.h.

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

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

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

Definition at line 1141 of file StatisticsVector.h.

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

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.

Definition at line 985 of file StatisticsVector.h.

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

Definition at line 990 of file StatisticsVector.h.

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

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

Definition at line 1075 of file StatisticsVector.h.

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

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

Statistical output will only be created if t<tMaxStat.

Definition at line 1070 of file StatisticsVector.h.

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

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

Statistical output will only be created if t>tMinStat.

Definition at line 1065 of file StatisticsVector.h.

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

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

Definition at line 1196 of file StatisticsVector.h.

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

Definition at line 1206 of file StatisticsVector.h.

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

Definition at line 1201 of file StatisticsVector.h.

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)

Definition at line 1129 of file StatisticsVector.h.

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

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

coarse graining width squared; for HeavisideSphere and Gaussian

Definition at line 1048 of file StatisticsVector.h.

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

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

Definition at line 1058 of file StatisticsVector.h.

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

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

Turns off walls before evaluation.

Definition at line 1101 of file StatisticsVector.h.

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

template<StatType T>
Mdouble StatisticsVector< T >::xMaxStat
protected
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.

Definition at line 957 of file StatisticsVector.h.

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

template<StatType T>
Mdouble StatisticsVector< T >::yMaxStat
protected
template<StatType T>
Mdouble StatisticsVector< T >::yMinStat
protected
template<StatType T>
Mdouble StatisticsVector< T >::zMaxStat
protected
template<StatType T>
Mdouble StatisticsVector< T >::zMinStat
protected

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