delaunay_tri_surface Derived Type

type, public, extends(delaunay_tri_2d) :: delaunay_tri_surface

Provides a type describing a triangulated surface.


Contents


Type-Bound Procedures

procedure, public :: create => d2d_init

  • private subroutine d2d_init(this, x, y, err)

    Creates an unconstrained 2D Delaunay triangulation given a set of x-y points.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(inout) :: this

    The delaunay_tri_2d object.

    real(kind=real64), intent(in), dimension(:) :: x

    An N-element array containing the x-coordinates of each data point.

    real(kind=real64), intent(in), dimension(:) :: y

    An N-element array containing the y-coordinates of each data point.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

procedure, public :: define_function_values => dts_define_fcn

  • private subroutine dts_define_fcn(this, z, err)

    Defines the function values that correspond to the x and y data points.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_surface), intent(inout) :: this

    The delaunay_tri_surface object.

    real(kind=real64), intent(in), dimension(:) :: z

    An N-element array containing the function values for each x and y coordinate. Notice, the x and y coordinates must already be defined prior to calling this routine.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

generic, public :: evaluate => dts_interp_1, dts_interp_2

  • private pure function dts_interp_1(this, x, y) result(z)

    Evaluates the function at the requested point by means of linear interpolation.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_surface), intent(in) :: this

    The delaunay_tri_surface object.

    real(kind=real64), intent(in) :: x

    The x-coordinate at which to evaluate the function.

    real(kind=real64), intent(in) :: y

    The y-coordinate at which to evaluate the function.

    Return Value real(kind=real64)

    The function value. If the point (x, y) does not lie within the range of defined values, then a value of NaN is returned.

  • private pure function dts_interp_2(this, x, y) result(z)

    Evaluates the function at the requested point by means of linear interpolation.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_surface), intent(in) :: this

    The delaunay_tri_surface object.

    real(kind=real64), intent(in), dimension(:) :: x

    The x data coordinates.

    real(kind=real64), intent(in), dimension(:) :: y

    The x data coordinates.

    Return Value real(kind=real64), allocatable, dimension(:)

    The interpolated z coordinate points. If the point (x, y) does not lie within the range of defined values, then a value of NaN is returned.

procedure, public :: find_triangle => d2d_get_tri_with_pt

  • private pure function d2d_get_tri_with_pt(this, x, y) result(rst)

    Finds the triangle that contains the specified point.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(in) :: this

    The delaunay_tri_2d object.

    real(kind=real64), intent(in) :: x

    The x-coordinate of the point.

    real(kind=real64), intent(in) :: y

    The y-coordinate of the point.

    Return Value integer(kind=int32)

    Returns the index of the triangle containing the specified point. If no triangle contains the specified point, a value of -1 is returned.

procedure, public :: get_indices => d2d_get_tris

  • private pure function d2d_get_tris(this) result(rst)

    Gets a list of the indices of each triangle vertex.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(in) :: this

    The delaunay_tri_2d object.

    Return Value integer(kind=int32), allocatable, dimension(:,:)

    An N-by-3 matrix with each column containing the index of the vertex of each triangle where N is the number of triangles.

procedure, public :: get_point_count => d2d_get_pt_count

  • private pure function d2d_get_pt_count(this) result(rst)

    Gets the number of points in the triangulation.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(in) :: this

    The delaunay_tri_2d object.

    Return Value integer(kind=int32)

    The number of points in the triangulation.

procedure, public :: get_points_x => d2d_get_x_pts

  • private pure function d2d_get_x_pts(this) result(rst)

    Gets the x-coordinates of each point.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(in) :: this

    The delaunay_tri_2d object.

    Return Value real(kind=real64), allocatable, dimension(:)

    An array of the x-coordinates of each point.

procedure, public :: get_points_y => d2d_get_y_pts

  • private pure function d2d_get_y_pts(this) result(rst)

    Gets the y-coordinates of each point.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(in) :: this

    The delaunay_tri_2d object.

    Return Value real(kind=real64), allocatable, dimension(:)

    An array of the y-coordinates of each point.

procedure, public :: get_points_z => dts_get_z

  • private pure function dts_get_z(this) result(rst)

    Gets the z-coordinates of each point.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_surface), intent(in) :: this

    The delaunay_tri_surface object.

    Return Value real(kind=real64), allocatable, dimension(:)

    An array of the z-coordinates of each point.

procedure, public :: get_triangle_count => d2d_get_tri_count

  • private pure function d2d_get_tri_count(this) result(rst)

    Gets the number of triangles in the triangulation.

    Arguments

    Type IntentOptional Attributes Name
    class(delaunay_tri_2d), intent(in) :: this

    The delaunay_tri_2d object.

    Return Value integer(kind=int32)

    The number of triangles in the triangulation.