chombo-discharge
CD_EBHelmholtzNeumannEBBC.H
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 
6 /*
7  @file CD_EBHelmholtzNeumannEBBC.H
8  @brief Declaration of a boundary condition class for EBHelmholtzOp
9  @author Robert Marskar
10 */
11 
12 #ifndef CD_EBHelmholtzNeumannEBBC_H
13 #define CD_EBHelmholtzNeumannEBBC_H
14 
15 // Std includes
16 #include <functional>
17 
18 // Our includes
19 #include <CD_EBHelmholtzEBBC.H>
20 #include <CD_NamespaceHeader.H>
21 
28 {
29 public:
34 
38  virtual ~EBHelmholtzNeumannEBBC();
39 
45  void
46  setDphiDn(const Real a_DphiDn);
47 
53  void
54  setDphiDn(const std::function<Real(const RealVect& a_pos)>& a_DphiDn);
55 
61  void
62  setBxDphiDn(const Real a_BxDphiDn);
63 
69  void
70  setBxDphiDn(const std::function<Real(const RealVect& a_pos)>& a_BxDphiDn);
71 
82  virtual void
83  applyEBFlux(VoFIterator& a_vofit,
84  EBCellFAB& a_Lphi,
85  const EBCellFAB& a_phi,
86  const BaseIVFAB<Real>& a_Bcoef,
87  const DataIndex& a_dit,
88  const Real& a_beta,
89  const bool& a_homogeneousPhysBC) const override;
90 
91 protected:
96 
101 
106 
111 
115  std::function<Real(const RealVect& a_pos)> m_functionDphiDn;
116 
120  virtual void
121  define() override;
122 };
123 
124 #include <CD_NamespaceFooter.H>
125 
126 #endif
Base class for passing EB boundary conditions into EBHelmholtzOp.
Definition: CD_EBHelmholtzEBBC.H:29
Base class for passing Neumann EB boundary conditions into EBHelmholtzOp.
Definition: CD_EBHelmholtzNeumannEBBC.H:28
virtual void define() override
User define function.
Definition: CD_EBHelmholtzNeumannEBBC.cpp:81
EBHelmholtzNeumannEBBC()
Default constructor.
Definition: CD_EBHelmholtzNeumannEBBC.cpp:20
virtual void applyEBFlux(VoFIterator &a_vofit, EBCellFAB &a_Lphi, const EBCellFAB &a_phi, const BaseIVFAB< Real > &a_Bcoef, const DataIndex &a_dit, const Real &a_beta, const bool &a_homogeneousPhysBC) const override
Apply the EB flux. This is the version that is called by EBHelmholtzOp.
Definition: CD_EBHelmholtzNeumannEBBC.cpp:125
bool m_useFunction
Use function for BC value.
Definition: CD_EBHelmholtzNeumannEBBC.H:105
Real m_constantDphiDn
Value on EB.
Definition: CD_EBHelmholtzNeumannEBBC.H:110
void setBxDphiDn(const Real a_BxDphiDn)
Set the value of B*dphi/dn on the EB.
Definition: CD_EBHelmholtzNeumannEBBC.cpp:61
bool m_multByBco
Multiply by b-coefficient or not.
Definition: CD_EBHelmholtzNeumannEBBC.H:95
bool m_useConstant
Use constant for BC.
Definition: CD_EBHelmholtzNeumannEBBC.H:100
std::function< Real(const RealVect &a_pos)> m_functionDphiDn
Value on the EB.
Definition: CD_EBHelmholtzNeumannEBBC.H:115
virtual ~EBHelmholtzNeumannEBBC()
Destructor.
Definition: CD_EBHelmholtzNeumannEBBC.cpp:29
void setDphiDn(const Real a_DphiDn)
Set value of dphi/dn on the EB.
Definition: CD_EBHelmholtzNeumannEBBC.cpp:35