Size the backing pools for (Np,nVar,nElem) and remap the public arrays onto them at the exact logical shape. See SELF_DataPool for why this is done with pointer remapping rather than by over-allocating the element dimension.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Vector2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | Np | |||
| integer, | intent(in) | :: | nVar | |||
| integer, | intent(in) | :: | nElem |
subroutine MapArrays_Vector2D_t(this,Np,nVar,nElem)
!! Size the backing pools for (Np,nVar,nElem) and remap the public arrays onto them at the
!! exact logical shape. See SELF_DataPool for why this is done with pointer remapping rather
!! than by over-allocating the element dimension.
implicit none
class(Vector2D_t),intent(inout) :: this
integer,intent(in) :: Np
integer,intent(in) :: nVar
integer,intent(in) :: nElem
! Local
integer :: nInt,nBnd,nNrm
nInt = Np*Np*nElem*nVar*2
nBnd = Np*4*nElem*nVar*2
nNrm = Np*4*nElem*nVar
call EnsurePool(this%pool_interior,nInt)
call EnsurePool(this%pool_boundary,nBnd)
call EnsurePool(this%pool_extBoundary,nBnd)
call EnsurePool(this%pool_avgBoundary,nBnd)
call EnsurePool(this%pool_boundaryNormal,nNrm)
this%interior(1:Np,1:Np,1:nElem,1:nVar,1:2) => this%pool_interior(1:nInt)
this%boundary(1:Np,1:4,1:nElem,1:nVar,1:2) => this%pool_boundary(1:nBnd)
this%extBoundary(1:Np,1:4,1:nElem,1:nVar,1:2) => this%pool_extBoundary(1:nBnd)
this%avgBoundary(1:Np,1:4,1:nElem,1:nVar,1:2) => this%pool_avgBoundary(1:nBnd)
this%boundaryNormal(1:Np,1:4,1:nElem,1:nVar) => this%pool_boundaryNormal(1:nNrm)
endsubroutine MapArrays_Vector2D_t