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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_varSys_op_type), | intent(inout) | :: | fun |
Variable method to free. |
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