Free_Scalar2D_t Subroutine

public subroutine Free_Scalar2D_t(this)

Arguments

TypeIntentOptionalAttributesName
class(Scalar2D_t), intent(inout) :: this

Called by

proc~~free_scalar2d_t~~CalledByGraph proc~free_scalar2d_t Free_Scalar2D_t proc~free_mappedscalar2d Free_MappedScalar2D proc~free_mappedscalar2d->proc~free_scalar2d_t proc~free_scalar2d Free_Scalar2D proc~free_scalar2d->proc~free_scalar2d_t

Contents

Source Code


Source Code

  subroutine Free_Scalar2D_t(this)
    implicit none
    class(Scalar2D_t),intent(inout) :: this

    this%nVar = 0
    this%nElem = 0
    this%interp => null()
    ! The public arrays point into the pools rather than owning their storage, so they are
    ! nullified and the pools are released (AMR Stage 6b).
    this%interior => null()
    this%boundary => null()
    this%extBoundary => null()
    this%avgBoundary => null()
    this%boundarynormal => null()
    if(associated(this%pool_interior)) deallocate(this%pool_interior)
    if(associated(this%pool_boundary)) deallocate(this%pool_boundary)
    if(associated(this%pool_extBoundary)) deallocate(this%pool_extBoundary)
    if(associated(this%pool_avgBoundary)) deallocate(this%pool_avgBoundary)
    if(associated(this%pool_boundarynormal)) deallocate(this%pool_boundarynormal)
    deallocate(this%meta)
    deallocate(this%eqn)

  endsubroutine Free_Scalar2D_t