|
chombo-discharge
|
Base class for the conditions on the interface between two phases, for PetscHelmholtzOp. More...
#include <CD_PetscHelmholtzJumpBC.H>


Public Member Functions | |
| PetscHelmholtzJumpBC () noexcept | |
| Default constructor. Must subsequently set the order and the weight, and call define. | |
| virtual | ~PetscHelmholtzJumpBC () noexcept |
| Destructor. | |
| 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=0 |
| Get the flux into one side of an interface cell, b_k * D_k, as a linear form. | |
| virtual Real | getJumpData (const int a_level, const DataIndex &a_din, const IntVect &a_iv, const EBAMRIVData &a_sigma) const noexcept=0 |
| Get the jump data g at an interface cell. | |
| virtual void | updateJumpData (const Vec &a_phi, const MFAMRIVData &a_bCoefIrreg) noexcept=0 |
| Update the jump data from the solution, after the solve. | |
| Public Member Functions inherited from PetscHelmholtzEBStencils | |
| PetscHelmholtzEBStencils () noexcept | |
| Default constructor. Must subsequently set the order and the weight, and call define. | |
| virtual | ~PetscHelmholtzEBStencils () noexcept |
| Destructor. | |
| PetscHelmholtzEBStencils (const PetscHelmholtzEBStencils &a_other)=delete | |
| Disallowed copy constructor. | |
| PetscHelmholtzEBStencils (const PetscHelmholtzEBStencils &&a_other)=delete | |
| Disallowed move constructor. | |
| PetscHelmholtzEBStencils & | operator= (const PetscHelmholtzEBStencils &a_other)=delete |
| Disallowed copy assignment operator. | |
| PetscHelmholtzEBStencils & | operator= (const PetscHelmholtzEBStencils &&a_other)=delete |
| Disallowed move assignment operator. | |
| 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 stencil. | |
| virtual void | setOrder (const int a_order) noexcept |
| Set the order of the stencils. | |
| virtual void | setWeight (const int a_weight) noexcept |
| Set the least-squares weighting. | |
| virtual void | clear () noexcept |
| Release the stored stencils, the grids and the interpolators, so that the object can be defined again, e.g. after a regrid. | |
| 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. | |
Additional Inherited Members | |
| Protected Member Functions inherited from PetscHelmholtzEBStencils | |
| 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. | |
| 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. | |
| 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 and one order. | |
| 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. | |
| Protected Attributes inherited from PetscHelmholtzEBStencils | |
| bool | m_isDefined |
| Is defined or not. | |
| long long | m_numCellsWithoutStencil |
| Number of cut cells, summed over phases, levels and ranks, that have an EB face but no stencil. | |
| bool | m_verbose |
| Verbose output or not. | |
| int | m_order |
| Highest order of the stencils, or -1 if not set. | |
| int | m_weight |
| Least-squares weighting, or -1 if not set. | |
| RefCountedPtr< PetscGrid > | m_petscGrid |
| PETSc grid. | |
| Vector< MFMultigridInterpolator > | m_interpolators |
| Coarse-fine ghost cell interpolators of both phases, on each level. | |
| RealVect | m_probLo |
| Lower-left corner of the computational domain. | |
| Vector< Real > | m_dx |
| Grid resolution on each level. | |
| Vector< RefCountedPtr< LayoutData< BaseIVFAB< PetscStencil > > > > | m_derivStencils [2] |
| The stencils of the one-sided normal derivatives, over PETSc rows. | |
| Vector< RefCountedPtr< LayoutData< BaseIVFAB< Real > > > > | m_derivWeights [2] |
| The weights w_B of the boundary value in the one-sided normal derivatives. | |
Base class for the conditions on the interface between two phases, for PetscHelmholtzOp.
An interface cell is a cut cell where both phases have a VoF. On each side k of the interface, the one-sided normal derivative from PetscHelmholtzEBStencils is D_k = w_B,k * phi_B + sum_i w_k,i * phi_k,i over the valid cells of phase k. A subclass supplies the closure: one equation in the D_k that eliminates phi_B, so that the flux into each side is a linear form over the PETSc rows of both phases and the jump data g,
b_k * D_k = w_g,k * g + sum_j w_k,j * phi_j.
Unlike the electrode and domain boundary conditions, this flux contains the b-coefficient: the closure combines the b-coefficients of both phases, so the weights depend on them. PetscHelmholtzOp passes them in, and multiplies the flux by the face area only. After a change of the b-coefficients, the fluxes must be fetched again; the least-squares stencils are stored and are not recomputed.
|
pure virtualnoexcept |
Get the flux into one side of an interface cell, b_k * D_k, as a linear form.
| [out] | a_dataWeight | Weight w_g of the jump data, see getJumpData |
| [out] | a_stencil | Stencil over PETSc rows of both phases |
| [in] | a_phase | Phase k of the side |
| [in] | a_level | Grid level |
| [in] | a_din | Grid index on the level |
| [in] | a_iv | Interface cell |
| [in] | a_bCoefPhase0 | b-coefficient on the interface, on the side of phase 0 |
| [in] | a_bCoefPhase1 | b-coefficient on the interface, on the side of phase 1 |
Implemented in PetscHelmholtzNaturalJumpBC, and PetscHelmholtzSaturationChargeJumpBC.
|
pure virtualnoexcept |
Get the jump data g at an interface cell.
| [in] | a_level | Grid level |
| [in] | a_din | Grid index on the level |
| [in] | a_iv | Interface cell |
| [in] | a_sigma | Surface charge density on the interface |
Implemented in PetscHelmholtzNaturalJumpBC, and PetscHelmholtzSaturationChargeJumpBC.
|
pure virtualnoexcept |
Update the jump data from the solution, after the solve.
For closures where the jump data is an output (e.g. the saturation charge), this computes it from the solution with the same stencils and keeps it in the boundary condition object, as MFHelmholtzJumpBC does; the solver's surface charge density is not changed. For closures where the jump data is an input, this does nothing.
| [in] | a_phi | Solution, on the rows of the PETSc grid |
| [in] | a_bCoefIrreg | b-coefficient on the EB faces |
Implemented in PetscHelmholtzNaturalJumpBC, and PetscHelmholtzSaturationChargeJumpBC.