pressure_operator_cache_t Derived Type

type, private :: pressure_operator_cache_t

Cached sparse matrix coefficients for the Pressure Poisson operator.

Since the mesh geometry and BC types are static, the Laplacian coefficients are computed once at startup to accelerate the PCG matvec.


Components

Type Visibility Attributes Name Initial
real(kind=rk), public, allocatable :: coeff(:,:)
real(kind=rk), public, allocatable :: diag(:)
logical, public :: has_dirichlet_pressure = .false.
logical, public :: has_neumann_outlet = .false.
logical, public :: initialized = .false.
integer, public :: max_faces = 0
integer, public, allocatable :: nb(:,:)
integer, public :: ncells = 0

Source Code

   type :: pressure_operator_cache_t
      logical :: initialized = .false.      !< Initialization toggle.
      logical :: has_dirichlet_pressure = .false. !< True if at least one patch has a fixed pressure.
      logical :: has_neumann_outlet = .false. !< True if at least one boundary patch can absorb flux imbalance.
      integer :: ncells = 0                 !< Number of cells.
      integer :: max_faces = 0              !< Max faces per cell.
      integer, allocatable :: nb(:,:)       !< Neighbor indices for each cell face.
      real(rk), allocatable :: coeff(:,:)   !< Off-diagonal Laplacian coefficients \(A_{ij} = \frac{Area}{dist}\).
      real(rk), allocatable :: diag(:)      !< Diagonal Laplacian coefficients \(A_{ii} = \sum A_{ij}\).
   end type pressure_operator_cache_t