chombo-discharge
CD_NeedleIF.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2022 NTNU.
3  * Copyright © 2022 Fanny Skirbekk.
4  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
5  */
6 
13 #ifndef CD_NeedleIF_H
14 #define CD_NeedleIF_H
15 
16 // Chombo includes
17 #include <BaseIF.H>
18 #include <RefCountedPtr.H>
19 
20 // Our includes
21 #include <CD_NamespaceHeader.H>
22 
26 class NeedleIF : public BaseIF
27 {
28 public:
37  NeedleIF(const Real& a_length,
38  const Real& a_radius,
39  const Real& a_tipRadius,
40  const Real& a_angle,
41  const bool& a_flipInside);
42 
47  NeedleIF(const NeedleIF& a_inputIF);
48 
53  virtual Real
54  value(const RealVect& a_point) const override;
55 
59  virtual BaseIF*
60  newImplicitFunction() const override;
61 
62 protected:
66  RefCountedPtr<BaseIF> m_implicitFunction;
67 
72 };
73 
74 #include <CD_NamespaceFooter.H>
75 
76 #endif
Cylinder with one pointed end and one circular end.
Definition: CD_NeedleIF.H:27
RefCountedPtr< BaseIF > m_implicitFunction
Base implicit function. This is a union between a cylinder and a cone.
Definition: CD_NeedleIF.H:66
NeedleIF(const Real &a_length, const Real &a_radius, const Real &a_tipRadius, const Real &a_angle, const bool &a_flipInside)
Constructor.
Definition: CD_NeedleIF.cpp:23
virtual Real value(const RealVect &a_point) const override
Value function. Returns distance to object.
Definition: CD_NeedleIF.cpp:66
Real m_tipRadius
curvature-radius of needle tip
Definition: CD_NeedleIF.H:71
virtual BaseIF * newImplicitFunction() const override
IF factory method.
Definition: CD_NeedleIF.cpp:75