vector Derived Type

type, public :: vector


Inherited by

type~~vector~~InheritedByGraph type~vector vector type~vertex vertex type~vertex->type~vector position type~plane plane type~plane->type~vector normal type~vector_field vector_field type~vector_field->type~vector x, xp, bx type~field field type~vector_field->type~field type~mesh mesh type~mesh->type~vector face_cntr, af, df, cell_cntr type~mesh->type~vertex verts type~surface surface type~mesh->type~surface surf type~motion motion type~motion->type~vector law_y type~cylinder cylinder type~cylinder->type~vector center, axis type~field->type~mesh msh type~bc_poly bc_poly type~field->type~bc_poly bc type~bc_poly->type~motion mot type~pde pde type~pde->type~mesh msh type~surface->type~plane my_plane type~surface->type~cylinder my_cylinder type~scalar_field scalar_field type~scalar_field->type~field type~scalar_pde scalar_pde type~scalar_pde->type~pde type~vector_pde vector_pde type~vector_pde->type~pde

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
real(kind=psb_dpk_), private :: x
real(kind=psb_dpk_), private :: y
real(kind=psb_dpk_), private :: z

Type-Bound Procedures

generic, public :: mag => vec_mag

  • private interface vec_mag()

    Arguments

    None

generic, public :: nemo_sizeof => nemo_vector_sizeof

generic, public :: set_x_ => set_vector_x

generic, public :: set_y_ => set_vector_y

generic, public :: set_z_ => set_vector_z

generic, public :: unit => vec_unit

  • private interface vec_unit()

    Arguments

    None

generic, public :: x_ => get_vector_x

generic, public :: y_ => get_vector_y

generic, public :: z_ => get_vector_z

procedure, private :: get_vector_x

  • interface

    private elemental module function get_vector_x(vert)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(in) :: vert

    Return Value real(kind=psb_dpk_)

procedure, private :: get_vector_y

  • interface

    private elemental module function get_vector_y(vert)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(in) :: vert

    Return Value real(kind=psb_dpk_)

procedure, private :: get_vector_z

  • interface

    private elemental module function get_vector_z(vert)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(in) :: vert

    Return Value real(kind=psb_dpk_)

procedure, private :: nemo_vector_sizeof

  • interface

    private elemental module function nemo_vector_sizeof(vec)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(in) :: vec

    Return Value integer(kind=nemo_int_long_)

procedure, private :: set_vector_x

  • interface

    private module subroutine set_vector_x(vect, r)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(inout) :: vect
    real(kind=psb_dpk_) :: r

procedure, private :: set_vector_y

  • interface

    private module subroutine set_vector_y(vect, r)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(inout) :: vect
    real(kind=psb_dpk_) :: r

procedure, private :: set_vector_z

  • interface

    private module subroutine set_vector_z(vect, r)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(inout) :: vect
    real(kind=psb_dpk_) :: r

procedure, private :: vec_mag

  • interface

    private elemental module function vec_mag(v)

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(in) :: v

    Return Value real(kind=psb_dpk_)

procedure, private :: vec_unit

  • interface

    private elemental module function vec_unit(v)

    Returns a unit vector in the direction of V

    Arguments

    Type IntentOptional AttributesName
    class(vector), intent(in) :: v

    Return Value type(vector)

Source Code

    TYPE vector
        PRIVATE
        REAL(psb_dpk_) :: x
        REAL(psb_dpk_) :: y
        REAL(psb_dpk_) :: z
    CONTAINS
        PROCEDURE, PRIVATE :: get_vector_x, get_vector_y, get_vector_z  ! Getters
        GENERIC, PUBLIC :: x_ => get_vector_x
        GENERIC, PUBLIC :: y_ => get_vector_y
        GENERIC, PUBLIC :: z_ => get_vector_z
        PROCEDURE, PRIVATE :: set_vector_x, set_vector_y, set_vector_z  ! Setters
        GENERIC, PUBLIC :: set_x_ => set_vector_x
        GENERIC, PUBLIC :: set_y_ => set_vector_y
        GENERIC, PUBLIC :: set_z_ => set_vector_z
        PROCEDURE, PRIVATE :: vec_mag, vec_unit
        GENERIC, PUBLIC :: mag => vec_mag
        GENERIC, PUBLIC :: unit => vec_unit
        PROCEDURE, PRIVATE :: nemo_vector_sizeof
        GENERIC, PUBLIC :: nemo_sizeof => nemo_vector_sizeof
    END TYPE vector