root_name_to_method Function

private pure function root_name_to_method(name) result(r)

Convert a root method name to the corresponding root_method enum type.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

method name

Return Value type(root_method)

the root_method enum type for that method


Calls

proc~~root_name_to_method~~CallsGraph proc~root_name_to_method root_module::root_name_to_method proc~lowercase root_module::lowercase proc~root_name_to_method->proc~lowercase

Called by

proc~~root_name_to_method~~CalledByGraph proc~root_name_to_method root_module::root_name_to_method proc~root_scalar_by_name root_module::root_scalar_by_name proc~root_scalar_by_name->proc~root_name_to_method interface~root_scalar root_module::root_scalar proc~root_scalar_by_name->interface~root_scalar interface~root_scalar->proc~root_scalar_by_name proc~root_scalar_by_type root_module::root_scalar_by_type interface~root_scalar->proc~root_scalar_by_type proc~solve root_module::root_solver%solve proc~solve->interface~root_scalar proc~root_scalar_by_type->proc~solve

Source Code

    pure function root_name_to_method(name) result(r)

    implicit none

    character(len=*),intent(in) :: name !! method name
    type(root_method) :: r !! the [[root_method]] enum type for that method

    integer :: i !! counter
    character(len=len(name)) :: name_lowercase !! lowercase version of `name`

    ! convert to lowercase:
    name_lowercase = lowercase(name)

    ! find the name in the list:
    do i = 1, size(set_of_root_methods)
        if (name_lowercase == set_of_root_methods(i)%name) then
            r = set_of_root_methods(i)
            return
        end if
    end do

    ! if the name was not found
    r = root_method_null

    end function root_name_to_method