chombo-discharge
Loading...
Searching...
No Matches
CD_MFHelmholtzJumpBC.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_MFHELMHOLTZJUMPBC_H
14#define CD_MFHELMHOLTZJUMPBC_H
15
16// Chombo includes
17#include <MFCellFAB.H>
18#include <EBISBox.H>
19#include <LayoutData.H>
20#include <Stencils.H>
21#include <AggStencil.H>
22#include <EBCellFAB.H>
23#include <BaseIVFAB.H>
24
25// Our includes
26#include <CD_Location.H>
27#include <CD_MFLevelGrid.H>
28#include <CD_VofUtils.H>
29#include <CD_MFInterfaceFAB.H>
30#include <CD_MFBaseIVFAB.H>
31#include <CD_NamespaceHeader.H>
32
43{
44public:
49
54
59
74 const MFLevelGrid& a_mflg,
75 const BcoefPtr& a_Bcoef,
76 const AmrMask& a_validCells,
77 Real a_dx,
78 int a_order,
79 int a_weight,
80 int a_radius,
81 int a_ghostCF,
83
88
92 virtual ~MFHelmholtzJumpBC();
93
99
102 operator=(MFHelmholtzJumpBC&&) = delete;
103
108 void
110
115 bool
117
122 int
123 getOrder() const;
124
129 int
131
136 int
138
143 void
145
152 virtual void
154
162 virtual void
164
173
182
191
198
205
209 virtual void
210 resetBC() const;
211
217
222
227
232
237
242
247
252
257
262
267
272
277
282
287
292
297
302
307
312
317
322
327
332
337
342
346 void
348
352 void
354
358 void
360
371 virtual bool
375 VofUtils::Neighborhood a_neighborhood,
376 int a_order) const;
377
385 inline bool
387
396};
397
398#include <CD_NamespaceFooter.H>
399
400#include <CD_MFHelmholtzJumpBCImplem.H>
401
402#endif
Declaration of cell positions.
Declaration of a multiphase BaseIVFAB<Real>
Declaration of a class that allocates irregular data holders over the interface between two phases.
Declaration of a wrapper for wrapping multifluid EBLevelGrids.
Various functions for getting Vofs near cut-cells.
Multiphase BaseIVFAB<Real>.
Definition CD_MFBaseIVFAB.H:30
Class for computing "jump interface" boundary conditions for multifluid code.
Definition CD_MFHelmholtzJumpBC.H:43
static constexpr int m_comp
Component where stencils are stored.
Definition CD_MFHelmholtzJumpBC.H:216
Real m_dx
Grid resolution.
Definition CD_MFHelmholtzJumpBC.H:246
void setCoarseGridDropOrder(bool a_dropOrder)
Signal MFHelmholtzJumpBC that it should drop the stencil order if the cell is a coarsened cell.
Definition CD_MFHelmholtzJumpBC.cpp:86
LayoutData< MFInterfaceFAB< VoFStencil > > m_avgStencils
Average stencil.
Definition CD_MFHelmholtzJumpBC.H:321
LayoutData< MFInterfaceFAB< Real > > m_boundaryPhi
Value of phi on the boundary.
Definition CD_MFHelmholtzJumpBC.H:291
LayoutData< MFInterfaceFAB< Real > > m_denom
Denominator 1/(bp*wp + bq*wq) for all interface cells.
Definition CD_MFHelmholtzJumpBC.H:331
virtual bool getLeastSquaresBoundaryGradStencil(std::pair< Real, VoFStencil > &a_stencil, const VolIndex &a_vof, const EBISBox &a_ebisbox, VofUtils::Neighborhood a_neighborhood, int a_order) const
Get stencil with specified order.
Definition CD_MFHelmholtzJumpBC.cpp:501
int m_ghostCF
Number of grid cells that were filled over the CF.
Definition CD_MFHelmholtzJumpBC.H:266
virtual const BaseIVFAB< Real > & getBndryPhi(int a_phase, const DataIndex &a_dit) const
Get phi on the boundary.
Definition CD_MFHelmholtzJumpBC.cpp:92
virtual const LayoutData< MFInterfaceFAB< Real > > & getGradPhiWeights() const noexcept
Get constant weights involved when computing dphi/dn at the boundary.
Definition CD_MFHelmholtzJumpBC.cpp:116
LayoutData< MFInterfaceFAB< Real > > m_gradPhiWeights
Raw weights for dphi/dn.
Definition CD_MFHelmholtzJumpBC.H:316
Real applyStencil(const VoFStencil &a_stencil, const EBCellFAB &a_phi) const
Apply a stencil and return the result.
Definition CD_MFHelmholtzJumpBCImplem.H:70
RefCountedPtr< LevelData< MFBaseIVFAB > > m_Bcoef
B-coefficient.
Definition CD_MFHelmholtzJumpBC.H:236
bool isMultiPhase() const noexcept
Is multiphase or not.
Definition CD_MFHelmholtzJumpBC.cpp:133
int m_numPhases
Number of phases.
Definition CD_MFHelmholtzJumpBC.H:271
void setBco(const RefCountedPtr< LevelData< MFBaseIVFAB > > &a_Bcoef)
Set B-coefficient. This updates the stencils.
Definition CD_MFHelmholtzJumpBC.cpp:122
int m_order
Stencil order.
Definition CD_MFHelmholtzJumpBC.H:251
LayoutData< RefCountedPtr< AggStencil< EBCellFAB, BaseIVFAB< Real > > > > m_aggStencils[2]
Agg stencils for making matching go faster.
Definition CD_MFHelmholtzJumpBC.H:341
virtual const LayoutData< MFInterfaceFAB< VoFStencil > > & getGradPhiStencils() const noexcept
Get stencils for computing dphi/dn at the boundary.
Definition CD_MFHelmholtzJumpBC.cpp:110
MFHelmholtzJumpBC & operator=(const MFHelmholtzJumpBC &a_other)=delete
Disallowed assignment constructor.
int m_radius
Stencil order.
Definition CD_MFHelmholtzJumpBC.H:261
int getWeight() const
Return stencil weight (for least squares)
Definition CD_MFHelmholtzJumpBC.cpp:74
RefCountedPtr< LevelData< MFBaseIVFAB > > BcoefPtr
Alias to cut down on typing.
Definition CD_MFHelmholtzJumpBC.H:48
MFHelmholtzJumpBC(const MFHelmholtzJumpBC &a_other)=delete
Disallowed copy constructor.
LayoutData< MFInterfaceFAB< Real > > m_avgWeights
Average weights.
Definition CD_MFHelmholtzJumpBC.H:336
Location::Cell m_dataLocation
Data centering.
Definition CD_MFHelmholtzJumpBC.H:226
MFHelmholtzJumpBC()=delete
Disallowed weak construction.
IntVect m_ghostPhi
Number of ghost cells in phi (must be exact match in order to use AggStencil)
Definition CD_MFHelmholtzJumpBC.H:276
virtual VoFIterator & getMultiPhaseVofs(int a_phase, const DataIndex &a_dit) const
Return vof iterator which iterates over multi-phase cells on a specified phase and box.
Definition CD_MFHelmholtzJumpBC.cpp:104
void defineIterators()
Define function. Builds stencils.
Definition CD_MFHelmholtzJumpBC.cpp:446
bool isStencilValidCF(const VoFStencil &a_stencil, const DataIndex &a_dit) const
Check if stencil is valid.
Definition CD_MFHelmholtzJumpBCImplem.H:24
void defineStencils()
Define function. Builds stencils.
Definition CD_MFHelmholtzJumpBC.cpp:141
void buildAverageStencils()
Brief the average stencils.
Definition CD_MFHelmholtzJumpBC.cpp:303
virtual void resetBC() const
Set everything to zero. This is a debugging function.
Definition CD_MFHelmholtzJumpBC.cpp:551
static constexpr int m_nComp
Number of components in stencil.
Definition CD_MFHelmholtzJumpBC.H:221
int getRadius() const
Return stencil radius (for least squares)
Definition CD_MFHelmholtzJumpBC.cpp:80
RefCountedPtr< LevelData< BaseFab< bool > > > m_validCells
Valid grid cells.
Definition CD_MFHelmholtzJumpBC.H:241
LayoutData< IntVectSet > m_ivs
IntVectSet over which we run the "averaging".
Definition CD_MFHelmholtzJumpBC.H:306
MFLevelGrid m_mflg
Grids.
Definition CD_MFHelmholtzJumpBC.H:231
LayoutData< MFInterfaceFAB< VoFStencil > > m_gradPhiStencils
Raw stencils for dphi/dn.
Definition CD_MFHelmholtzJumpBC.H:311
virtual ~MFHelmholtzJumpBC()
Destructor. Does nothing.
Definition CD_MFHelmholtzJumpBC.cpp:62
bool m_dropOrder
Drop order or not.
Definition CD_MFHelmholtzJumpBC.H:286
virtual void matchBC(LevelData< BaseIVFAB< Real > > &a_jump, const LevelData< MFCellFAB > &a_phi, bool a_homogeneousPhysBC) const
Match the BC.
Definition CD_MFHelmholtzJumpBC.cpp:570
RefCountedPtr< LevelData< BaseFab< bool > > > AmrMask
Alias to cut down on typing.
Definition CD_MFHelmholtzJumpBC.H:53
std::map< int, std::shared_ptr< LayoutData< VoFIterator > > > m_multiPhaseVofs
Iterators for multi-phase cells. The integer index is the phase.
Definition CD_MFHelmholtzJumpBC.H:301
int getOrder() const
Return stencil order.
Definition CD_MFHelmholtzJumpBC.cpp:68
LayoutData< MFInterfaceFAB< Vector< VolIndex > > > m_avgVoFs
Target vofs for average stencils.
Definition CD_MFHelmholtzJumpBC.H:326
virtual VoFIterator & getSinglePhaseVofs(int a_phase, const DataIndex &a_dit) const
Return vof iterator which iterates over single-phase cells on a specific phase and box.
Definition CD_MFHelmholtzJumpBC.cpp:98
bool m_multiPhase
Multiphase or not.
Definition CD_MFHelmholtzJumpBC.H:281
int m_weight
Stencil order.
Definition CD_MFHelmholtzJumpBC.H:256
std::map< int, std::shared_ptr< LayoutData< VoFIterator > > > m_singlePhaseVofs
Iterators for single-phase cells. The integer index is the phase.
Definition CD_MFHelmholtzJumpBC.H:296
Class for holding BaseIVFAB<T> on the interface between two phases.
Definition CD_MFInterfaceFAB.H:31
Wrapper class for holding multifluid EBLevelGrids.
Definition CD_MFLevelGrid.H:30
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
Static class which contains some routines for fetching VoFs using various algorithms....
Definition CD_VofUtils.H:34
Namespace for encapsulating various data centerings.
Definition CD_Location.H:25
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:31