chombo-discharge
Loading...
Searching...
No Matches
CD_EBHelmholtzEBBC.H
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
7/*
8 @file CD_EBHelmholtzEBBC.H
9 @brief Declaration of a base boundary condition class for EB boundary conditions in EBHelmholtzOp
10 @author Robert Marskar
11*/
12
13#ifndef CD_EBHELMHOLTZEBBC_H
14#define CD_EBHELMHOLTZEBBC_H
15
16// Chombo includes
17#include <EBLevelGrid.H>
18#include <RefCountedPtr.H>
19#include <LevelData.H>
20#include <BaseIVFAB.H>
21
22// Our includes
23#include <CD_Location.H>
24#include <CD_NamespaceHeader.H>
25
30{
31public:
36
41
45 virtual ~EBHelmholtzEBBC();
46
51
57
67 void
69 const EBLevelGrid& a_eblg,
70 const AmrMask& a_validCells,
71 const RealVect& a_probLo,
72 const Real& a_dx,
73 const int a_ghostCF);
74
85 virtual void
88 const EBCellFAB& a_phi,
90 const DataIndex& a_dit,
91 const Real& a_beta,
92 const bool& a_homogeneousPhysBC) const = 0;
93
103 getGradPhiStencils() const;
104
105protected:
109 constexpr static int m_comp = 0;
110
114 constexpr static int m_nComp = 1;
115
120
125
130
135
140
145
150
154 virtual void
155 define() = 0;
156
164 inline bool
166
173 inline RealVect
174 getBoundaryPosition(const VolIndex& a_vof, const DataIndex& a_dit) const;
175
182 inline Real
183 applyStencil(const VoFStencil& a_stencil, const EBCellFAB& a_phi) const;
184};
185
186#include <CD_NamespaceFooter.H>
187
188#include <CD_EBHelmholtzEBBCImplem.H>
189
190#endif
Declaration of cell positions.
Base class for passing EB boundary conditions into EBHelmholtzOp.
Definition CD_EBHelmholtzEBBC.H:30
Real applyStencil(const VoFStencil &a_stencil, const EBCellFAB &a_phi) const
Apply stencil to data holder and return result.
Definition CD_EBHelmholtzEBBCImplem.H:38
RefCountedPtr< LevelData< BaseFab< bool > > > AmrMask
Alias to cut down on typing.
Definition CD_EBHelmholtzEBBC.H:35
const LayoutData< BaseIVFAB< VoFStencil > > & getGradPhiStencils() const
Get the stencil for computing the finite-volume approximation to kappa*Div(F).
Definition CD_EBHelmholtzEBBC.cpp:58
EBLevelGrid m_eblg
Level grid.
Definition CD_EBHelmholtzEBBC.H:139
Location::Cell m_dataLocation
Data centering.
Definition CD_EBHelmholtzEBBC.H:119
int m_ghostCF
Number of ghost cells that were filled across CF interface.
Definition CD_EBHelmholtzEBBC.H:124
RealVect getBoundaryPosition(const VolIndex &a_vof, const DataIndex &a_dit) const
Returns physical position at the boundary.
Definition CD_EBHelmholtzEBBCImplem.H:24
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
Valid grid cells.
Definition CD_EBHelmholtzEBBC.H:144
static constexpr int m_nComp
Number of components. Always have m_nComp = 1.
Definition CD_EBHelmholtzEBBC.H:114
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:149
RealVect m_probLo
Lower-left corner of computational domain.
Definition CD_EBHelmholtzEBBC.H:134
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:51
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:109
EBHelmholtzEBBC()
Default constructor.
Definition CD_EBHelmholtzEBBC.cpp:24
Real m_dx
Grid resolution.
Definition CD_EBHelmholtzEBBC.H:129
virtual ~EBHelmholtzEBBC()
Destructor.
Definition CD_EBHelmholtzEBBC.cpp:29
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:31