15#ifndef CD_PETSCHELMHOLTZNEUMANNEBBC_H
16#define CD_PETSCHELMHOLTZNEUMANNEBBC_H
23#include <CD_NamespaceHeader.H>
55 setDphiDn(
const std::function<Real(
const RealVect& a_pos)>& a_DphiDn)
noexcept;
67 define(
const RefCountedPtr<PetscGrid>& a_petscGrid,
68 const Vector<MFMultigridInterpolator>& a_interpolators,
69 const RealVect& a_probLo,
70 const Vector<Real>& a_dx)
noexcept override;
86 const DataIndex& a_din,
87 const VolIndex& a_vof)
const noexcept override;
100 const DataIndex& a_din,
101 const VolIndex& a_vof)
const noexcept override;
125#include <CD_NamespaceFooter.H>
Declaration of a base class for electrode (EB) boundary conditions of PetscHelmholtzOp.
PetscHelmholtzEBBC() noexcept
Default constructor. Must subsequently set the order and the weight, and call define.
Definition CD_PetscHelmholtzEBBC.cpp:22
PetscHelmholtzNeumannEBBC() noexcept
Default constructor. Must subsequently set the normal derivative, and call define.
Definition CD_PetscHelmholtzNeumannEBBC.cpp:23
virtual void define(const RefCountedPtr< PetscGrid > &a_petscGrid, const Vector< MFMultigridInterpolator > &a_interpolators, const RealVect &a_probLo, const Vector< Real > &a_dx) noexcept override
Define over the AMR hierarchy.
Definition CD_PetscHelmholtzNeumannEBBC.cpp:67
virtual void getEBFluxStencil(Real &a_boundaryWeight, PetscStencil &a_stencil, const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof) const noexcept override
Get the flux through the EB face of a cut cell. The stencil is empty and w_B = 1.
Definition CD_PetscHelmholtzNeumannEBBC.cpp:88
virtual void setDphiDn(const Real a_DphiDn) noexcept
Set a constant normal derivative on the EB.
Definition CD_PetscHelmholtzNeumannEBBC.cpp:41
std::function< Real(const RealVect &a_pos)> m_functionDphiDn
Spatially varying normal derivative on the EB.
Definition CD_PetscHelmholtzNeumannEBBC.H:122
bool m_useConstant
Use the constant normal derivative or not.
Definition CD_PetscHelmholtzNeumannEBBC.H:107
bool m_useFunction
Use the spatially varying normal derivative or not.
Definition CD_PetscHelmholtzNeumannEBBC.H:112
Real m_constantDphiDn
Constant normal derivative on the EB.
Definition CD_PetscHelmholtzNeumannEBBC.H:117
virtual Real getBoundaryData(const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof) const noexcept override
Get the boundary data, i.e. dphi/dn on the EB.
Definition CD_PetscHelmholtzNeumannEBBC.cpp:106
virtual ~PetscHelmholtzNeumannEBBC() noexcept
Destructor.
Definition CD_PetscHelmholtzNeumannEBBC.cpp:32
A linear stencil over global PETSc rows, i.e. a list of (row, weight) pairs.
Definition CD_PetscStencil.H:43