DisplacementField.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef MERCURYDPM_DisplacementField_H
6 #define MERCURYDPM_DisplacementField_H
7 
8 #include <Math/Matrix.h>
9 #include <Math/MatrixSymmetric.h>
11 #include <array>
12 
13 #include "BaseFields.h"
14 #include "CG/CGHandler.h"
15 #include "BaseHandler.h"
16 #include "DPMBase.h"
17 
18 class DPMBase;
19 
20 class BaseParticle;
21 
22 class BaseInteraction;
23 namespace CGFields
24 {
25 
34  {
35  public:
37 
38  DisplacementField(const DisplacementField& other) = default;
39 
40  ~DisplacementField() = default;
41 
42  static void writeNames(std::ostream& os, unsigned countVariables);
43 
47  void write(std::ostream& os) const;
48 
52  void output(std::ostream& os) const;
53 
57  void setZero();
58 
63 
68 
73 
78 
83 
89 
95  void addParticleStatistics(Mdouble phi, const DisplacementField& currentInteraction);
96 
97  void setFields(const BaseParticle& p);
98 
99  void setCylindricalFields(const BaseParticle& p);
100 
101 
104 
105 
107  {
108  return false;
109  }
110 
112  {
113  return false;
114  }
115 
120  static bool isDifferentialField()
121  {
122  return false;
123  }
124 
126  {}
127 
129  {}
130 
131  void addParticleDifferentialStatistics(Vec3D& dphi, const DisplacementField& currentInteraction)
132  {}
133 
134  void addInteractionStatistics(Mdouble psi, const DisplacementField& currentInteraction)
135  {}
136 
137  void addContactPointStatistics(Mdouble phi, const DisplacementField& currentInteraction)
138  {}
139 
140  private:
143  };
144 }
145 
146 #endif //MERCURYDPM_DisplacementField_H
IntegralType
Specifies the two points between which a line integral is computed.
Definition: IntegralType.h:14
float * p
Definition: Tutorial_Map_using.cpp:9
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Definition: BaseParticle.h:33
A Base class for the fields.
Definition: BaseFields.h:22
Computed the displacement fields.
Definition: DisplacementField.h:34
void addContactPointStatistics(Mdouble phi, const DisplacementField &currentInteraction)
Definition: DisplacementField.h:137
DisplacementField & operator+=(const DisplacementField &P)
Adds the field values on the RHS to the LHS of the equation.
Definition: DisplacementField.cc:52
static void writeNames(std::ostream &os, unsigned countVariables)
Definition: DisplacementField.cc:17
MatrixSymmetric3D displacementMomentumFlux_
Definition: DisplacementField.h:141
void write(std::ostream &os) const
Writes class content into an output stream, typically a stat file.
Definition: DisplacementField.cc:23
static bool evaluateFixedParticles()
Definition: DisplacementField.h:106
void addParticleDifferentialStatistics(Vec3D &dphi, const DisplacementField &currentInteraction)
Definition: DisplacementField.h:131
DisplacementField & operator-=(const DisplacementField &P)
Subtracts the field values on the RHS from the LHS of the equation.
Definition: DisplacementField.cc:59
DisplacementField & operator/=(Mdouble a)
Divides the field values on the LHS by the RHS of the equation.
Definition: DisplacementField.cc:66
static bool isDifferentialField()
Definition: DisplacementField.h:120
void setZero()
Sets all fields to zero.
Definition: DisplacementField.cc:35
void setCylindricalFields(const BaseInteraction &c, IntegralType type)
Definition: DisplacementField.h:128
void setFields(const BaseParticle &p)
Definition: DisplacementField.cc:87
DisplacementField(const DisplacementField &other)=default
MatrixSymmetric3D getDisplacementMomentumFlux() const
Definition: DisplacementField.h:102
void output(std::ostream &os) const
Writes human-readable class content into an output stream, typically a stat file.
Definition: DisplacementField.cc:29
Vec3D getDisplacementMomentum() const
Definition: DisplacementField.h:103
static bool doInteractionStatistics()
Definition: DisplacementField.h:111
Vec3D displacementMomentum_
Definition: DisplacementField.h:142
DisplacementField & operator=(const DisplacementField &P)
Copies all field values.
void setCylindricalFields(const BaseParticle &p)
Definition: DisplacementField.cc:103
DisplacementField()
Definition: DisplacementField.cc:11
void addInteractionStatistics(Mdouble psi, const DisplacementField &currentInteraction)
Definition: DisplacementField.h:134
DisplacementField getSquared() const
Returns the square of all field values (to calculate standard deviation).
Definition: DisplacementField.cc:41
DisplacementField operator*(Mdouble a) const
Multiplies the field values on the left of the '*' by the scalar value on the right of the '*' and re...
Definition: DisplacementField.cc:73
void addParticleStatistics(Mdouble phi, const DisplacementField &currentInteraction)
This function should be called from within a loop over all particles to compute all the fields that a...
Definition: DisplacementField.cc:81
void setFields(const BaseInteraction &c, IntegralType type)
Definition: DisplacementField.h:125
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
Implementation of a 3D symmetric matrix.
Definition: MatrixSymmetric.h:16
Definition: Kernel/Math/Vector.h:30
const Scalar * a
Definition: level2_cplx_impl.h:32
Definition: BaseFields.h:14
double P
Uniform pressure.
Definition: TwenteMeshGluing.cpp:77
int c
Definition: calibrate.py:100
type
Definition: compute_granudrum_aor.py:141