ExactOverlap.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 ExactOverlap_H
6 #define ExactOverlap_H
7 
8 #include <GeneralDefine.h>
9 #include <iostream>
10 #include "IntegralType.h"
11 #include "CG/Coordinates/R.h"
12 #include "CG/Coordinates/X.h"
13 #include "CG/Coordinates/Y.h"
14 #include "CG/Coordinates/Z.h"
15 #include "CG/Coordinates/RZ.h"
16 #include "CG/Coordinates/XY.h"
17 #include "CG/Coordinates/XZ.h"
18 #include "CG/Coordinates/YZ.h"
19 #include "CG/Coordinates/XYZ.h"
20 #include "CG/Coordinates/O.h"
21 
22 class BaseParticle;
23 
24 class BaseInteraction;
25 
26 class DPMBase;
27 
28 class Coordinates;
29 
37 namespace CGFunctions
38 {
39 
58 template<class Coordinates>
60 {
61 public:
62 
64 
69 
73  ExactOverlap(const ExactOverlap& c) = default;
74 
78  ~ExactOverlap() = default;
79 
83  void write(std::ostream& os) const;
84 
88  void setWidth(Mdouble width) {};
89 
93  Mdouble getWidth() const { return constants::NaN; }
94 
99 
103  void setWidthAndCutoff(Mdouble width, Mdouble cutoff) {};
104 
108  Mdouble getCutoff() const { return constants::NaN; }
109 
113  Vec3D getCutoffVector(Mdouble radius, Vec3D cellSize) const { return cellSize + Vec3D(radius, radius, radius); }
114 
119  // Mdouble getEps() const;
120 
125  void setEps(Mdouble eps) {};
126 
130  Mdouble evaluateCGFunction(const Vec3D& position, const Coordinates r) { return constants::NaN; }
131 
135  Mdouble evaluateCGFunction(const Vec3D& position, const Mdouble rad, const Coordinates r);
136 
139 
144  { return constants::NaN; }
145 
146 };
147 
166 
167 } //namespace CGFunctions
168 #include "ExactOverlap.hcc"
169 
170 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
IntegralType
Specifies the two points between which a line integral is computed.
Definition: IntegralType.h:14
Stores information about interactions between two interactable objects; often particles but could be ...
Definition: BaseInteraction.h:39
Definition: BaseParticle.h:33
Defines the position of the CGPoint (e.g. x, y, z) and the parameters of the ExactOverlap coarse-grai...
Definition: ExactOverlap.h:60
Mdouble evaluateCGIntegral(const BaseInteraction &i, const Coordinates r, IntegralType type=IntegralType::I_TO_P)
Evaluates the line integral needed for the calculation of stresses.
Definition: ExactOverlap.h:143
Mdouble getCutoff() const
Returns the cutoff of the coarse-graining function.
Definition: ExactOverlap.h:108
ExactOverlap()
Default constructor, it simply creates an empty ExactOverlapCoordinates.
~ExactOverlap()=default
Destructor, does nothing, as no new'ed objects are used.
Vec3D getCutoffVector(Mdouble radius, Vec3D cellSize) const
Returns the cutoff of the coarse-graining function along each direction.
Definition: ExactOverlap.h:113
void setWidth(Mdouble width)
Sets the width of the coarse-graining function.
Definition: ExactOverlap.h:88
void setWidthAndCutoff(Mdouble width, Mdouble cutoff)
Sets the width and cutoff of the coarse-graining function.
Definition: ExactOverlap.h:103
Mdouble getWidth() const
Returns the width of the coarse-graining function.
Definition: ExactOverlap.h:93
Mdouble evaluateCGFunction(const Vec3D &position, const Mdouble rad, const Coordinates r)
Evaluates the coarse-graining function.
Vec3D evaluateCGFunctionDerivatives(const Vec3D &position, const Coordinates &r)
Definition: ExactOverlap.h:137
Mdouble evaluateCGFunction(const Vec3D &position, const Coordinates r)
Evaluates the coarse-graining function.
Definition: ExactOverlap.h:130
ExactOverlap(const ExactOverlap &c)=default
Copy constructor. It copies the ExactOverlapCoordinates and all objects it contains.
void setEps(Mdouble eps)
Returns the finite difference step size used to evaluate derivatives of the CG function.
Definition: ExactOverlap.h:125
void write(std::ostream &os) const
Writes class content into an output stream, usually a stat file.
void setStandardDeviation(Mdouble std)
Sets the standard deviation of the coarse-graining function.
Definition: ExactOverlap.h:98
Coordinates CoordinatesType
Definition: ExactOverlap.h:63
Template argument; use a member class of CGCoordinates to instantiate.
The DPMBase header includes quite a few header files, defining all the handlers, which are essential....
Definition: DPMBase.h:56
Definition: Kernel/Math/Vector.h:30
Contains base classes of CGPoint; CGPoint is always templated with one of these classes; these classe...
Definition: ExactOverlap.h:28
CGFunctions::ExactOverlap< CGCoordinates::XYZ > ExactOverlapXYZ
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:163
CGFunctions::ExactOverlap< CGCoordinates::Z > ExactOverlapZ
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:155
CGFunctions::ExactOverlap< CGCoordinates::XY > ExactOverlapXY
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:161
CGFunctions::ExactOverlap< CGCoordinates::X > ExactOverlapX
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:151
CGFunctions::ExactOverlap< CGCoordinates::O > ExactOverlapO
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:149
CGFunctions::ExactOverlap< CGCoordinates::YZ > ExactOverlapYZ
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:157
CGFunctions::ExactOverlap< CGCoordinates::XZ > ExactOverlapXZ
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:159
CGFunctions::ExactOverlap< CGCoordinates::R > ExactOverlapR
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:165
CGFunctions::ExactOverlap< CGCoordinates::Y > ExactOverlapY
Defines a short notation for the ExactOverlapian CGFunction templated with a certain CGCoordinate.
Definition: ExactOverlap.h:153
double eps
Definition: crbond_bessel.cc:24
r
Definition: UniformPSDSelfTest.py:20
radius
Definition: UniformPSDSelfTest.py:15
int c
Definition: calibrate.py:100
type
Definition: compute_granudrum_aor.py:141
const Mdouble NaN
Definition: GeneralDefine.h:22