15#ifndef CD_PETSCHELMHOLTZDIRICHLETEBBC_H
16#define CD_PETSCHELMHOLTZDIRICHLETEBBC_H
23#include <CD_NamespaceHeader.H>
48 setValue(
const Real a_value)
noexcept;
55 setValue(
const std::function<Real(
const RealVect& a_pos)>& a_value)
noexcept;
71 const DataIndex& a_din,
72 const VolIndex& a_vof)
const noexcept override;
85 const DataIndex& a_din,
86 const VolIndex& a_vof)
const noexcept override;
110#include <CD_NamespaceFooter.H>
Declaration of a base class for electrode (EB) boundary conditions of PetscHelmholtzOp.
PetscHelmholtzDirichletEBBC() noexcept
Default constructor. Must subsequently set the value, the order and the weight, and call define.
Definition CD_PetscHelmholtzDirichletEBBC.cpp:23
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, without the b-coefficient and the face area.
Definition CD_PetscHelmholtzDirichletEBBC.cpp:67
virtual void setValue(const Real a_value) noexcept
Set a constant value on the EB.
Definition CD_PetscHelmholtzDirichletEBBC.cpp:41
bool m_useConstant
Use the constant value or not.
Definition CD_PetscHelmholtzDirichletEBBC.H:92
Real m_constantValue
Constant value on the EB.
Definition CD_PetscHelmholtzDirichletEBBC.H:102
bool m_useFunction
Use the spatially varying value or not.
Definition CD_PetscHelmholtzDirichletEBBC.H:97
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. phi on the EB.
Definition CD_PetscHelmholtzDirichletEBBC.cpp:86
std::function< Real(const RealVect &a_pos)> m_functionValue
Spatially varying value on the EB.
Definition CD_PetscHelmholtzDirichletEBBC.H:107
virtual ~PetscHelmholtzDirichletEBBC() noexcept
Destructor.
Definition CD_PetscHelmholtzDirichletEBBC.cpp:32
PetscHelmholtzEBBC() noexcept
Default constructor. Must subsequently set the order and the weight, and call define.
Definition CD_PetscHelmholtzEBBC.cpp:22
A linear stencil over global PETSc rows, i.e. a list of (row, weight) pairs.
Definition CD_PetscStencil.H:43