Class for storing grid information and corresponding PETSc rows. Used for mapping between Chombo and PETSC.
More...
#include <CD_PetscAMRCell.H>
|
|
| PetscAMRCell () noexcept |
| | Constructor - does nothing.
|
|
| ~PetscAMRCell () noexcept |
| | Destructor - does nothing.
|
|
| PetscAMRCell (const PetscAMRCell &)=default |
| | Copy constructor – can use default.
|
|
| PetscAMRCell (PetscAMRCell &&)=default |
| | Move constructor – can use default.
|
| PetscAMRCell & | operator= (const PetscAMRCell &)=default |
| | Copy assignment, can use default.
|
| PetscAMRCell & | operator= (PetscAMRCell &&)=default |
| | Move assignment, can use default.
|
| void | define (const PetscInt a_petscRowPhase0, const PetscInt a_petscRowPhase1, const bool a_isCoveredByFinerGrid, const bool a_isCoarCF, const bool a_isFineCF, const bool a_isGhostCF, const bool a_isDomainBoundaryCell) noexcept |
| | Define operator. Sets all parameters.
|
| void | setPetscRow (const int a_phase, const PetscInt a_row) noexcept |
| | Set corresponding row in PETSc for specific phase.
|
| void | setCoveredByFinerGrid (const bool a_coveredByFinerGrid) noexcept |
| | Set covered by finer grid flag.
|
| void | setCoarCF (const bool a_isCoarCF) noexcept |
| | Set coarse-side CF flag.
|
| void | setFineCF (const bool a_isFineCF) noexcept |
| | Set fine-side CF flag.
|
| void | setGhostCF (const bool a_isGhostCF) noexcept |
| | Set ghosted coarse-fined flag.
|
| void | setDomainBoundaryCell (const bool a_isDomainBoundaryCell) noexcept |
| | Set domain boundary flag.
|
| PetscInt | getPetscRow (const int a_iphase) const noexcept |
| | Get the PETSc row corresponding to this cell and phase.
|
| bool | isCoveredByFinerGrid () const noexcept |
| | Check if the cell is covered by a finer grid.
|
| bool | isCoarCF () const noexcept |
| | Check if the cell lies on the coarse-side of the refinement interface.
|
| bool | isFineCF () const noexcept |
| | Check if the cell lies on the fine-side of the refinement interface.
|
| bool | isGhostCF () const noexcept |
| | Check if the cell is a ghost cell outside this grid level.
|
| bool | isDomainBoundaryCell () const noexcept |
| | Check if the cell is a domain boundary cell.
|
|
|
PetscInt | m_petscRows [2] |
| | If >= 0, this contains the PETSc row corresponding to the grid cell on phase 0.
|
|
bool | m_isCoveredByFinerGrid |
| | If true, the cell is covered by a finer grid.
|
|
bool | m_isGhostCF |
| | If true, the cell lies outside the grid level.
|
|
bool | m_isCoarCF |
| | If true, the cell lies on the coarse side of the coarse-fine boundary.
|
|
bool | m_isFineCF |
| | If true, the cell lies on the fine side of the coarse-fine boundary.
|
|
bool | m_isDomainBoundaryCell |
| | If true, the cell is a domain boundary cell.
|
Class for storing grid information and corresponding PETSc rows. Used for mapping between Chombo and PETSC.
This class is not very sophisticated. It is meant to be plugged into a BaseFab<PetscAMRCell>, and it will store the cell information of the corresponding cell (in an AMR context). Various cell flags are available, such as whether or not the cell is a ghost cell, if it is covered by another refined cell. It also stores the corresponding PETSc rows in the cell. Note that we permit two PETSc rows per cell since we're also dealing with jump conditions where we need to store the cell-centered potential on two phases.
◆ define()
| void PetscAMRCell::define |
( |
const PetscInt | a_petscRowPhase0, |
|
|
const PetscInt | a_petscRowPhase1, |
|
|
const bool | a_isCoveredByFinerGrid, |
|
|
const bool | a_isCoarCF, |
|
|
const bool | a_isFineCF, |
|
|
const bool | a_isGhostCF, |
|
|
const bool | a_isDomainBoundaryCell ) |
|
noexcept |
Define operator. Sets all parameters.
- Parameters
-
| [in] | a_petscRowPhase0 | PETSc row corresponding to this grid cell on phase 0 (gas phase) |
| [in] | a_petscRowPhase1 | PETSc row corresponding to this grid cell on phase 1 (solid phase) |
| [in] | a_isCoveredByFinerGrid | Covered by finer grid or not. |
| [in] | a_isCoarCF | If true, the cell lies on the coarse side of the refinement boundary |
| [in] | a_isFineCF | If true, the cell lies on the fine side of the refinement boundary |
| [in] | a_isGhostCF | Cell lies outside the grid level. |
| [in] | a_isDomainBoundaryCell | Cell abuts the domain boundary. |
◆ getPetscRow()
| PetscInt PetscAMRCell::getPetscRow |
( |
const int | a_iphase | ) |
const |
|
noexcept |
Get the PETSc row corresponding to this cell and phase.
- Parameters
-
- Returns
- PETSc row, or a negative value if the cell is not a PETSc row on this phase.
◆ isCoarCF()
| bool PetscAMRCell::isCoarCF |
( |
| ) |
const |
|
noexcept |
Check if the cell lies on the coarse-side of the refinement interface.
- Returns
- True if the cell lies on the coarse side of the refinement interface.
◆ isCoveredByFinerGrid()
| bool PetscAMRCell::isCoveredByFinerGrid |
( |
| ) |
const |
|
noexcept |
Check if the cell is covered by a finer grid.
- Returns
- True if the cell is covered by a finer grid.
◆ isDomainBoundaryCell()
| bool PetscAMRCell::isDomainBoundaryCell |
( |
| ) |
const |
|
noexcept |
Check if the cell is a domain boundary cell.
- Returns
- True if the cell abuts the domain boundary.
◆ isFineCF()
| bool PetscAMRCell::isFineCF |
( |
| ) |
const |
|
noexcept |
Check if the cell lies on the fine-side of the refinement interface.
- Returns
- True if the cell lies on the fine side of the refinement interface.
◆ isGhostCF()
| bool PetscAMRCell::isGhostCF |
( |
| ) |
const |
|
noexcept |
Check if the cell is a ghost cell outside this grid level.
- Returns
- True if the cell is a ghost cell outside this grid level.
◆ operator=() [1/2]
Copy assignment, can use default.
- Returns
- This cell.
◆ operator=() [2/2]
Move assignment, can use default.
- Returns
- This cell.
◆ setCoarCF()
| void PetscAMRCell::setCoarCF |
( |
const bool | a_isCoarCF | ) |
|
|
noexcept |
Set coarse-side CF flag.
- Parameters
-
| [in] | a_isCoarCF | If true, cell abuts the refinement boundary from the coarse side |
◆ setCoveredByFinerGrid()
| void PetscAMRCell::setCoveredByFinerGrid |
( |
const bool | a_coveredByFinerGrid | ) |
|
|
noexcept |
Set covered by finer grid flag.
- Parameters
-
| [in] | a_coveredByFinerGrid | If true, cell is covered by a finer grid. |
◆ setDomainBoundaryCell()
| void PetscAMRCell::setDomainBoundaryCell |
( |
const bool | a_isDomainBoundaryCell | ) |
|
|
noexcept |
Set domain boundary flag.
- Parameters
-
| [in] | a_isDomainBoundaryCell | If true, the cell abuts the domain boundary. |
◆ setFineCF()
| void PetscAMRCell::setFineCF |
( |
const bool | a_isFineCF | ) |
|
|
noexcept |
Set fine-side CF flag.
- Parameters
-
| [in] | a_isFineCF | If true, cell abuts the refinement boundary from the fine side |
◆ setGhostCF()
| void PetscAMRCell::setGhostCF |
( |
const bool | a_isGhostCF | ) |
|
|
noexcept |
Set ghosted coarse-fined flag.
- Parameters
-
| [in] | a_isGhostCF | If true, cell is a ghost cell outside the grid level |
◆ setPetscRow()
| void PetscAMRCell::setPetscRow |
( |
const int | a_phase, |
|
|
const PetscInt | a_row ) |
|
noexcept |
Set corresponding row in PETSc for specific phase.
- Parameters
-
| [in] | a_phase | Phase |
| [in] | a_row | PETSc row |
The documentation for this class was generated from the following files: