chombo-discharge
CD_EBHelmholtzDirichletEBBCFactory.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_EBHelmholtzDirichletEBBCFactory.H
8  @brief Declaration of a factory class for making Dirichlet boundary conditions on EBs for EBHelmholtzOp
9  @author Robert Marskar
10 */
11 
12 #ifndef CD_EBHelmholtzDirichletEBBCFactory_H
13 #define CD_EBHelmholtzDirichletEBBCFactory_H
14 
15 // Our includes
16 #include <CD_EBHelmholtzEBBCFactory.H>
17 #include <CD_NamespaceHeader.H>
18 
23 {
24 public:
29 
37  EBHelmholtzDirichletEBBCFactory(const int a_order, const int a_weight, const Real a_value);
38 
44  EBHelmholtzDirichletEBBCFactory(const int a_order,
45  const int a_weight,
46  const std::function<Real(const RealVect& a_pos)>& a_value);
47 
52 
58  virtual void
59  setOrder(const int a_order);
60 
66  virtual void
67  setWeight(const int a_weight);
68 
73  virtual void
74  setValue(const Real a_value);
75 
79  virtual void
80  setDomainDropOrder(const int a_domainSize);
81 
86  virtual void
87  setValue(const std::function<Real(const RealVect& a_pos)>& a_value);
88 
92  virtual RefCountedPtr<EBHelmholtzEBBC>
93  create() override;
94 
95 protected:
100 
105 
109  int m_order;
110 
114  int m_weight;
115 
120 
125 
129  std::function<Real(const RealVect& a_pos)> m_functionValue;
130 };
131 
132 #include <CD_NamespaceFooter.H>
133 
134 #endif
Factory class for making Dirichlet BCs on EBs in EBHelmholtzOp.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:23
int m_weight
Stencil weighting.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:114
bool m_useFunction
Use function for BC value.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:104
virtual ~EBHelmholtzDirichletEBBCFactory()
Destructor.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:60
EBHelmholtzDirichletEBBCFactory()
Constructor.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:20
bool m_useConstant
Use constant for BC.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:99
Real m_constantValue
Value on EB.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:124
virtual void setValue(const Real a_value)
Set the value on the EB.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:86
int m_domainDropOrder
Special flag for dropping stencil order when domains become coarser than this.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:119
virtual void setOrder(const int a_order)
Set BC order.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:66
int m_order
Stencil approximation order,.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:109
virtual RefCountedPtr< EBHelmholtzEBBC > create() override
Factory method.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:116
std::function< Real(const RealVect &a_pos)> m_functionValue
Value on the EB.
Definition: CD_EBHelmholtzDirichletEBBCFactory.H:129
virtual void setDomainDropOrder(const int a_domainSize)
Drop BC order if domain size is equal or below this.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:108
virtual void setWeight(const int a_weight)
Set BC order.
Definition: CD_EBHelmholtzDirichletEBBCFactory.cpp:76
Factory class for making EBHelmholtzEBBCs.
Definition: CD_EBHelmholtzEBBCFactory.H:26