chombo-discharge
Loading...
Searching...
No Matches
PetscHelmholtzElectrostaticDomainBC Class Reference

Domain boundary conditions for PetscHelmholtzOp, taken from ElectrostaticDomainBc. More...

#include <CD_PetscHelmholtzElectrostaticDomainBC.H>

Inheritance diagram for PetscHelmholtzElectrostaticDomainBC:
Collaboration diagram for PetscHelmholtzElectrostaticDomainBC:

Public Member Functions

 PetscHelmholtzElectrostaticDomainBC ()=delete
 Disallowed default constructor.
 PetscHelmholtzElectrostaticDomainBC (const ElectrostaticDomainBc &a_electrostaticBCs)
 Constructor. Creates a Dirichlet or Neumann BC object on each domain side.
 PetscHelmholtzElectrostaticDomainBC (const PetscHelmholtzElectrostaticDomainBC &a_other)=delete
 Disallowed copy constructor.
 PetscHelmholtzElectrostaticDomainBC (const PetscHelmholtzElectrostaticDomainBC &&a_other)=delete
 Disallowed move constructor.
 ~PetscHelmholtzElectrostaticDomainBC ()
 Destructor.
PetscHelmholtzElectrostaticDomainBC & operator= (const PetscHelmholtzElectrostaticDomainBC &a_other)=delete
 Disallowed copy assignment operator.
PetscHelmholtzElectrostaticDomainBC & operator= (const PetscHelmholtzElectrostaticDomainBC &&a_other)=delete
 Disallowed move assignment operator.
void define (const RefCountedPtr< PetscGrid > &a_petscGrid, const RealVect &a_probLo, const Vector< Real > &a_dx) override final
 Define the BC objects on every domain side.
void getFaceFluxStencil (Real &a_boundaryWeight, VoFStencil &a_stencilCoar, VoFStencil &a_stencil, VoFStencil &a_stencilFine, const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof, const int a_dir, const Side::LoHiSide a_side) const override final
 Get the face flux stencil from the BC object on the domain side.
Real getBoundaryData (const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof, const int a_dir, const Side::LoHiSide a_side) const override final
 Get the boundary data from the BC object on the domain side.
Public Member Functions inherited from PetscHelmholtzDomainBC
 PetscHelmholtzDomainBC ()
 Default constructor. Must subsequently call define.
virtual ~PetscHelmholtzDomainBC ()
 Destructor.
 PetscHelmholtzDomainBC (const PetscHelmholtzDomainBC &a_other)=delete
 Disallowed copy constructor.
 PetscHelmholtzDomainBC (const PetscHelmholtzDomainBC &&a_other)=delete
 Disallowed move constructor.
PetscHelmholtzDomainBC & operator= (const PetscHelmholtzDomainBC &a_other)=delete
 Disallowed copy assignment operator.
PetscHelmholtzDomainBC & operator= (const PetscHelmholtzDomainBC &&a_other)=delete
 Disallowed move assignment operator.

Protected Attributes

ElectrostaticDomainBc m_electrostaticBCs
 Electrostatic domain boundary conditions.
std::map< ElectrostaticDomainBc::DomainSide, std::shared_ptr< PetscHelmholtzDomainBC > > m_bcObjects
 BC objects on each domain side, created in the constructor.
Protected Attributes inherited from PetscHelmholtzDomainBC
bool m_isDefined
 Is defined or not.
RefCountedPtr< PetscGrid > m_petscGrid
 PETSc grid.
RealVect m_probLo
 Lower-left corner of the computational domain.
Vector< Real > m_dx
 Grid resolution on each level.

Additional Inherited Members

Protected Member Functions inherited from PetscHelmholtzDomainBC
RealVect getBoundaryPosition (const int a_phase, const int a_level, const DataIndex &a_din, const VolIndex &a_vof, const int a_dir, const Side::LoHiSide a_side) const noexcept
 Get the physical position of the centroid of a domain face.

Detailed Description

Domain boundary conditions for PetscHelmholtzOp, taken from ElectrostaticDomainBc.

This mirrors EBHelmholtzElectrostaticDomainBC: it holds a Dirichlet or Neumann BC object on each domain side and routes the calls to it. The BC values are evaluated whenever getBoundaryData is called, so time-dependent values (FieldSolver captures its time by reference) enter through the right-hand side.

