chombo-discharge
CD_TorusSdf.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_TorusSdf_H
13 #define CD_TorusSdf_H
14 
15 // Chombo includes
16 #include <BaseIF.H>
17 
18 // Our includes
19 #include <CD_NamespaceHeader.H>
20 
24 class TorusSdf : public BaseIF
25 {
26 public:
30  TorusSdf() = delete;
31 
39  TorusSdf(const RealVect a_center, const Real a_majorRadius, const Real a_minorRadius, const bool a_fluidInside);
40 
46  TorusSdf(const TorusSdf& a_inputIF);
47 
51  virtual ~TorusSdf();
52 
57  virtual Real
58  value(const RealVect& a_point) const override;
59 
63  virtual BaseIF*
64  newImplicitFunction() const override;
65 
66 protected:
70  RealVect m_center;
71 
76 
81 
86 };
87 
88 #include <CD_NamespaceFooter.H>
89 
90 #endif
Signed distance function for a torus (oriented along z).
Definition: CD_TorusSdf.H:25
bool m_fluidInside
Inside or outside domain.
Definition: CD_TorusSdf.H:85
TorusSdf()=delete
No weak construction (yet)
virtual ~TorusSdf()
Destructor.
Definition: CD_TorusSdf.cpp:35
RealVect m_center
Sphere center.
Definition: CD_TorusSdf.H:70
Real m_minorRadius
Cylinder radius.
Definition: CD_TorusSdf.H:80
virtual BaseIF * newImplicitFunction() const override
IF factory method.
Definition: CD_TorusSdf.cpp:65
virtual Real value(const RealVect &a_point) const override
Test whether inside or not.
Definition: CD_TorusSdf.cpp:39
Real m_majorRadius
Cylinder radius.
Definition: CD_TorusSdf.H:75