fplot 1.7.1
A Fortran library providing a convenient interface for plotting with Gnuplot.
Loading...
Searching...
No Matches
fplot_core::delaunay_tri_2d Type Reference

Provides a container for a 2D Delaunay triangulation. More...

Inheritance diagram for fplot_core::delaunay_tri_2d:
fplot_core::delaunay_tri_surface

Public Member Functions

procedure, public create d2d_init
 Creates an unconstrained 2D Delaunay triangulation given a set of x-y points.
 
procedure, public get_point_count d2d_get_pt_count
 Gets the number of points in the triangulation.
 
procedure, public get_triangle_count d2d_get_tri_count
 Gets the number of triangles in the triangulation.
 
procedure, public get_points_x d2d_get_x_pts
 Gets the x-coordinates of each point.
 
procedure, public get_points_y d2d_get_y_pts
 Gets the y-coordinates of each point.
 
procedure, public get_indices d2d_get_tris
 Gets a list of the indices of each triangle vertex.
 
procedure, public find_triangle d2d_get_tri_with_pt
 Finds the triangle that contains the specified point.
 

Public Attributes

real(real64), dimension(:), allocatable m_y
 An array of the y-coordinates of each point.
 
integer(int32), dimension(:,:), allocatable m_indices
 A 3-column matrix containing the indices of each triangle's vertex.
 

Private Attributes

real(real64), dimension(:), allocatable m_x
 An array of the x-coordinates of each point.
 

Detailed Description

Provides a container for a 2D Delaunay triangulation.

Remarks
This type utilizes the GEOMPACK triangulation code available at https://people.sc.fsu.edu/~jburkardt/f77_src/geompack/geompack.html.

Definition at line 6765 of file fplot_core.f90.

Member Function/Subroutine Documentation

◆ create()

procedure, public fplot_core::delaunay_tri_2d::create

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

Syntax
subroutine create(class(delaunay_tri_2d) this, real(real64) x(:), real(real64) y(:), class(errors) err)
Parameters
[in,out]thisThe delaunay_tri_2d object.
[in]xAn N-element array containing the x-coordinates of each data point.
[in]yAn N-element array containing the y-coordinates of each data point.
[in,out]errAn optional errors-based object that if provided can be used to retrieve information relating to any errors encountered during execution. If not provided, a default implementation of the errors class is used internally to provide error handling. Possible errors and warning messages that may be encountered are as follows.
  • PLOT_ARRAY_SIZE_MISMATCH_ERROR: Occurs if the input arrays are not the same size.
  • PLOT_OUT_OF_MEMORY_ERROR: Occurs if there is insufficient memory available.

Definition at line 6798 of file fplot_core.f90.

◆ find_triangle()

procedure, public fplot_core::delaunay_tri_2d::find_triangle

Finds the triangle that contains the specified point.

Syntax
integer(int32) function find_triangle(class(delaunay_tri_2d) this, real(real64) x, real(real64) y)
Parameters
[in]thisThe delaunay_tri_2d object.
[in]xThe x-coordinate of the point.
[in]yThe y-coordinate of the point.
Returns
Returns the index of the triangle containing the specified point. If no triangle contains the specified point, a value of -1 is returned.

Definition at line 6864 of file fplot_core.f90.

◆ get_indices()

procedure, public fplot_core::delaunay_tri_2d::get_indices

Gets a list of the indices of each triangle vertex.

Syntax
integer(int32)(:,:) function get_indices(class(delaunay_tri_2d) this)
Parameters
[in]thisThe delaunay_tri_2d object.
Returns
An N-by-3 matrix with each column containing the index of the vertex of each triangle where N is the number of triangles.

Definition at line 6849 of file fplot_core.f90.

◆ get_point_count()

procedure, public fplot_core::delaunay_tri_2d::get_point_count

Gets the number of points in the triangulation.

Syntax
integer(int32) function get_point_count(class(delaunay_tri_2d) this)
Parameters
[in]thisThe delaunay_tri_2d object.
Returns
The number of points in the triangulation.

Definition at line 6808 of file fplot_core.f90.

◆ get_points_x()

procedure, public fplot_core::delaunay_tri_2d::get_points_x

Gets the x-coordinates of each point.

Syntax
real(real64)(:) function get_points_x(class(delaunay_tri_2d) this)
Parameters
[in]thisThe delaunay_tri_2d object.
Returns
An array of the x-coordinates of each point.

Definition at line 6828 of file fplot_core.f90.

◆ get_points_y()

procedure, public fplot_core::delaunay_tri_2d::get_points_y

Gets the y-coordinates of each point.

Syntax
real(real64)(:) function get_points_y(class(delaunay_tri_2d) this)
Parameters
[in]thisThe delaunay_tri_2d object.
Returns
An array of the y-coordinates of each point.

Definition at line 6838 of file fplot_core.f90.

◆ get_triangle_count()

procedure, public fplot_core::delaunay_tri_2d::get_triangle_count

Gets the number of triangles in the triangulation.

Syntax
integer(int32) function get_triangle_count(class(delaunay_tri_2d) this)
Parameters
[in]thisThe delaunay_tri_2d object.
Returns
The number of triangles in the triangulation.

Definition at line 6818 of file fplot_core.f90.

Member Data Documentation

◆ m_indices

integer(int32), dimension(:,:), allocatable fplot_core::delaunay_tri_2d::m_indices

A 3-column matrix containing the indices of each triangle's vertex.

Definition at line 6773 of file fplot_core.f90.

◆ m_x

real(real64), dimension(:), allocatable fplot_core::delaunay_tri_2d::m_x
private

An array of the x-coordinates of each point.

Definition at line 6768 of file fplot_core.f90.

◆ m_y

real(real64), dimension(:), allocatable fplot_core::delaunay_tri_2d::m_y

An array of the y-coordinates of each point.

Definition at line 6770 of file fplot_core.f90.


The documentation for this type was generated from the following file: