chombo-discharge
Loading...
Searching...
No Matches
CD_EBHelmholtzEBBC.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_EBHelmholtzEBBC.H
8 @brief Declaration of a base boundary condition class for EB boundary conditions in EBHelmholtzOp
9 @author Robert Marskar
10*/
11
12#ifndef CD_EBHelmholtzEBBC_H
13#define CD_EBHelmholtzEBBC_H
14
15// Chombo includes
16#include <EBLevelGrid.H>
17#include <RefCountedPtr.H>
18#include <LevelData.H>
19#include <BaseIVFAB.H>
20
21// Our includes
22#include <CD_Location.H>
23#include <CD_NamespaceHeader.H>
24
29{
30public:
35
40
44 virtual ~EBHelmholtzEBBC();
45
50
56
66 void
68 const EBLevelGrid& a_eblg,
69 const AmrMask& a_validCells,
70 const RealVect& a_probLo,
71 const Real& a_dx,
72 const int a_ghostCF);
73
84 virtual void
87 const EBCellFAB& a_phi,
89 const DataIndex& a_dit,
90 const Real& a_beta,
91 const bool& a_homogeneousPhysBC) const = 0;
92
101 getGradPhiStencils() const;
102
103protected:
107 constexpr static int m_comp = 0;
108
112 constexpr static int m_nComp = 1;
113
118
123
128
133
138
143
148
152 virtual void
153 define() = 0;
154
161 inline bool
163
167 inline RealVect
168 getBoundaryPosition(const VolIndex& a_vof, const DataIndex& a_dit) const;
169
173 inline Real
174 applyStencil(const VoFStencil& a_stencil, const EBCellFAB& a_phi) const;
175};
176
177#include <CD_NamespaceFooter.H>
178
179#include <CD_EBHelmholtzEBBCImplem.H>
180
181#endif
Declaration of cell positions.
Base class for passing EB boundary conditions into EBHelmholtzOp.
Definition CD_EBHelmholtzEBBC.H:29
Real applyStencil(const VoFStencil &a_stencil, const EBCellFAB &a_phi) const
Apply stencil to data holder and return result.
Definition CD_EBHelmholtzEBBCImplem.H:37
RefCountedPtr< LevelData< BaseFab< bool > > > AmrMask
Alias to cut down on typing.
Definition CD_EBHelmholtzEBBC.H:34
const LayoutData< BaseIVFAB< VoFStencil > > & getGradPhiStencils() const
Get the stencil for computing the finite-volume approximation to kappa*Div(F).
Definition CD_EBHelmholtzEBBC.cpp:57
EBLevelGrid m_eblg
Level grid.
Definition CD_EBHelmholtzEBBC.H:137
Location::Cell m_dataLocation
Data centering.
Definition CD_EBHelmholtzEBBC.H:117
int m_ghostCF
Number of ghost cells that were filled across CF interface.
Definition CD_EBHelmholtzEBBC.H:122
RealVect getBoundaryPosition(const VolIndex &a_vof, const DataIndex &a_dit) const
Returns physical position at the boundary.
Definition CD_EBHelmholtzEBBCImplem.H:23
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
Valid grid cells.
Definition CD_EBHelmholtzEBBC.H:142
static constexpr int m_nComp
Number of components. Always have m_nComp = 1.
Definition CD_EBHelmholtzEBBC.H:112
EBHelmholtzEBBC(const EBHelmholtzEBBC &a_other)=delete
Disallowed – don't see why you would need it.
LayoutData< BaseIVFAB< VoFStencil > > m_gradPhiStencils
Stencils for computing the flux on a single level. This is a single-level object.
Definition CD_EBHelmholtzEBBC.H:147
RealVect m_probLo
Lower-left corner of computational domain.
Definition CD_EBHelmholtzEBBC.H:132
virtual void define()=0
User define function.
bool isStencilValidCF(const VoFStencil &a_stencil, const DataIndex &a_dit) const
Check if stencil is valid.
Definition CD_EBHelmholtzEBBCImplem.H:50
EBHelmholtzEBBC & operator=(const EBHelmholtzEBBC &a_other)=delete
Disallowed - don't see why you would need it.
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 =0
Apply the EB flux. This is the version that is called by EBHelmholtzOp.
static constexpr int m_comp
Component that everything is defined for. Always have m_comp = 0.
Definition CD_EBHelmholtzEBBC.H:107
EBHelmholtzEBBC()
Default constructor.
Definition CD_EBHelmholtzEBBC.cpp:23
Real m_dx
Grid resolution.
Definition CD_EBHelmholtzEBBC.H:127
virtual ~EBHelmholtzEBBC()
Destructor.
Definition CD_EBHelmholtzEBBC.cpp:28
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:37
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:30