chombo-discharge
CD_SignedDistanceDCEL.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
13 #ifndef CD_SignedDistanceDCEL_H
14 #define CD_SignedDistanceDCEL_H
15 
16 // Std includes
17 #include <memory>
18 
19 // EBGeometry includes
20 #include <EBGeometry.hpp>
21 
22 // Chombo includes
23 #include <BaseIF.H>
24 
25 // Our includes
26 #include <CD_NamespaceHeader.H>
27 
32 template <class T>
33 class SignedDistanceDCEL : public BaseIF
34 {
35 public:
39  using Mesh = EBGeometry::DCEL::MeshT<T>;
40 
44  SignedDistanceDCEL() = delete;
45 
52  SignedDistanceDCEL(const std::shared_ptr<Mesh>& a_mesh, const bool a_flipInside, const Real a_zCoord = 0.0);
53 
58  SignedDistanceDCEL(const SignedDistanceDCEL& a_object);
59 
64 
69  Real
70  value(const RealVect& a_point) const override;
71 
75  BaseIF*
76  newImplicitFunction() const override;
77 
78 protected:
82  std::shared_ptr<Mesh> m_mesh;
83 
88 
92  Real m_zCoord;
93 };
94 
95 #include <CD_NamespaceFooter.H>
96 
98 
99 #endif
Implementation of CD_SignedDistanceDCEL.H.
Signed distance function from a DCEL mesh.
Definition: CD_SignedDistanceDCEL.H:34
Real m_zCoord
For 2D only. z-coordinate through which we slice the 3D object.
Definition: CD_SignedDistanceDCEL.H:92
~SignedDistanceDCEL()
Destructor (does nothing)
Definition: CD_SignedDistanceDCELImplem.H:38
Real value(const RealVect &a_point) const override
Value function.
Definition: CD_SignedDistanceDCELImplem.H:43
std::shared_ptr< Mesh > m_mesh
DCEL mesh.
Definition: CD_SignedDistanceDCEL.H:82
EBGeometry::DCEL::MeshT< T > Mesh
Alias for EBGeometry DCEl mesh with precision T.
Definition: CD_SignedDistanceDCEL.H:39
bool m_flipInside
Hook for turning inside to outside.
Definition: CD_SignedDistanceDCEL.H:87
SignedDistanceDCEL()=delete
Disallowed, use the full constructor.
BaseIF * newImplicitFunction() const override
Factory method.
Definition: CD_SignedDistanceDCELImplem.H:64