tem_free_varOp Subroutine

public subroutine tem_free_varOp(fun)

Free a variable description.

Deallocates arrays and nullifies pointers. Does not touch the method data. Thus you should free the method data before calling this routine.

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_op_type), intent(inout) :: fun

Variable method to free.


Called by

proc~~tem_free_varop~2~~CalledByGraph proc~tem_free_varop~2 tem_free_varOp proc~tem_empty_varsys~2 tem_empty_varsys proc~tem_empty_varsys~2->proc~tem_free_varop~2

Contents

Source Code


Source Code

  subroutine tem_free_varOp(fun)
    !> Variable method to free.
    type(tem_varSys_op_type), intent(inout) :: fun

    if (allocated(fun%state_varPos)) deallocate(fun%state_varPos)
    if (allocated(fun%auxField_varPos)) deallocate(fun%auxField_varPos)
    fun%nComponents = 0
    fun%nInputs = 0
    if (allocated(fun%input_varpos)) deallocate(fun%input_varpos)
    if (allocated(fun%input_varIndex)) deallocate(fun%input_varIndex)
    nullify(fun%get_point)
    nullify(fun%get_element)
    nullify(fun%set_params)
    nullify(fun%get_params)
    nullify(fun%setup_indices)
    nullify(fun%get_valOfIndex)

  end subroutine tem_free_varOp