chombo-discharge
CD_Dielectric.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_Dielectric_H
13 #define CD_Dielectric_H
14 
15 // Std includes
16 #include <functional>
17 
18 // Chombo includes
19 #include <BaseIF.H>
20 #include <RefCountedPtr.H>
21 
22 // Our includes
23 #include <CD_NamespaceHeader.H>
24 
29 {
30 public:
34  Dielectric();
35 
42  Dielectric(const RefCountedPtr<BaseIF>& a_baseIF, const Real a_permittivity);
43 
50  Dielectric(const RefCountedPtr<BaseIF>& a_baseIF, const std::function<Real(const RealVect a_pos)>& a_permittivity);
51 
55  virtual ~Dielectric();
56 
62  virtual void
63  define(const RefCountedPtr<BaseIF>& a_baseIF, const Real a_permittivity);
64 
70  virtual void
71  define(const RefCountedPtr<BaseIF>& a_baseIF, const std::function<Real(const RealVect a_pos)>& a_permittivity);
72 
77  virtual const RefCountedPtr<BaseIF>&
78  getImplicitFunction() const;
79 
85  virtual Real
86  getPermittivity(const RealVect a_pos) const;
87 
88 protected:
92  RefCountedPtr<BaseIF> m_baseIF;
93 
98 
102  std::function<Real(const RealVect a_pos)> m_variablePermittivity;
103 
108 
113 };
114 
115 #include <CD_NamespaceFooter.H>
116 
117 #endif
dielectric class. Simple tuple.
Definition: CD_Dielectric.H:29
virtual const RefCountedPtr< BaseIF > & getImplicitFunction() const
Get level-set function.
Definition: CD_Dielectric.cpp:75
RefCountedPtr< BaseIF > m_baseIF
Implicit function.
Definition: CD_Dielectric.H:92
bool m_useConstant
Use constant permittivity or not.
Definition: CD_Dielectric.H:107
virtual void define(const RefCountedPtr< BaseIF > &a_baseIF, const Real a_permittivity)
Define function.
Definition: CD_Dielectric.cpp:48
virtual ~Dielectric()
Destructor (does nothing).
Definition: CD_Dielectric.cpp:44
Dielectric()
Weak constructor, must subsequently call one of the define methods.
Definition: CD_Dielectric.cpp:17
Real m_constantPermittivity
Constant permittivity.
Definition: CD_Dielectric.H:97
bool m_isDefined
Is defined or not.
Definition: CD_Dielectric.H:112
virtual Real getPermittivity(const RealVect a_pos) const
Get permittivity.
Definition: CD_Dielectric.cpp:85
std::function< Real(const RealVect a_pos)> m_variablePermittivity
Variable permittivity.
Definition: CD_Dielectric.H:102