chombo-discharge
CD_RoundedCylinderIF.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_RoundedCylinderIF_H
13 #define CD_RoundedCylinderIF_H
14 
15 // Chombo includes
16 #include <BaseIF.H>
17 
18 // Our includes
19 #include <CD_NamespaceHeader.H>
20 
24 class RoundedCylinderIF : public BaseIF
25 {
26 public:
35  RoundedCylinderIF(const RealVect a_center1,
36  const RealVect a_center2,
37  const Real a_radius,
38  const Real a_curv,
39  const bool a_fluidInside);
40 
45  RoundedCylinderIF(const RoundedCylinderIF& a_inputIF);
46 
51  virtual Real
52  value(const RealVect& a_point) const override;
53 
57  virtual BaseIF*
58  newImplicitFunction() const override;
59 
60 protected:
64  RealVect m_center1;
65 
69  RealVect m_center2;
70 
74  Real m_length;
75 
79  Real m_radius;
80 
84  Real m_curv;
85 
90 
94  RefCountedPtr<BaseIF> m_baseIF;
95 
99  void
100  makeBaseIF();
101 
105 #if CH_SPACEDIM == 2
106  BaseIF*
107  makeBaseIF2D();
108 #elif CH_SPACEDIM == 3
109  BaseIF*
110  makeBaseIF3D();
111 #endif
112 };
113 
114 #include <CD_NamespaceFooter.H>
115 
116 #endif
Cylinder object with rounded edges (no endcaps)
Definition: CD_RoundedCylinderIF.H:25
Real m_radius
Cylinder radius.
Definition: CD_RoundedCylinderIF.H:79
void makeBaseIF()
Make the implicit function.
Definition: CD_RoundedCylinderIF.cpp:70
RealVect m_center2
Cylinder center.
Definition: CD_RoundedCylinderIF.H:69
bool m_fluidInside
Inside or outside domain.
Definition: CD_RoundedCylinderIF.H:89
Real m_length
Cylinder length.
Definition: CD_RoundedCylinderIF.H:74
Real m_curv
Radius of curvature.
Definition: CD_RoundedCylinderIF.H:84
virtual Real value(const RealVect &a_point) const override
Get distance to object.
Definition: CD_RoundedCylinderIF.cpp:52
RoundedCylinderIF(const RealVect a_center1, const RealVect a_center2, const Real a_radius, const Real a_curv, const bool a_fluidInside)
Constructor.
Definition: CD_RoundedCylinderIF.cpp:29
RealVect m_center1
Cylinder center.
Definition: CD_RoundedCylinderIF.H:64
virtual BaseIF * newImplicitFunction() const override
IF factory method.
Definition: CD_RoundedCylinderIF.cpp:64
RefCountedPtr< BaseIF > m_baseIF
Implicit function.
Definition: CD_RoundedCylinderIF.H:94