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(Tensor2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | Np | |||
| integer, | intent(in) | :: | nVar | |||
| integer, | intent(in) | :: | nElem |
subroutine MapArrays_Tensor2D_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(Tensor2D_t),intent(inout) :: this
integer,intent(in) :: Np
integer,intent(in) :: nVar
integer,intent(in) :: nElem
! Local
integer :: nInt,nBnd
nInt = Np*Np*nElem*nVar*2*2
nBnd = Np*4*nElem*nVar*2*2
call EnsurePool(this%pool_interior,nInt)
call EnsurePool(this%pool_boundary,nBnd)
call EnsurePool(this%pool_extBoundary,nBnd)
this%interior(1:Np,1:Np,1:nElem,1:nVar,1:2,1:2) => this%pool_interior(1:nInt)
this%boundary(1:Np,1:4,1:nElem,1:nVar,1:2,1:2) => this%pool_boundary(1:nBnd)
this%extBoundary(1:Np,1:4,1:nElem,1:nVar,1:2,1:2) => this%pool_extBoundary(1:nBnd)
endsubroutine MapArrays_Tensor2D_t