chombo-discharge
CD_MFHelmholtzDirichletEBBC.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_MFHelmholtzDirichletEBBC_H
13 #define CD_MFHelmholtzDirichletEBBC_H
14 
15 // Our includes
16 #include <CD_MFHelmholtzEBBC.H>
17 #include <CD_NamespaceHeader.H>
18 
23 {
24 public:
30  MFHelmholtzDirichletEBBC(const int a_phase, const RefCountedPtr<MFHelmholtzJumpBC>& a_jumpBC);
31 
35  virtual ~MFHelmholtzDirichletEBBC();
36 
41  virtual void
42  setValue(const Real a_value);
43 
48  virtual void
49  setValue(const std::function<Real(const RealVect& a_pos)>& a_value);
50 
55  void
56  setOrder(const int a_order);
57 
62  void
63  setWeight(const int a_weight);
64 
68  virtual void
69  setDomainDropOrder(const int a_domainSize);
70 
71 protected:
76 
81 
86 
90  int m_order;
91 
95  int m_weight;
96 
101 
105  std::function<Real(const RealVect& a_pos)> m_functionValue;
106 
110  virtual void
111  defineSinglePhase() override;
112 
123  virtual void
124  applyEBFluxSinglePhase(VoFIterator& a_singlePhaseVofs,
125  EBCellFAB& a_Lphi,
126  const EBCellFAB& a_phi,
127  const BaseIVFAB<Real>& a_Bcoef,
128  const DataIndex& a_dit,
129  const Real& a_beta,
130  const bool& a_homogeneousPhysBC) const override;
131 };
132 
133 #include <CD_NamespaceFooter.H>
134 
135 #endif
Declaration of an EB boundary condition class for MFHelmholtzOp.
Class for making Dirichlet boundary conditions on the EB in a multifluid context.
Definition: CD_MFHelmholtzDirichletEBBC.H:23
virtual void setDomainDropOrder(const int a_domainSize)
Drop BC order if domain size is equal or below this.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:82
int m_order
Stencil order.
Definition: CD_MFHelmholtzDirichletEBBC.H:90
MFHelmholtzDirichletEBBC(const int a_phase, const RefCountedPtr< MFHelmholtzJumpBC > &a_jumpBC)
Constructor. Must subsequently set value, order, and weight.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:21
virtual void setValue(const Real a_value)
Set the value on the EB.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:40
virtual void applyEBFluxSinglePhase(VoFIterator &a_singlePhaseVofs, 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 flux single phase.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:200
int m_weight
Stencil weight.
Definition: CD_MFHelmholtzDirichletEBBC.H:95
virtual ~MFHelmholtzDirichletEBBC()
Default constructor.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:34
virtual void defineSinglePhase() override
User define function.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:90
void setOrder(const int a_order)
Set stencil order.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:62
void setWeight(const int a_weight)
Set stencil weight.
Definition: CD_MFHelmholtzDirichletEBBC.cpp:72
Real m_constantValue
Value on EB.
Definition: CD_MFHelmholtzDirichletEBBC.H:85
std::function< Real(const RealVect &a_pos)> m_functionValue
Value on the EB. Does not apply to matching cells.
Definition: CD_MFHelmholtzDirichletEBBC.H:105
bool m_useConstant
Use constant for BC.
Definition: CD_MFHelmholtzDirichletEBBC.H:75
int m_domainDropOrder
Special flag for dropping stencil order when domains become coarser than this.
Definition: CD_MFHelmholtzDirichletEBBC.H:100
bool m_useFunction
Use function for BC value.
Definition: CD_MFHelmholtzDirichletEBBC.H:80
Class for making boundary conditions on the EB in a multifluid context.
Definition: CD_MFHelmholtzEBBC.H:27