chombo-discharge
CD_SphereSdf.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 
12 #ifndef CD_SphereSdf_H
13 #define CD_SphereSdf_H
14 
15 // Chombo includes
16 #include <BaseIF.H>
17 
18 // Our includes
19 #include <CD_NamespaceHeader.H>
20 
24 class SphereSdf : public BaseIF
25 {
26 public:
33  SphereSdf(const RealVect& a_center, const Real& a_radius, const bool& a_fluidInside);
34 
39  SphereSdf(const SphereSdf& a_inputIF);
40 
44  virtual ~SphereSdf();
45 
50  virtual Real
51  value(const RealVect& a_point) const;
52 
56  virtual BaseIF*
57  newImplicitFunction() const;
58 
59 protected:
63  RealVect m_center;
64 
68  Real m_radius;
69 
74 };
75 
76 #include <CD_NamespaceFooter.H>
77 
78 #endif
Signed distance function for sphere.
Definition: CD_SphereSdf.H:25
bool m_fluidInside
Inside or outside domain.
Definition: CD_SphereSdf.H:73
virtual Real value(const RealVect &a_point) const
Get distance to sphere.
Definition: CD_SphereSdf.cpp:34
RealVect m_center
Sphere center.
Definition: CD_SphereSdf.H:63
virtual BaseIF * newImplicitFunction() const
IF factory method.
Definition: CD_SphereSdf.cpp:49
SphereSdf(const RealVect &a_center, const Real &a_radius, const bool &a_fluidInside)
Constructor.
Definition: CD_SphereSdf.cpp:16
Real m_radius
Cylinder radius.
Definition: CD_SphereSdf.H:68
virtual ~SphereSdf()
Destructor.
Definition: CD_SphereSdf.cpp:30