matrix_inversion_method_type Derived Type

type, public :: matrix_inversion_method_type

A simple wrapper type around an integer to represent different inversion methods. We could consider deriving from this and binding the specific inversion methods to the type, but that is perhaps more complication than required.


Contents


Components

Type Visibility Attributes Name Initial
integer, private :: flag = 0
character(len=16), private :: name = "UNSET NAME"

Type-Bound Procedures

procedure, public :: get_flag => matrix_inversion_method_get_flag

  • private elemental function matrix_inversion_method_get_flag(self) result(flag)

    Helper routine to get access to the matrix_inversion_method's flag in a read-only way. Primarily used for testing.

    Arguments

    Type IntentOptional Attributes Name
    class(matrix_inversion_method_type), intent(in) :: self

    Return Value integer

procedure, public :: get_name => matrix_inversion_method_get_name

  • private elemental function matrix_inversion_method_get_name(self) result(name)

    Helper routine to get access to the matrix_inversion_method's name in a read-only way. Primarily used for testing.

    Arguments

    Type IntentOptional Attributes Name
    class(matrix_inversion_method_type), intent(in) :: self

    Return Value character(len=16)

Source Code

  type matrix_inversion_method_type
     private
     integer :: flag = 0
     character(len=16) :: name = "UNSET NAME"
   contains
     procedure, public :: get_flag => matrix_inversion_method_get_flag
     procedure, public :: get_name => matrix_inversion_method_get_name
  end type matrix_inversion_method_type