Resize_Tensor2D Subroutine

public subroutine Resize_Tensor2D(this, interp, nVar, nElem)

Rebind to a new element count, reusing host pools and device buffers where they fit. Deliberately does NOT call UpdateDevice: Init uploads freshly zeroed arrays, which is pure waste in the adaptive loop because the arrays are rewritten immediately after.

Arguments

TypeIntentOptionalAttributesName
class(Tensor2D), intent(inout) :: this
type(Lagrange), intent(in), target:: interp
integer, intent(in) :: nVar
integer, intent(in) :: nElem

Calls

proc~~resize_tensor2d~~CallsGraph proc~resize_tensor2d Resize_Tensor2D proc~resize_tensor2d_t Resize_Tensor2D_t proc~resize_tensor2d->proc~resize_tensor2d_t proc~ensuredevicebuffers_tensor2d EnsureDeviceBuffers_Tensor2D proc~resize_tensor2d->proc~ensuredevicebuffers_tensor2d ensuredevicebuffer ensuredevicebuffer proc~ensuredevicebuffers_tensor2d->ensuredevicebuffer

Contents

Source Code


Source Code

  subroutine Resize_Tensor2D(this,interp,nVar,nElem)
    !! Rebind to a new element count, reusing host pools and device buffers where they fit.
    !! Deliberately does NOT call UpdateDevice: Init uploads freshly zeroed arrays, which is pure
    !! waste in the adaptive loop because the arrays are rewritten immediately after.
    implicit none
    class(Tensor2D),intent(inout) :: this
    type(Lagrange),target,intent(in) :: interp
    integer,intent(in) :: nVar
    integer,intent(in) :: nElem

    call Resize_Tensor2D_t(this,interp,nVar,nElem)
    call EnsureDeviceBuffers_Tensor2D(this)

  endsubroutine Resize_Tensor2D