chombo-discharge
Loading...
Searching...
No Matches
CD_PetscHelmholtzSaturationChargeJumpBC.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
12
13#ifdef CH_USE_PETSC
14
15#ifndef CD_PETSCHELMHOLTZSATURATIONCHARGEJUMPBC_H
16#define CD_PETSCHELMHOLTZSATURATIONCHARGEJUMPBC_H
17
18// Our includes
21#include <CD_NamespaceHeader.H>
22
31{
32public:
37
43
48
52 virtual void
53 clear() noexcept override;
54
66 virtual void
67 getInterfaceFluxStencil(Real& a_dataWeight,
68 PetscStencil& a_stencil,
69 const int a_phase,
70 const int a_level,
71 const DataIndex& a_din,
72 const IntVect& a_iv,
73 const Real a_bCoefPhase0,
74 const Real a_bCoefPhase1) const noexcept override;
75
84 virtual Real
85 getJumpData(const int a_level,
86 const DataIndex& a_din,
87 const IntVect& a_iv,
88 const EBAMRIVData& a_sigma) const noexcept override;
89
95 virtual void
96 updateJumpData(const Vec& a_phi, const MFAMRIVData& a_bCoefIrreg) noexcept override;
97
104 virtual const EBAMRIVData&
105 getSigma() const noexcept;
106
107protected:
111 phase::which_phase m_phase;
112
117 EBAMRIVData m_sigma;
118};
119
120#include <CD_NamespaceFooter.H>
121
122#endif
123
124#endif
Multi-fluid index space.
Declaration of a base class for the interface (jump) conditions of PetscHelmholtzOp.
PetscHelmholtzJumpBC() noexcept
Default constructor. Must subsequently set the order and the weight, and call define.
Definition CD_PetscHelmholtzJumpBC.cpp:22
phase::which_phase m_phase
Phase on whose side the normal derivative is zero.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.H:111
virtual void updateJumpData(const Vec &a_phi, const MFAMRIVData &a_bCoefIrreg) noexcept override
Compute the surface charge density from the solution, sigma = b_0 * D_0 + b_1 * D_1,...
Definition CD_PetscHelmholtzSaturationChargeJumpBC.cpp:127
virtual void getInterfaceFluxStencil(Real &a_dataWeight, PetscStencil &a_stencil, const int a_phase, const int a_level, const DataIndex &a_din, const IntVect &a_iv, const Real a_bCoefPhase0, const Real a_bCoefPhase1) const noexcept override
Get the flux into one side of an interface cell, b_k * D_k, as a linear form.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.cpp:55
EBAMRIVData m_sigma
The surface charge density computed from the solution by updateJumpData.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.H:117
virtual ~PetscHelmholtzSaturationChargeJumpBC() noexcept
Destructor.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.cpp:33
PetscHelmholtzSaturationChargeJumpBC()=delete
Disallowed default constructor.
virtual const EBAMRIVData & getSigma() const noexcept
Get the surface charge density computed by the last call to updateJumpData.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.cpp:303
virtual void clear() noexcept override
Release the computed surface charge density, the stored stencils and the grids.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.cpp:42
virtual Real getJumpData(const int a_level, const DataIndex &a_din, const IntVect &a_iv, const EBAMRIVData &a_sigma) const noexcept override
Get the jump data, which is zero: this closure has none.
Definition CD_PetscHelmholtzSaturationChargeJumpBC.cpp:113
A linear stencil over global PETSc rows, i.e. a list of (row, weight) pairs.
Definition CD_PetscStencil.H:43
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38