check_variableOperations_byIndex Subroutine

subroutine check_variableOperations_byIndex(res, general, varSys, indices)

Arguments

Type IntentOptional AttributesName
logical, intent(inout) :: res
type(tem_general_type), intent(in) :: general
type(tem_varSys_type), intent(in) :: varSys
integer, intent(in) :: indices(:,:)

Calls

proc~~check_variableoperations_byindex~~CallsGraph proc~check_variableoperations_byindex check_variableOperations_byIndex interface~positionofval~5 positionofval proc~check_variableoperations_byindex->interface~positionofval~5 proc~realtological realToLogical proc~check_variableoperations_byindex->proc~realtological proc~checkresult checkResult proc~check_variableoperations_byindex->proc~checkresult proc~posofval_label posofval_label interface~positionofval~5->proc~posofval_label interface~sortedposofval~5 sortedposofval proc~posofval_label->interface~sortedposofval~5 proc~sortposofval_label sortposofval_label interface~sortedposofval~5->proc~sortposofval_label

Called by

proc~~check_variableoperations_byindex~~CalledByGraph proc~check_variableoperations_byindex check_variableOperations_byIndex proc~check_variableoperations check_variableOperations proc~check_variableoperations->proc~check_variableoperations_byindex program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->proc~check_variableoperations

Contents


Source Code

  subroutine check_variableOperations_byIndex(res, general, varSys, indices)
    logical, intent(inout) :: res

    type(tem_general_type), intent(in) :: general
    type(tem_varSys_type), intent(in) :: varSys
    integer, intent(in) :: indices(:,:)

    real(kind=rk) :: resVar(1)
    integer :: varPos

    varPos = positionOfVal(varSys%varname, 'true_and_true')
    call varSys%method%val(varPos)%get_valOfIndex( &
      & varSys = varSys,                           &
      & time   = general%simControl%now,           &
      & iLevel = 1,                                &
      & idx    = indices(varPos,:),                &
      & nVals  = 1,                                &
      & res    = resVar                            )
    write(*,*) resVar
    res = res .and. realToLogical(resVar(1))
    call checkResult( res, 'Logical operator: true_and_true' )

    varPos = positionOfVal(varSys%varname, 'true_and_false')
    call varSys%method%val(varPos)%get_valOfIndex( &
      & varSys = varSys,                           &
      & time   = general%simControl%now,           &
      & iLevel = 1,                                &
      & idx    = indices(varPos,:),                &
      & nVals  = 1,                                &
      & res    = resVar                            )
    write(*,*) resVar
    res = res .and..not. realToLogical(resVar(1))
    call checkResult( res, 'Logical operator: true_and_false' )

    varPos = positionOfVal(varSys%varname, 'true_or_true')
    call varSys%method%val(varPos)%get_valOfIndex( &
      & varSys = varSys,                           &
      & time   = general%simControl%now,           &
      & iLevel = 1,                                &
      & idx    = indices(varPos,:),                &
      & nVals  = 1,                                &
      & res    = resVar                            )
    write(*,*) resVar
    res = res .and. realToLogical(resVar(1))
    call checkResult( res, 'Logical operator: true_or_true' )

    varPos = positionOfVal(varSys%varname, 'true_or_false')
    call varSys%method%val(varPos)%get_valOfIndex( &
      & varSys = varSys,                           &
      & time   = general%simControl%now,           &
      & iLevel = 1,                                &
      & idx    = indices(varPos,:),                &
      & nVals  = 1,                                &
      & res    = resVar                            )
    write(*,*) resVar
    res = res .and. realToLogical(resVar(1))
    call checkResult( res, 'Logical operator: true_or_false' )

    varPos = positionOfVal(varSys%varname, 'false_or_false')
    call varSys%method%val(varPos)%get_valOfIndex( &
      & varSys = varSys,                           &
      & time   = general%simControl%now,           &
      & iLevel = 1,                                &
      & idx    = indices(varPos,:),                &
      & nVals  = 1,                                &
      & res    = resVar                            )
    write(*,*) resVar
    res = res .and..not. realToLogical(resVar(1))
    call checkResult( res, 'Logical operator: false_or_false' )

  end subroutine check_variableOperations_byIndex