OrientationField.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_ORIENTATIONFIELD_H
6 #define MERCURYDPM_ORIENTATIONFIELD_H
7 
8 #include <Math/Matrix.h>
9 #include <Math/MatrixSymmetric.h>
11 #include <array>
12 
13 #include "BaseFields.h"
14 
15 class BaseParticle;
16 
17 class BaseInteraction;
18 namespace CGFields
19 {
20 
33  {
34  public:
36 
37  OrientationField(const OrientationField& other) = default;
38 
39  ~OrientationField() = default;
40 
41  static void writeNames(std::ostream& os, unsigned countVariables);
42 
46  void write(std::ostream& os) const;
47 
51  void output(std::ostream& os) const;
52 
56  void setZero();
57 
62 
67 
72 
77 
82 
88 
94  void addParticleStatistics(Mdouble phi, const OrientationField& currentInteraction);
95 
96  void setFields(const BaseParticle& p);
97 
98  void setCylindricalFields(const BaseParticle& p);
99 
100 
102  {
103  return orientation_;
104  }
105 
106 
108  {
109  return false;
110  }
111 
113  {
114  return false;
115  }
116 
121  static bool isDifferentialField()
122  {
123  return false;
124  }
125 
127  {}
128 
130  {}
131 
132  void addParticleDifferentialStatistics(Vec3D& dphi, const OrientationField& currentInteraction)
133  {}
134 
135  void addInteractionStatistics(Mdouble psi, const OrientationField& currentInteraction)
136  {}
137 
138  void addContactPointStatistics(Mdouble phi, const OrientationField& currentInteraction)
139  {}
140 
141  private:
143  };
144 }
145 
146 #endif //MERCURYDPM_ORIENTATIONFIELD_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
Contains the computed field values, like density, momentum and stress.
Definition: OrientationField.h:33
void addParticleStatistics(Mdouble phi, const OrientationField &currentInteraction)
This function should be called from within a loop over all particles to compute all the fields that a...
Definition: OrientationField.cc:71
void setFields(const BaseInteraction &c, IntegralType type)
Definition: OrientationField.h:126
static bool evaluateFixedParticles()
Definition: OrientationField.h:107
void addInteractionStatistics(Mdouble psi, const OrientationField &currentInteraction)
Definition: OrientationField.h:135
OrientationField & operator=(const OrientationField &P)
Copies all field values.
OrientationField(const OrientationField &other)=default
void setCylindricalFields(const BaseParticle &p)
Definition: OrientationField.cc:89
OrientationField & operator+=(const OrientationField &P)
Adds the field values on the RHS to the LHS of the equation.
Definition: OrientationField.cc:46
void addParticleDifferentialStatistics(Vec3D &dphi, const OrientationField &currentInteraction)
Definition: OrientationField.h:132
static bool isDifferentialField()
Definition: OrientationField.h:121
void setCylindricalFields(const BaseInteraction &c, IntegralType type)
Definition: OrientationField.h:129
static void writeNames(std::ostream &os, unsigned countVariables)
Definition: OrientationField.cc:17
static bool doInteractionStatistics()
Definition: OrientationField.h:112
void write(std::ostream &os) const
Writes class content into an output stream, typically a stat file.
Definition: OrientationField.cc:22
MatrixSymmetric3D getOrientation() const
Definition: OrientationField.h:101
void setFields(const BaseParticle &p)
Definition: OrientationField.cc:76
OrientationField getSquared() const
Returns the square of all field values (to calculate standard deviation).
Definition: OrientationField.cc:37
void setZero()
Sets all fields to zero.
Definition: OrientationField.cc:32
OrientationField & operator/=(Mdouble a)
Divides the field values on the LHS by the RHS of the equation.
Definition: OrientationField.cc:58
OrientationField 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: OrientationField.cc:64
void output(std::ostream &os) const
Writes human-readable class content into an output stream, typically a stat file.
Definition: OrientationField.cc:27
void addContactPointStatistics(Mdouble phi, const OrientationField &currentInteraction)
Definition: OrientationField.h:138
OrientationField()
Definition: OrientationField.cc:11
MatrixSymmetric3D orientation_
Definition: OrientationField.h:142
OrientationField & operator-=(const OrientationField &P)
Subtracts the field values on the RHS from the LHS of the equation.
Definition: OrientationField.cc:52
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