chombo-discharge
CD_EBGeometryIF.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_EBGeometryIF_H
13 #define CD_EBGeometryIF_H
14 
15 // Std includes
16 #include <memory>
17 
18 // Chombo includes
19 #include <BaseIF.H>
20 #include <IntersectionIF.H>
21 
22 // EBGeometry includes
23 #include <EBGeometry.hpp>
24 
25 // Our includes
26 #include <CD_NamespaceHeader.H>
27 
33 template <typename T = Real>
34 class EBGeometryIF : public BaseIF
35 {
36 public:
40  EBGeometryIF();
41 
48  EBGeometryIF(const std::shared_ptr<EBGeometry::ImplicitFunction<T>>& a_sdf,
49  const bool a_flipInside,
50  const Real a_zCoord = 0.0);
51 
56  EBGeometryIF(const EBGeometryIF& a_inputIF);
57 
61  virtual ~EBGeometryIF();
62 
67  virtual Real
68  value(const RealVect& a_point) const override;
69 
73  virtual BaseIF*
74  newImplicitFunction() const override;
75 
76 protected:
80  std::shared_ptr<const EBGeometry::ImplicitFunction<T>> m_sdf;
81 
86 
90  Real m_zCoord;
91 };
92 
93 #include <CD_NamespaceFooter.H>
94 
95 #include <CD_EBGeometryIFImplem.H>
96 
97 #endif
Implementation of CD_EBGeometryIF.H.
Shallow binding of EBGeometry signed distance functions to Chombo.
Definition: CD_EBGeometryIF.H:35
virtual ~EBGeometryIF()
Destructor. Does nothing.
Definition: CD_EBGeometryIFImplem.H:46
std::shared_ptr< const EBGeometry::ImplicitFunction< T > > m_sdf
Signed distance function.
Definition: CD_EBGeometryIF.H:80
EBGeometryIF()
Constructor. Sets shape to nullptr.
Definition: CD_EBGeometryIFImplem.H:19
virtual BaseIF * newImplicitFunction() const override
IF factory method.
Definition: CD_EBGeometryIFImplem.H:72
Real m_zCoord
z-coordinate through which the object is sliced.
Definition: CD_EBGeometryIF.H:90
virtual Real value(const RealVect &a_point) const override
Value function. Returns distance to object.
Definition: CD_EBGeometryIFImplem.H:53
bool m_flipInside
Hook for making outside -> inside.
Definition: CD_EBGeometryIF.H:85