MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
StatisticsVector.h
Go to the documentation of this file.
1 //Copyright (c) 2013-2020, The MercuryDPM Developers Team. All rights reserved.
2 //For the list of developers, see <http://www.MercuryDPM.org/Team>.
3 //
4 //Redistribution and use in source and binary forms, with or without
5 //modification, are permitted provided that the following conditions are met:
6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above copyright
9 // notice, this list of conditions and the following disclaimer in the
10 // documentation and/or other materials provided with the distribution.
11 // * Neither the name MercuryDPM nor the
12 // names of its contributors may be used to endorse or promote products
13 // derived from this software without specific prior written permission.
14 //
15 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16 //ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 //WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 //DISCLAIMED. IN NO EVENT SHALL THE MERCURYDPM DEVELOPERS TEAM BE LIABLE FOR ANY
19 //DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 //(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 //LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 //ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 //(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 
26 #ifndef STATISTICSVECTOR_H
27 #define STATISTICSVECTOR_H
28 
29 #include "DPMBase.h"
30 #include "Math/Matrix.h"
31 #include "Math/MatrixSymmetric.h"
32 #include <string.h>
33 #include <fstream>
34 #include <math.h>
36 
41 {
42  O, X, Y, Z, XY, XZ, YZ, XYZ, RAZ, RZ, AZ, RA, R, A
43 };
44 
46 #include "StatisticsPoint.h"
47 
60 template<StatType T>
61 class StatisticsVector : public virtual DPMBase
62 {
63 public:
67  void constructor();
68 
72  void constructor(std::string name);
73 
78  {
79  constructor();
80  }
81 
85  StatisticsVector(std::string name)
86  {
87  constructor(name);
88  }
89 
94 
98  StatisticsVector(int argc, char* argv[]);
99 
103  void readStatArguments(int argc, char* argv[]);
104 
108  std::string printStat();
109 
113  void set_statType();
114 
115  void writeOutputFiles();
116 
120  void print_help();
121 
122  //set functions should be called before executing the statistical routine
123 
127  void setNX(int new_)
128  {
129  nx = new_;
130  }
131 
135  void set_hx(Mdouble hx)
136  {
137  setNX(static_cast<int>(std::ceil((getXMaxStat() - getXMinStat()) / hx)));
138  }
139 
143  void setNY(int new_)
144  {
145  ny = new_;
146  }
147 
151  void set_hy(Mdouble hy)
152  {
153  setNY(static_cast<int>(std::ceil((getYMaxStat() - getYMinStat()) / hy)));
154  }
155 
159  void setNZ(int new_)
160  {
161  nz = new_;
162  if (getSystemDimensions() < 3)
163  std::cerr << "Warning in set_nz: dimension less than 3" << std::endl;
164  }
165 
169  void set_hz(Mdouble hz)
170  {
171  setNZ(static_cast<int>(std::ceil((getZMaxStat() - getZMinStat()) / hz)));
172  }
173 
177  void setN(int n)
178  {
179  setNX(n);
180  setNY(n);
181  setNZ(n);
182  }
183 
187  void set_h(Mdouble h)
188  {
189  set_hx(h);
190  set_hy(h);
191  set_hz(h);
192  }
193 
197  int getNX()
198  {
199  return nx;
200  }
201 
205  int getNY()
206  {
207  return ny;
208  }
209 
213  int getNZ()
214  {
215  return nz;
216  }
217 
222  {
223  tMinStat = t;
224  }
225 
230  {
231  tMaxStat = t;
232  }
233 
238  {
239  tIntStat = t;
240  }
241 
246  {
247  return tMinStat;
248  }
249 
254  {
255  if (std::isnan(tMaxStat))
256  return getTimeMax();
257  else
258  return tMaxStat;
259  }
260 
265  {
266  return tIntStat;
267  }
268 
273  {
274  return (getTime() >= getCGTimeMin() && getTime() <= getTimeMaxStat() + getTimeStep());
275  }
276 
277 
281  void setCGShape(const char* new_);
282 
286  void setCGShape(CG_TYPE new_);
287 
292  {
293  return CG_type;
294  }
295 
299  void setN(int nx_, int ny_, int nz_)
300  {
301  nx = nx_;
302  ny = ny_;
303  nz = nz_;
304  }
305 
306  void getN(int& nx_, int& ny_, int& nz_)
307  {
308  nx_ = nx;
309  ny_ = ny;
310  nz_ = nz;
311  }
312 
313 
316  {
318  }
319 
320 
324  void setCGWidth2(Mdouble new_);
325 
330  {
331  return std::sqrt(w2);
332  }
333 
338  {
339  return w2;
340  }
341 
346  {
347  return cutoff;
348  }
349 
354  {
355  return mathsFunc::square(cutoff);
356  }
357 
358 
359  //~ bool get_boundedDomain() {return boundedDomain;};
360  //~ void set_boundedDomain(bool new_) {boundedDomain=new_;};
361 
365  std::string print_CG();
366 
371 
375  virtual void reset_statistics();
376 
381 
385  void statistics_from_p3();
386 
390  void jump_p3c();
391 
395  void setDoTimeAverage(bool new_)
396  {
397  doTimeAverage = new_;
398  }
399 
404  {
405  return doTimeAverage;
406  }
407 
408 
413  {
415  }
416 
421  {
423  }
424 
425 
426  // to keep compatible with older versions
431  {
432  StressTypeForFixedParticles = 2 + new_;
433  }
434 
435 
440  {
441  mirrorAtDomainBoundary = new_;
442  }
443 
448  {
449  return mirrorAtDomainBoundary;
450  }
451 
452 
456  void setDoVariance(bool new_)
457  {
458  doVariance = new_;
459  }
460 
465  {
466  return doVariance;
467  }
468 
469 
473  void setDoGradient(bool new_)
474  {
475  doGradient = new_;
476  }
477 
482  {
483  return doGradient;
484  }
485 
489  void setSuperExact(bool new_)
490  {
491  superexact = new_;
492  }
493 
498  {
499  return superexact;
500  }
501 
506  {
507  ignoreFixedParticles = new_;
508  }
509 
514  {
515  return ignoreFixedParticles;
516  }
517 
521  void verbose()
522  {
523  verbosity = 2;
524  }
525 
529  void setVerbosityLevel(int new_)
530  {
531  verbosity = new_;
532  }
533 
537  int getVerbosityLevel() const
538  {
539  return verbosity;
540  }
541 
545  void setCGWidthalls(bool new_)
546  {
547  walls = new_;
548  }
549 
554  {
555  return walls;
556  }
557 
561  void setDoPeriodicWalls(bool new_)
562  {
563  periodicWalls = new_;
564  }
565 
570  {
571  return periodicWalls;
572  }
573 
574 
579  {
580  w_over_rmax = new_;
581  }
582 
587  {
588  return w_over_rmax;
589  }
590 
591 
595  void setPositions();
596 
600  bool readNextDataFile(unsigned int format);
601 
606 
610  void gather_force_statistics_from_p3c(int version);
611 
615  void gather_force_statistics_from_p3w(int version, std::vector<int>& index);
616 
620  void evaluate_force_statistics(int wp = 0);
621 
625  void evaluate_wall_force_statistics(Vec3D P, int wp = 0);
626 
630  void jump_fstat();
631 
635  void initialiseStatistics();
636 
640  void outputStatistics();
641 
645  void gatherContactStatistics(unsigned int index1, int index2, Vec3D Contact, Mdouble delta, Mdouble ctheta,
646  Mdouble fdotn, Mdouble fdott, Vec3D P1_P2_normal_, Vec3D P1_P2_tangential);
647 
651  void processStatistics(bool usethese);
652 
656  void finishStatistics();
657 
661  void write_statistics();
662 
667 
671  void evaluate_particle_statistics(std::vector<BaseParticle*>::iterator P, int wp = 0);
672 
676  std::vector<StatisticsPoint<T> > getCGPoints()
677  {
678  return Points;
679  }
680 
685  {
686  if (std::isnan(xMinStat))
687  return getXMin();
688  else
689  return xMinStat;
690  }
691 
696  {
697  if (std::isnan(yMinStat))
698  return getYMin();
699  else
700  return yMinStat;
701  }
702 
707  {
708  if (std::isnan(zMinStat))
709  return getZMin();
710  else
711  return zMinStat;
712  }
713 
718  {
719  if (std::isnan(xMaxStat))
720  return getXMax();
721  else
722  return xMaxStat;
723  }
724 
729  {
730  if (std::isnan(yMaxStat))
731  return getYMax();
732  else
733  return yMaxStat;
734  }
735 
740  {
741  if (std::isnan(zMaxStat))
742  return getZMax();
743  else
744  return zMaxStat;
745  }
746 
750  void setXMinStat(Mdouble xMinStat_)
751  {
752  xMinStat = xMinStat_;
753  }
754 
758  void setYMinStat(Mdouble yMinStat_)
759  {
760  yMinStat = yMinStat_;
761  }
762 
766  void setZMinStat(Mdouble zMinStat_)
767  {
768  zMinStat = zMinStat_;
769  }
770 
774  void setXMaxStat(Mdouble xMaxStat_)
775  {
776  xMaxStat = xMaxStat_;
777  }
778 
782  void setYMaxStat(Mdouble yMaxStat_)
783  {
784  yMaxStat = yMaxStat_;
785  }
786 
790  void setZMaxStat(Mdouble zMaxStat_)
791  {
792  zMaxStat = zMaxStat_;
793  }
794 
799  {
800  return nTimeAverage;
801  }
802 
807 
808  void set_Polynomial(std::vector<Mdouble> new_coefficients, unsigned int new_dim)
809  {
810  CGPolynomial.set_polynomial(new_coefficients, new_dim);
811  }
812 
816  void set_Polynomial(Mdouble* new_coefficients, unsigned int num_coeff, unsigned int new_dim)
817  {
818  CGPolynomial.set_polynomial(new_coefficients, num_coeff, new_dim);
819  }
820 
824  void setPolynomialName(const char* new_name)
825  {
826  CGPolynomial.setName(new_name);
827  }
828 
832  std::string getPolynomialName()
833  {
834  return CGPolynomial.getName();
835  }
836 
840  void setDoDoublePoints(bool new_)
841  {
842  doDoublePoints = new_;
843  }
844 
849  {
850  return doDoublePoints;
851  }
852 
856  void setNTimeAverageReset(int new_)
857  {
858  nTimeAverageReset = new_;
859  }
860 
865  {
866  return nTimeAverageReset;
867  }
868 
872  void set_rmin(Mdouble new_)
873  {
874  rmin = new_;
875  }
876 
880  void set_rmax(Mdouble new_)
881  {
882  rmax = new_;
883  }
884 
888  void set_hmax(Mdouble new_)
889  {
890  hmax = new_;
891  }
892 
897  {
898  return CGPolynomial.evaluate(r);
899  }
900 
905  {
906  return CGPolynomial.evaluateGradient(r);
907  }
908 
913  {
914  return CGPolynomial.evaluateIntegral(n1, n2, t);
915  }
916 
920  unsigned int getStepSize() const
921  {
922  return stepSize_;
923  }
924 
928  void setStepSize(unsigned int stepSize)
929  {
930  stepSize_ = stepSize;
931  }
932 
936  void setIndSpecies(unsigned int indSpecies)
937  {
938  this->indSpecies = indSpecies;
939  }
940  //Member Variables
941 protected:
942 
943  //General Variables
951  int nx;
952  int ny;
953  int nz;
962 
963  //Storage of points and gradients
967  std::vector<StatisticsPoint<T> > Points;
971  std::vector<StatisticsPoint<T> > dx;
975  std::vector<StatisticsPoint<T> > dy;
979  std::vector<StatisticsPoint<T> > dz;
980 
981  //For time averaging
985  std::vector<StatisticsPoint<T> > timeAverage;
986 
990  std::vector<StatisticsPoint<T> > timeVariance;
991 
995  std::vector<StatisticsPoint<T> > dxTimeAverage;
996 
1000  std::vector<StatisticsPoint<T> > dyTimeAverage;
1001 
1005  std::vector<StatisticsPoint<T> > dzTimeAverage;
1006 
1011 
1016 
1021 
1026 
1031 
1032  //Coarse graining variables
1041 
1042  // ///<if true, then the course-graining function will be cut at the domain boundaries and resized to satisfy int(W) = 1
1043  // bool boundedDomain;
1044 
1049 
1054 
1059 
1060  //Options that can be set before evaluation
1061 
1066 
1071 
1076 
1081 
1087 
1092 
1097 
1101  bool walls;
1102 
1108 
1113 
1122 
1130 
1131  int format;
1132 
1137 
1139  bool isMDCLR;
1142 
1143  //uses close points to allow calculation of gradients
1145 
1150 
1151  //Variables communicate values between member functions #evaluate_force_statistics and #gatherContactStatistics)used to communicate values between member functions evaluate_force_statistics and gather_force_statistics
1180 
1184  bool loadVelocityProfile(const char* filename);
1185 
1186  bool loadPositions(const char* filename);
1187 
1191  Vec3D getVelocityProfile(Vec3D Position);
1192 
1196  std::vector<Vec3D> VelocityProfile;
1197 
1202 
1207 
1208  std::fstream p3p_file;
1209  std::fstream p3c_file;
1210  std::fstream p3w_file;
1211  bool p3Format = true;
1212 
1216  bool read_next_from_p3p_file();
1217 
1221  void autoSetSystemDimensions();
1222 
1223  unsigned int stepSize_;
1224 
1225  std::vector<Vec3D> positions_;
1226 
1227  bool centerPointInFStat_ = true;
1228 };
1229 
1230 #include "StatisticsPoint.hcc"
1231 #include "StatisticsVector.hcc"
1232 
1233 #endif
void set_hx(Mdouble hx)
StatisticsVector()
Basic constructor only calls constructor()
void readStatArguments(int argc, char *argv[])
bool periodicWalls
Turns off periodic walls before evaluation (needed for averaging, because we do not yet check if part...
void gather_force_statistics_from_fstat_and_data()
std::vector< StatisticsPoint< T > > dyTimeAverage
a vector used to sum up all statistical gradients in dy for time-averaging
std::string printStat()
Outputs member variable values to a std::string.
void setPolynomialName(const char *new_name)
void getN(int &nx_, int &ny_, int &nz_)
The DPMBase header includes quite a few header files, defining all the handlers, which are essential...
Definition: DPMBase.h:72
Vec3D P2
Position of second contact point.
void autoSetSystemDimensions()
bool walls
Turns off walls before evaluation.
StatType statType
Possible values X,Y,Z,XY,XZ,YZ,XYZ,RAZ,RA,RZ,AZ,R,A are used to determine if the statistics are avera...
bool check_current_time_for_statistics()
void setXMinStat(Mdouble xMinStat_)
Vec3D P1_P2_TangentialTraction
Traction from tangential forces at contact of flow with fixed particles or walls. ...
void initialiseStatistics()
Initializes statistics, i.e. setting w2, setting the grid and writing the header lines in the ...
void setNTimeAverageReset(int new_)
StatType
Creates averaged statistics (only valid if density field is homogenous along averaged direction) ...
void write_time_average_statistics()
Writes out time averaged statistics.
unsigned int getSystemDimensions() const
Returns the system dimensionality.
Definition: DPMBase.cc:1390
Mdouble getCGTimeAveragingInterval()
void processStatistics(bool usethese)
Processes all gathered statistics and resets them afterwards. (Processing means either calculating ti...
Mdouble evaluatePolynomialGradient(Mdouble r)
bool satisfiesInclusionCriteria(BaseParticle *P)
Mdouble w_over_rmax
if w is not set manually then w will be set by multiplying this value by the largest particle radius ...
void setMirrorAtDomainBoundary(Mdouble new_)
double Mdouble
Definition: GeneralDefine.h:34
void set_h(Mdouble h)
std::vector< Vec3D > VelocityProfile
Mdouble getMirrorAtDomainBoundary()
std::vector< StatisticsPoint< T > > dz
A vector that stores the gradient in z of all statistical variables at a given position.
Mdouble cutoff
The distance from the origin at which the cg function vanishes; cutoff=w for HeavisideSphere or Polyn...
Mdouble getZMax() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMax() returns ZMax...
Definition: DPMBase.h:617
Mdouble getXMin() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMin() returns XMin...
Definition: DPMBase.h:586
void gather_force_statistics_from_p3w(int version, std::vector< int > &index)
std::vector< StatisticsPoint< T > > dy
A vector that stores the gradient in y of all statistical variables at a given position.
Mdouble getCGWidth_over_rmax()
Mdouble getYMin() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMin() returns YMin...
Definition: DPMBase.h:599
void constructor()
this is the actual constructor, sets up all basic things
bool loadPositions(const char *filename)
std::fstream p3p_file
StatisticsVector(std::string name)
void setDoVariance(bool new_)
Vec3D P1
Position of first contact point.
bool loadVelocityProfile(const char *filename)
Mdouble w2
coarse graining width squared; for HeavisideSphere and Gaussian
Mdouble getXMinStat()
Functions to acces and change the domain of statistics.
std::fstream p3w_file
void setNX(int new_)
void write_statistics()
Writes regular statistics.
bool readNextDataFile(unsigned int format)
Mdouble P1_P2_Dissipation
not yet working
Mdouble getTimeMaxStat()
std::string getPolynomialName()
void setCGShape(const char *new_)
std::vector< StatisticsPoint< T > > dx
A vector that stores the gradient in x of all statistical variables at a given position.
Mdouble P1_P2_distance
Length of contact line.
void setStepSize(unsigned int stepSize)
void set_hy(Mdouble hy)
void set_infiniteStressForFixedParticles(bool new_)
void evaluate_wall_force_statistics(Vec3D P, int wp=0)
void setStressTypeForFixedParticles(int new_)
void setDoGradient(bool new_)
int nx
Grid size nx,ny,nz (by default the points of evaluation are placed in an grid on the domain [xMinStat...
Mdouble tIntStat
Statistical output will only be created if tMaxStat-tIntStat< t< tMaxStat.
void setZMinStat(Mdouble zMinStat_)
Mdouble evaluatePolynomial(Mdouble r)
void setCGTimeMin(Mdouble t)
bool read_next_from_p3p_file()
Mdouble getXMax() const
If the length of the problem domain in x-direction is XMax - XMin, then getXMax() returns XMax...
Definition: DPMBase.h:593
void setYMaxStat(Mdouble yMaxStat_)
void set_hz(Mdouble hz)
int nTimeAverage
A counter needed to average over time.
void setDoPeriodicWalls(bool new_)
Mdouble getCGWidthSquared()
void setCGWidth2(Mdouble new_)
Set CG variables w2 and CG_invvolume.
int nTimeAverageReset
Determines after how many time steps the time average is reset.
std::vector< StatisticsPoint< T > > dxTimeAverage
a vector used to sum up all statistical gradients in dx for time-averaging
std::vector< Vec3D > positions_
std::vector< StatisticsPoint< T > > dzTimeAverage
a vector used to sum up all statistical gradients in dz for time-averaging
void setNZ(int new_)
CG_TYPE
enum used to store the type of coarse-graining function used
Mdouble indSpecies
defines the species for which statistics are extracted (-1 for all species)
void evaluate_force_statistics(int wp=0)
void statistics_from_p3()
CG_TYPE CG_type
coarse graining type (Gaussian, Heaviside, Polynomial)
Mdouble tMinStat
Statistical output will only be created if t>tMinStat.
Mdouble rmin
defines the minimum radius of the particles for which statistics are extracted
Vec3D getVelocityProfile(Vec3D Position)
void set_rmax(Mdouble new_)
NORMALIZED_POLYNOMIAL< T > CGPolynomial
Stores the Polynomial, if the cg function is an axisymmetric function Polynomial in r...
std::vector< StatisticsPoint< T > > getCGPoints()
void setIndSpecies(unsigned int indSpecies)
bool getDoIgnoreFixedParticles()
void setCGWidthalls(bool new_)
void statistics_from_fstat_and_data()
get StatisticsPoint
void evaluate_particle_statistics(std::vector< BaseParticle * >::iterator P, int wp=0)
Calculates statistics for a single Particle.
void setTimeMaxStat(Mdouble t)
Vec3D P1_P2_normal
Direction of contact.
int format
format of the data input file
bool doTimeAverage
Determines if output is averaged over time.
void setNY(int new_)
void set_Polynomial(std::vector< Mdouble > new_coefficients, unsigned int new_dim)
void setSuperExact(bool new_)
std::vector< StatisticsPoint< T > > timeVariance
a vector used to sum up the variance in time of all statistical values
void setN(int nx_, int ny_, int nz_)
void setYMinStat(Mdouble yMinStat_)
Mdouble mirrorAtDomainBoundary
0: Statistics near the wall are equal to statistics away from the wall; 1: Statistics are mirrored at...
bool doVariance
Determines if variance is outputted.
void setCGWidth(Mdouble w)
Set CG variables w2 and CG_invvolume.
unsigned int getStepSize() const
Mdouble xMinStat
By default the domain is set to the domain of the MD problem (indicated by setting the stat-domain va...
Mdouble getYMax() const
If the length of the problem domain in y-direction is YMax - YMin, then getYMax() returns XMax...
Definition: DPMBase.h:605
void setDoDoublePoints(bool new_)
MatrixSymmetric3D P1_P2_Fabric
Fabric.
void set_hmax(Mdouble new_)
void setZMaxStat(Mdouble zMaxStat_)
Matrix3D P1_P2_NormalStress
Contact stress from normal forces along the line of contact.
std::fstream p3c_file
Vec3D P1_P2_CollisionalHeatFlux
not yet working
std::vector< StatisticsPoint< T > > Points
A vector that stores the values of the statistical variables at a given position. ...
int getStressTypeForFixedParticles()
This class stores statistical values for a given spatial position; to be used in combination with Sta...
int verbosity
Determines how much is outputted to the terminal.
StatisticsPoint< T > average(std::vector< StatisticsPoint< T > > &P)
Output average of statistical variables.
void outputStatistics()
Calculates statistics for Particles (i.e. not collisions)
Mdouble getZMin() const
If the length of the problem domain in z-direction is ZMax - ZMin, then getZMin() returns ZMin...
Definition: DPMBase.h:611
void gatherContactStatistics()
Definition: DPMBase.cc:1858
Mdouble hmax
defines the maximum height of the particles for which statistics are extracted
This class is used to extract statistical data from MD simulations.
Matrix3D P1_P2_ContactCoupleStress
void writeOutputFiles()
Writes simulation data to all the main Mercury files: .data, .ene, .fstat, .xballs and ...
std::vector< StatisticsPoint< T > > timeAverage
A vector used to sum up all statistical values in Points for time-averaging.
This class is used to define polynomial axisymmetric coarse-graining functions.
int getVerbosityLevel() const
void setVerbosityLevel(int new_)
unsigned int stepSize_
Mdouble setInfinitelyLongDistance()
bool superexact
If true, cutoff radius for Gaussian is set to 5*w (from 3*w)
void set_Polynomial(Mdouble *new_coefficients, unsigned int num_coeff, unsigned int new_dim)
void finishStatistics()
Finish all statistics (i.e. write out final data)
bool ignoreFixedParticles
Determines if fixed particles contribute to particle statistics (density, ...)
void setDoIgnoreFixedParticles(bool new_)
void setPositions()
Set position of StatisticsPoint points and set variables to 0.
Implementation of a 3D matrix.
Definition: Matrix.h:37
void setCGWidth_over_rmax(Mdouble new_)
Definition: Vector.h:49
T square(const T val)
squares a number
Definition: ExtendedMath.h:104
Mdouble getTimeStep() const
Returns the simulation time step.
Definition: DPMBase.cc:1211
int StressTypeForFixedParticles
Stress type for fixed particles.
Mdouble P1_P2_Potential
not yet working
Mdouble evaluateIntegral(Mdouble n1, Mdouble n2, Mdouble t)
Mdouble rmax
defines the maximum radius of the particles for which statistics are extracted
Mdouble getTime() const
Returns the current simulation time.
Definition: DPMBase.cc:797
void set_rmin(Mdouble new_)
Implementation of a 3D symmetric matrix.
Mdouble getTimeMax() const
Returns the maximum simulation duration.
Definition: DPMBase.cc:855
Mdouble tMaxStat
Statistical output will only be created if t
void setCGTimeAveragingInterval(Mdouble t)
std::string print_CG()
Output coarse graining variables.
void setXMaxStat(Mdouble xMaxStat_)
void setDoTimeAverage(bool new_)
virtual void reset_statistics()
Set all statistical variables to zero.
Matrix3D P1_P2_TangentialStress
Contact stress from tangential forces along the line of contact.
bool doGradient
Determines if gradient is outputted.
Vec3D P1_P2_NormalTraction
Traction from normal forces at contact of flow with fixed particles or walls.
void gather_force_statistics_from_p3c(int version)
int nxMirrored
extension of grid size from mirrored points