Temporary workspace for projection step calculations.
Holds intermediate vectors (RHS, residuals, search directions) to avoid repeated allocation during the simulation loop.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=rk), | public, | allocatable | :: | ap(:) | |||
| logical, | public | :: | initialized | = | .false. | ||
| real(kind=rk), | public, | allocatable | :: | local_ap(:) | |||
| real(kind=rk), | public, | allocatable | :: | local_face_flux(:) | |||
| real(kind=rk), | public, | allocatable | :: | local_scalar(:) | |||
| real(kind=rk), | public, | allocatable | :: | local_vec(:,:) | |||
| real(kind=rk), | public, | allocatable | :: | local_vec_star(:,:) | |||
| integer, | public | :: | ncells | = | 0 | ||
| integer, | public | :: | nfaces | = | 0 | ||
| real(kind=rk), | public, | allocatable | :: | predicted_face_flux(:) | |||
| real(kind=rk), | public, | allocatable | :: | pvec(:) | |||
| real(kind=rk), | public, | allocatable | :: | r(:) | |||
| real(kind=rk), | public, | allocatable | :: | rhs_poisson(:) | |||
| real(kind=rk), | public, | allocatable | :: | z(:) |
type :: projection_workspace_t logical :: initialized = .false. integer :: ncells = 0 integer :: nfaces = 0 real(rk), allocatable :: local_vec(:,:) !< Local momentum RHS. real(rk), allocatable :: local_vec_star(:,:) !< Local intermediate velocity. real(rk), allocatable :: local_scalar(:) !< Local divergence scalar. real(rk), allocatable :: rhs_poisson(:) !< Source term for Poisson solve. real(rk), allocatable :: local_face_flux(:) !< Face fluxes on owned faces. real(rk), allocatable :: predicted_face_flux(:) !< Global intermediate face fluxes. real(rk), allocatable :: r(:) !< PCG residual vector. real(rk), allocatable :: z(:) !< PCG preconditioned residual. real(rk), allocatable :: pvec(:) !< PCG search direction. real(rk), allocatable :: ap(:) !< PCG operator-applied vector. real(rk), allocatable :: local_ap(:) !< PCG local operator-applied vector. end type projection_workspace_t