plane Derived Type

type, public :: plane


Inherits

type~~plane~~InheritsGraph type~plane plane type~vector vector type~plane->type~vector normal

Inherited by

type~~plane~~InheritedByGraph type~plane plane type~surface surface type~surface->type~plane my_plane type~mesh mesh type~mesh->type~surface surf type~pde pde type~pde->type~mesh msh type~field field type~field->type~mesh msh type~scalar_field scalar_field type~scalar_field->type~field type~vector_field vector_field type~vector_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 :: a
real(kind=psb_dpk_), private :: b
real(kind=psb_dpk_), private :: c
real(kind=psb_dpk_), private :: d
type(vector), private :: normal
real(kind=psb_dpk_), private :: r2

Type-Bound Procedures

procedure, public :: get_plane_normal

  • interface

    private module function get_plane_normal(this_plane)

    Returns the plane normal (which is trivial for a plane, since the normal is constant)

    Arguments

    Type IntentOptional AttributesName
    class(plane), intent(in) :: this_plane

    Return Value type(vector)

procedure, public :: get_plane_r2

  • interface

    private module function get_plane_r2(this_plane)

    Returns an approximation for the goodness of fit, R2 value, from 0 to 1

    Arguments

    Type IntentOptional AttributesName
    class(plane) :: this_plane

    Return Value real(kind=psb_dpk_)

procedure, public :: get_pt_plane

  • interface

    private module function get_pt_plane(this_plane, point)

    Returns the point on a plane that is closest to the given point

    Arguments

    Type IntentOptional AttributesName
    class(plane), intent(in) :: this_plane
    type(vector), intent(in) :: point

    Return Value type(vector)

generic, public :: nemo_sizeof => nemo_plane_sizeof

procedure, public :: translate_plane

  • interface

    private module subroutine translate_plane(this_plane, offset)

    moves the definition of a plane in the direction of the offset vector

    Arguments

    Type IntentOptional AttributesName
    class(plane), intent(inout) :: this_plane
    type(vector), intent(in) :: offset

procedure, private :: nemo_plane_sizeof

  • interface

    private elemental module function nemo_plane_sizeof(pl)

    Arguments

    Type IntentOptional AttributesName
    class(plane), intent(in) :: pl

    Return Value integer(kind=nemo_int_long_)

Source Code

    TYPE plane
        PRIVATE

        TYPE(vector)      :: normal       ! the surface unit normal
        REAL(psb_dpk_) :: a,b,c,d      ! linear form of a plane:
        !  a * x + b * y + c * z =d
        REAL(psb_dpk_) :: r2           ! The correlation parameter for the fit
    CONTAINS
        PROCEDURE :: get_plane_normal, get_plane_r2   ! Getters
        PROCEDURE :: get_pt_plane                     ! Getters, cont.
        PROCEDURE :: translate_plane                  ! Setters
        PROCEDURE, PRIVATE :: nemo_plane_sizeof
        GENERIC, PUBLIC :: nemo_sizeof => nemo_plane_sizeof
    END TYPE plane