Constructor & Destructor Documentation

◆ PetscHelmholtzElectrostaticDomainBC() [1/3]

PetscHelmholtzElectrostaticDomainBC::PetscHelmholtzElectrostaticDomainBC ( const ElectrostaticDomainBc & a_electrostaticBCs)

Constructor. Creates a Dirichlet or Neumann BC object on each domain side.

Parameters
[in]a_electrostaticBCsElectrostatic domain boundary conditions

◆ PetscHelmholtzElectrostaticDomainBC() [2/3]

PetscHelmholtzElectrostaticDomainBC::PetscHelmholtzElectrostaticDomainBC ( const PetscHelmholtzElectrostaticDomainBC & a_other)
delete

Disallowed copy constructor.

Parameters
[in]a_otherOther BC

◆ PetscHelmholtzElectrostaticDomainBC() [3/3]

PetscHelmholtzElectrostaticDomainBC::PetscHelmholtzElectrostaticDomainBC ( const PetscHelmholtzElectrostaticDomainBC && a_other)
delete

Disallowed move constructor.

Parameters
[in]a_otherOther BC

Member Function Documentation

◆ define()

void PetscHelmholtzElectrostaticDomainBC::define ( const RefCountedPtr< PetscGrid > & a_petscGrid,
const RealVect & a_probLo,
const Vector< Real > & a_dx )
finaloverridevirtual

Define the BC objects on every domain side.

Parameters
[in]a_petscGridPETSc grid
[in]a_probLoLower-left corner of the computational domain
[in]a_dxGrid resolution on each level

Reimplemented from PetscHelmholtzDomainBC.

◆ getBoundaryData()

Real PetscHelmholtzElectrostaticDomainBC::getBoundaryData ( const int a_phase,
const int a_level,
const DataIndex & a_din,
const VolIndex & a_vof,
const int a_dir,
const Side::LoHiSide a_side ) const
finaloverridevirtual

Get the boundary data from the BC object on the domain side.

Parameters
[in]a_phasePhase
[in]a_levelGrid level
[in]a_dinGrid index on the level
[in]a_vofCell adjacent to the domain face
[in]a_dirCoordinate direction of the face
[in]a_sideDomain side of the face
Returns
The boundary data.

Implements PetscHelmholtzDomainBC.

◆ getFaceFluxStencil()

void PetscHelmholtzElectrostaticDomainBC::getFaceFluxStencil ( Real & a_boundaryWeight,
VoFStencil & a_stencilCoar,
VoFStencil & a_stencil,
VoFStencil & a_stencilFine,
const int a_phase,
const int a_level,
const DataIndex & a_din,
const VolIndex & a_vof,
const int a_dir,
const Side::LoHiSide a_side ) const
finaloverridevirtual

Get the face flux stencil from the BC object on the domain side.

Parameters
[out]a_boundaryWeightWeight w_B of the boundary data in the flux, see getBoundaryData
[out]a_stencilCoarStencil over cells on level a_level - 1
[out]a_stencilStencil over cells on level a_level
[out]a_stencilFineStencil over cells on level a_level + 1
[in]a_phasePhase
[in]a_levelGrid level
[in]a_dinGrid index on the level
[in]a_vofCell adjacent to the domain face
[in]a_dirCoordinate direction of the face
[in]a_sideDomain side of the face

Implements PetscHelmholtzDomainBC.

◆ operator=() [1/2]

PetscHelmholtzElectrostaticDomainBC & PetscHelmholtzElectrostaticDomainBC::operator= ( const PetscHelmholtzElectrostaticDomainBC && a_other)
delete

Disallowed move assignment operator.

Parameters
[in]a_otherOther BC
Returns
This BC.

◆ operator=() [2/2]

PetscHelmholtzElectrostaticDomainBC & PetscHelmholtzElectrostaticDomainBC::operator= ( const PetscHelmholtzElectrostaticDomainBC & a_other)
delete

Disallowed copy assignment operator.

Parameters
[in]a_otherOther BC
Returns
This BC.

The documentation for this class was generated from the following files: