15#ifndef CD_PETSCHELMHOLTZEBSTENCILS_H
16#define CD_PETSCHELMHOLTZEBSTENCILS_H
19#include <RefCountedPtr.H>
22#include <LayoutData.H>
30#include <CD_NamespaceHeader.H>
114 setOrder(const
int a_order) noexcept;
144 const RealVect& a_probLo,
145 const Vector<Real>& a_dx) noexcept;
219 const DataIndex& a_din,
220 const VolIndex& a_vof) const noexcept;
238 const DataIndex& a_din,
239 const VolIndex& a_vof) const noexcept;
261 const DataIndex& a_din,
262 const VolIndex& a_vof,
263 const
VofUtils::Neighborhood a_neighborhood,
264 const
int a_order) const noexcept;
277 const DataIndex& a_din,
278 const VolIndex& a_vof) const noexcept;
281#include <CD_NamespaceFooter.H>
Declaration of a wrapper class for holding multifluid EBMultigridInterpolators.
File containing declaration of PetscGrid.
Declaration of a simple stencil class for PETSc.
Various functions for getting Vofs near cut-cells.
Wrapper class for holding multifluid EBMultigridInterpolators.
Definition CD_MFMultigridInterpolator.H:27
Class which maps a multifluid cut-cell AMR hierarchy to PETSc.
Definition CD_PetscGrid.H:47
bool m_verbose
Verbose output or not.
Definition CD_PetscHelmholtzEBStencils.H:161
virtual long long getNumCellsWithoutStencil() const noexcept
Get the number of cut cells, summed over phases, levels and ranks, that have an EB face but no stenci...
Definition CD_PetscHelmholtzEBStencils.cpp:481
virtual void getNormalDerivativeStencil(Real &a_boundaryWeight, PetscStencil &a_stencil, const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof) const noexcept
Get the stored one-sided normal derivative at the EB face of a cut cell.
Definition CD_PetscHelmholtzEBStencils.cpp:194
virtual void computeNormalDerivativeStencil(Real &a_boundaryWeight, PetscStencil &a_stencil, const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof) const noexcept
Compute the one-sided normal derivative at the EB face of a cut cell.
Definition CD_PetscHelmholtzEBStencils.cpp:215
long long m_numCellsWithoutStencil
Number of cut cells, summed over phases, levels and ranks, that have an EB face but no stencil.
Definition CD_PetscHelmholtzEBStencils.H:156
int m_order
Highest order of the stencils, or -1 if not set.
Definition CD_PetscHelmholtzEBStencils.H:166
PetscHelmholtzEBStencils(const PetscHelmholtzEBStencils &&a_other)=delete
Disallowed move constructor.
RefCountedPtr< PetscGrid > m_petscGrid
PETSc grid.
Definition CD_PetscHelmholtzEBStencils.H:176
Vector< MFMultigridInterpolator > m_interpolators
Coarse-fine ghost cell interpolators of both phases, on each level.
Definition CD_PetscHelmholtzEBStencils.H:181
virtual ~PetscHelmholtzEBStencils() noexcept
Destructor.
Definition CD_PetscHelmholtzEBStencils.cpp:42
Vector< RefCountedPtr< LayoutData< BaseIVFAB< Real > > > > m_derivWeights[2]
The weights w_B of the boundary value in the one-sided normal derivatives.
Definition CD_PetscHelmholtzEBStencils.H:203
bool m_isDefined
Is defined or not.
Definition CD_PetscHelmholtzEBStencils.H:151
virtual void setWeight(const int a_weight) noexcept
Set the least-squares weighting.
Definition CD_PetscHelmholtzEBStencils.cpp:62
Vector< RefCountedPtr< LayoutData< BaseIVFAB< PetscStencil > > > > m_derivStencils[2]
The stencils of the one-sided normal derivatives, over PETSc rows.
Definition CD_PetscHelmholtzEBStencils.H:197
virtual RealVect getBoundaryPosition(const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof) const noexcept
Get the physical position of the centroid of the EB face of a cut cell.
Definition CD_PetscHelmholtzEBStencils.cpp:463
virtual void setOrder(const int a_order) noexcept
Set the order of the stencils.
Definition CD_PetscHelmholtzEBStencils.cpp:51
virtual void clear() noexcept
Release the stored stencils, the grids and the interpolators, so that the object can be defined again...
Definition CD_PetscHelmholtzEBStencils.cpp:73
Vector< Real > m_dx
Grid resolution on each level.
Definition CD_PetscHelmholtzEBStencils.H:191
PetscHelmholtzEBStencils & operator=(const PetscHelmholtzEBStencils &a_other)=delete
Disallowed copy assignment operator.
PetscHelmholtzEBStencils() noexcept
Default constructor. Must subsequently set the order and the weight, and call define.
Definition CD_PetscHelmholtzEBStencils.cpp:28
int m_weight
Least-squares weighting, or -1 if not set.
Definition CD_PetscHelmholtzEBStencils.H:171
PetscHelmholtzEBStencils(const PetscHelmholtzEBStencils &a_other)=delete
Disallowed copy constructor.
virtual bool getLeastSquaresStencil(Real &a_boundaryWeight, PetscStencil &a_stencil, const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof, const VofUtils::Neighborhood a_neighborhood, const int a_order) const noexcept
Try to compute the one-sided normal derivative at the EB face of a cut cell, for one neighbourhood an...
Definition CD_PetscHelmholtzEBStencils.cpp:263
virtual void define(const RefCountedPtr< PetscGrid > &a_petscGrid, const Vector< MFMultigridInterpolator > &a_interpolators, const RealVect &a_probLo, const Vector< Real > &a_dx) noexcept
Define over the AMR hierarchy, and compute the one-sided normal derivative stencils of every cut cell...
Definition CD_PetscHelmholtzEBStencils.cpp:95
PetscHelmholtzEBStencils & operator=(const PetscHelmholtzEBStencils &&a_other)=delete
Disallowed move assignment operator.
RealVect m_probLo
Lower-left corner of the computational domain.
Definition CD_PetscHelmholtzEBStencils.H:186
A linear stencil over global PETSc rows, i.e. a list of (row, weight) pairs.
Definition CD_PetscStencil.H:43
Static class which contains some routines for fetching VoFs using various algorithms....
Definition CD_VofUtils.H:35