norms_get_value Function

private function norms_get_value(self, val_name)

Uses

Get the value of the normalisation associated with val_name. Unknown values of val_name result in a call to mp_abort.

Type Bound

norms_type

Arguments

Type IntentOptional Attributes Name
class(norms_type), intent(in) :: self
character(len=*), intent(in) :: val_name

Return Value real


Contents

Source Code


Source Code

  function norms_get_value(self, val_name)
    use mp, only: mp_abort
    implicit none
    class(norms_type), intent(in) :: self
    character(len=*), intent(in) :: val_name
    real :: norms_get_value

    !Should probably convert to lower case here, but until we
    !add some string utils to do this sort of stuff we'll rely
    !on developer doing the right thing.
    select case (trim(val_name))
    case("mref")
       norms_get_value=self%mref
    case("zref")
       norms_get_value=self%zref
    case("nref")
       norms_get_value=self%nref
    case("tref")
       norms_get_value=self%tref
    case("aref")
       norms_get_value=self%aref
    case("vref")
       norms_get_value=self%vref
    case("bref")
       norms_get_value=self%bref
    case("rhoref")
       norms_get_value=self%rhoref
    case default
      call mp_abort("Invalid normalisation requested")
    end select
  end function norms_get_value