|
chombo-discharge
|
Base class for the boundary conditions on the EB faces of cut cells that are not interface cells (electrodes). More...
#include <CD_PetscHelmholtzEBBC.H>


Public Member Functions | |
| PetscHelmholtzEBBC () noexcept | |
| Default constructor. Must subsequently set the order and the weight, and call define. | |
| virtual | ~PetscHelmholtzEBBC () noexcept |
| Destructor. | |
| 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=0 |
| Get the flux through the EB face of a cut cell, without the b-coefficient and the face area. | |
| virtual Real | getBoundaryData (const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof) const noexcept=0 |
| Get the boundary data g at the EB face of a cut cell. | |
| 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 boundary conditions on the EB faces of cut cells that are not interface cells (electrodes).
The flux through the EB face of a cut cell is returned as a linear form in the cell values and the boundary data g,
F = w_B * g + sum_j w_j * phi_j,
where F is the normal derivative of phi with n pointing out of the cell, and the stencil is over PETSc rows, as in PetscHelmholtzEBStencils. F does not contain the b-coefficient or the face area, which PetscHelmholtzOp multiplies in. The stencil goes into the matrix, and w_B * g into the right-hand side. This mirrors PetscHelmholtzDomainBC for the domain faces.
|
pure virtualnoexcept |
Get the boundary data g at the EB face of a cut cell.
The flux depends on g through w_B * g, with w_B from getEBFluxStencil. g is evaluated whenever the right-hand side is built.
| [in] | a_phase | Phase |
| [in] | a_level | Grid level |
| [in] | a_din | Grid index on the level |
| [in] | a_vof | Cut cell |
Implemented in PetscHelmholtzDirichletEBBC, PetscHelmholtzElectrostaticEBBC, and PetscHelmholtzNeumannEBBC.
|
pure virtualnoexcept |
Get the flux through the EB face of a cut cell, without the b-coefficient and the face area.
| [out] | a_boundaryWeight | Weight w_B of the boundary data, see getBoundaryData |
| [out] | a_stencil | Stencil over PETSc rows |
| [in] | a_phase | Phase |
| [in] | a_level | Grid level |
| [in] | a_din | Grid index on the level |
| [in] | a_vof | Cut cell |
Implemented in PetscHelmholtzDirichletEBBC, and PetscHelmholtzNeumannEBBC.