13#ifndef CD_PETSCAMRCELL_H
14#define CD_PETSCAMRCELL_H
25#include <CD_NamespaceHeader.H>
85 define(
const PetscInt a_petscRowPhase0,
86 const PetscInt a_petscRowPhase1,
87 const bool a_isCoveredByFinerGrid,
88 const bool a_isCoarCF,
89 const bool a_isFineCF,
90 const bool a_isGhostCF,
91 const bool a_isDomainBoundaryCell)
noexcept;
99 setPetscRow(
const int a_phase,
const PetscInt a_row)
noexcept;
113 setCoarCF(
const bool a_isCoarCF)
noexcept;
120 setFineCF(
const bool a_isFineCF)
noexcept;
234#include <CD_NamespaceFooter.H>
void linearOut(void *const a_buffer, const PetscAMRCell &a_amrCell)
PetscAMRCell specialization of the linearization function used by LevelData.
Definition CD_PetscAMRCell.cpp:194
constexpr int linearSize(const PetscAMRCell &a_amrCell)
PetscAMRCell specialization of the linearization size function used by LevelData.
Definition CD_PetscAMRCell.cpp:165
void linearIn(PetscAMRCell &a_amrCell, const void *const a_buffer)
PetscAMRCell specialization of the linearization function used by LevelData.
Definition CD_PetscAMRCell.cpp:180
bool m_isGhostCF
If true, the cell lies outside the grid level.
Definition CD_PetscAMRCell.H:192
bool m_isCoveredByFinerGrid
If true, the cell is covered by a finer grid.
Definition CD_PetscAMRCell.H:187
void setCoarCF(const bool a_isCoarCF) noexcept
Set coarse-side CF flag.
Definition CD_PetscAMRCell.cpp:105
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.
Definition CD_PetscAMRCell.cpp:73
void setDomainBoundaryCell(const bool a_isDomainBoundaryCell) noexcept
Set domain boundary flag.
Definition CD_PetscAMRCell.cpp:123
PetscAMRCell(PetscAMRCell &&)=default
Move constructor – can use default.
~PetscAMRCell() noexcept
Destructor - does nothing.
Definition CD_PetscAMRCell.cpp:69
void setCoveredByFinerGrid(const bool a_coveredByFinerGrid) noexcept
Set covered by finer grid flag.
Definition CD_PetscAMRCell.cpp:99
PetscAMRCell & operator=(const PetscAMRCell &)=default
Copy assignment, can use default.
void setGhostCF(const bool a_isGhostCF) noexcept
Set ghosted coarse-fined flag.
Definition CD_PetscAMRCell.cpp:117
PetscInt m_petscRows[2]
If >= 0, this contains the PETSc row corresponding to the grid cell on phase 0.
Definition CD_PetscAMRCell.H:182
bool isFineCF() const noexcept
Check if the cell lies on the fine-side of the refinement interface.
Definition CD_PetscAMRCell.cpp:147
bool m_isCoarCF
If true, the cell lies on the coarse side of the coarse-fine boundary.
Definition CD_PetscAMRCell.H:197
void setFineCF(const bool a_isFineCF) noexcept
Set fine-side CF flag.
Definition CD_PetscAMRCell.cpp:111
PetscAMRCell() noexcept
Constructor - does nothing.
Definition CD_PetscAMRCell.cpp:58
PetscAMRCell & operator=(PetscAMRCell &&)=default
Move assignment, can use default.
PetscAMRCell(const PetscAMRCell &)=default
Copy constructor – can use default.
bool isCoarCF() const noexcept
Check if the cell lies on the coarse-side of the refinement interface.
Definition CD_PetscAMRCell.cpp:141
bool isCoveredByFinerGrid() const noexcept
Check if the cell is covered by a finer grid.
Definition CD_PetscAMRCell.cpp:135
void setPetscRow(const int a_phase, const PetscInt a_row) noexcept
Set corresponding row in PETSc for specific phase.
Definition CD_PetscAMRCell.cpp:91
bool isGhostCF() const noexcept
Check if the cell is a ghost cell outside this grid level.
Definition CD_PetscAMRCell.cpp:153
bool isDomainBoundaryCell() const noexcept
Check if the cell is a domain boundary cell.
Definition CD_PetscAMRCell.cpp:159
PetscInt getPetscRow(const int a_iphase) const noexcept
Get the PETSc row corresponding to this cell and phase.
Definition CD_PetscAMRCell.cpp:129
bool m_isFineCF
If true, the cell lies on the fine side of the coarse-fine boundary.
Definition CD_PetscAMRCell.H:202
bool m_isDomainBoundaryCell
If true, the cell is a domain boundary cell.
Definition CD_PetscAMRCell.H:207