tem_empty_varsys Subroutine

public subroutine tem_empty_varsys(varsys)

Empty a variable system.

This frees all variables and empties the method and varname arrays. Note, this does not free the memory used for method data. Any method data that is to be freed has to be dealt with beforehand.

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(inout) :: varsys

Variable system to empty.


Source Code

  subroutine tem_empty_varsys(varsys)
    !> Variable system to empty.
    type(tem_varSys_type), intent(inout) :: varsys

    integer :: iMethod

    do iMethod=1,varsys%method%nVals
      call tem_free_varOp(varsys%method%val(iMethod))
    end do
    call empty(varsys%method)
    call empty(varsys%varname)
    varsys%nStateVars = 0
    varsys%nAuxVars = 0
    varsys%nScalars = 0
    varsys%nAuxScalars = 0
    varsys%systemName = ''

  end subroutine tem_empty_varsys