chombo-discharge
CD_Electrode.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_Electrode_H
13 #define CD_Electrode_H
14 
15 // Chombo includes
16 #include <BaseIF.H>
17 #include <RefCountedPtr.H>
18 
19 // Our includes
20 #include <CD_NamespaceHeader.H>
21 
25 class Electrode
26 {
27 public:
31  Electrode();
32 
40  Electrode(const RefCountedPtr<BaseIF>& a_baseIF, const bool a_live, const Real a_voltageFraction = 1.0);
41 
45  virtual ~Electrode();
46 
53  virtual void
54  define(const RefCountedPtr<BaseIF>& a_baseIF, const bool a_live, const Real a_voltageFraction = 1.0);
55 
60  virtual const RefCountedPtr<BaseIF>&
61  getImplicitFunction() const;
62 
67  virtual const bool&
68  isLive() const;
69 
74  virtual const Real&
75  getFraction() const;
76 
77 protected:
81  RefCountedPtr<BaseIF> m_baseIF;
82 
86  bool m_isLive;
87 
92 
97 };
98 
99 #include <CD_NamespaceFooter.H>
100 
101 #endif
Electrode class for encapsulating the concept of an electrical conductor.
Definition: CD_Electrode.H:26
virtual const Real & getFraction() const
Get fraction of live voltage.
Definition: CD_Electrode.cpp:70
virtual void define(const RefCountedPtr< BaseIF > &a_baseIF, const bool a_live, const Real a_voltageFraction=1.0)
Define function.
Definition: CD_Electrode.cpp:37
RefCountedPtr< BaseIF > m_baseIF
Implicit function.
Definition: CD_Electrode.H:81
bool m_isLive
Live or not.
Definition: CD_Electrode.H:86
bool m_isDefined
Is defined or not.
Definition: CD_Electrode.H:91
virtual ~Electrode()
Destructor (does nothing)
Definition: CD_Electrode.cpp:33
virtual const bool & isLive() const
Get live or not.
Definition: CD_Electrode.cpp:60
virtual const RefCountedPtr< BaseIF > & getImplicitFunction() const
Get implicit function.
Definition: CD_Electrode.cpp:50
Electrode()
Default constructor. Must subsequently call define()
Definition: CD_Electrode.cpp:16
Real m_voltageFraction
Fraction of the live potential.
Definition: CD_Electrode.H:96