chombo-discharge
CD_MFHelmholtzRobinEBBCFactory.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_MFHelmholtzRobinEBBCFactory_H
13 #define CD_MFHelmholtzRobinEBBCFactory_H
14 
15 // Std includes
16 #include <functional>
17 
18 // Our includes
20 #include <CD_NamespaceHeader.H>
21 
26 {
27 public:
32 
41  MFHelmholtzRobinEBBCFactory(const int a_order, const int a_weight, const Real a_A, const Real a_B, const Real a_C);
42 
51  MFHelmholtzRobinEBBCFactory(const int a_order,
52  const int a_weight,
53  const std::function<Real(const RealVect& a_pos)>& a_A,
54  const std::function<Real(const RealVect& a_pos)>& a_B,
55  const std::function<Real(const RealVect& a_pos)>& a_C);
56 
61 
66  void
67  setOrder(const int a_order);
68 
73  void
74  setWeight(const int a_weight);
75 
79  void
80  setDomainDropOrder(const int a_domainSize);
81 
88  void
89  setCoefficients(const Real a_A, const Real a_B, const Real a_C);
90 
97  void
98  setCoefficients(const std::function<Real(const RealVect& a_pos)>& a_A,
99  const std::function<Real(const RealVect& a_pos)>& a_B,
100  const std::function<Real(const RealVect& a_pos)>& a_C);
101 
106  RefCountedPtr<EBHelmholtzEBBC>
107  create(const int a_iphase, const RefCountedPtr<MFHelmholtzJumpBC>& a_jumpBC) const override;
108 
109 protected:
110  /*
111  @brief Hook when using constant coefficients on the EB
112  */
113  bool m_useConstant;
114 
119 
123  int m_order;
124 
128  int m_weight;
129 
134 
139 
144 
149 
153  std::function<Real(const RealVect& a_pos)> m_functionA;
154 
158  std::function<Real(const RealVect& a_pos)> m_functionB;
159 
163  std::function<Real(const RealVect& a_pos)> m_functionC;
164 };
165 
166 #include <CD_NamespaceFooter.H>
167 
168 #endif
Declaration of an EB boundary condition factory class for MFHelmholtzOp.
Base class for making boundary conditions on the EB in a multifluid context.
Definition: CD_MFHelmholtzEBBCFactory.H:24
Class for making Robin boundary conditions on the EB in a multifluid context.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:26
Real m_constantC
Constant C-coefficient.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:148
MFHelmholtzRobinEBBCFactory()=delete
Disallowed weak construction. Use the full constructors.
void setCoefficients(const Real a_A, const Real a_B, const Real a_C)
Set constant Robin BC coefficients.
Definition: CD_MFHelmholtzRobinEBBCFactory.cpp:88
Real m_constantA
Constant A-coefficient.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:138
std::function< Real(const RealVect &a_pos)> m_functionC
Function-based C-coefficient.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:163
Real m_constantB
Constant B-coefficient.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:143
void setWeight(const int a_weight)
Set equation weights for least squares reconstruction.
Definition: CD_MFHelmholtzRobinEBBCFactory.cpp:70
void setOrder(const int a_order)
Set BC order.
Definition: CD_MFHelmholtzRobinEBBCFactory.cpp:60
void setDomainDropOrder(const int a_domainSize)
Drop BC order if domain size is equal or below this.
std::function< Real(const RealVect &a_pos)> m_functionB
Function-based B-coefficient.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:158
std::function< Real(const RealVect &a_pos)> m_functionA
Function-based A-coefficient.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:153
bool m_useFunction
Hook when using variable coefficients on the EB.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:118
int m_order
Stencil order.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:123
RefCountedPtr< EBHelmholtzEBBC > create(const int a_iphase, const RefCountedPtr< MFHelmholtzJumpBC > &a_jumpBC) const override
Factory method.
Definition: CD_MFHelmholtzRobinEBBCFactory.cpp:116
int m_domainDropOrder
Special flag for dropping stencil order when domains become coarser than this.
Definition: CD_MFHelmholtzRobinEBBCFactory.H:133
int m_weight
Equation weighting (in least squares reconstruction)
Definition: CD_MFHelmholtzRobinEBBCFactory.H:128
~MFHelmholtzRobinEBBCFactory()
Default constructor (does nothing)
Definition: CD_MFHelmholtzRobinEBBCFactory.cpp:54