tem_comparator Function

public function tem_comparator(val, operation, threshold) result(comp)

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: val
character(len=2), intent(in) :: operation
real(kind=rk), intent(in) :: threshold

Return Value logical

return value


Called by

proc~~tem_comparator~~CalledByGraph proc~tem_comparator tem_comparator proc~tem_convergence_evaluate tem_convergence_evaluate proc~tem_convergence_evaluate->proc~tem_comparator proc~tem_convergence_check_element tem_convergence_check_element proc~tem_convergence_check_element->proc~tem_convergence_evaluate proc~tem_convergence_check_point tem_convergence_check_point proc~tem_convergence_check_point->proc~tem_convergence_evaluate proc~tem_convergence_check tem_convergence_check proc~tem_convergence_check->proc~tem_convergence_check_element proc~tem_convergence_check->proc~tem_convergence_check_point

Source Code

  function tem_comparator( val, operation, threshold ) result(comp)
    ! -------------------------------------------------------------------- !
    !>
    real(kind=rk), intent(in)      :: val
    !>
    character(len=2), intent(in)   :: operation
    !>
    real(kind=rk), intent(in)      :: threshold
    !> return value
    logical                        :: comp
    ! -------------------------------------------------------------------- !

    comp = .false.

    select case( trim(operation))
    case ('<')
      comp = (val < threshold)

    case ('<=')
      comp = (val <= threshold)

    case ('>')
      comp = (val > threshold)

    case ('>=')
      comp = (val >= threshold)

    case ('=')
      comp = (val .feq. threshold)

    end select

  end function tem_comparator