ply_lagrange_module Module

Lagrange polynomial representation.

Lagrange polynomial series by the values at given nodes. The nodes to be used are to be given in form of ply_nodeset_coords.


Uses

  • module~~ply_lagrange_module~~UsesGraph module~ply_lagrange_module ply_lagrange_module env_module env_module module~ply_lagrange_module->env_module module~ply_nodeset_module ply_nodeset_module module~ply_lagrange_module->module~ply_nodeset_module module~ply_nodeset_module->env_module tem_param_module tem_param_module module~ply_nodeset_module->tem_param_module

Used by

  • module~~ply_lagrange_module~~UsedByGraph module~ply_lagrange_module ply_lagrange_module module~ply_l2p_module ply_l2p_module module~ply_l2p_module->module~ply_lagrange_module program~ply_lagrange_test ply_lagrange_test program~ply_lagrange_test->module~ply_lagrange_module module~ply_poly_project_module ply_poly_project_module module~ply_poly_project_module->module~ply_l2p_module program~ply_l2p_test ply_l2p_test program~ply_l2p_test->module~ply_l2p_module

Derived Types

type, public ::  ply_lagrange_type

Components

Type Visibility Attributes Name Initial
integer, public :: nPoints

Number of points to represent the Lagrange polynomials

real(kind=rk), public, allocatable :: coords(:)

Coordinates of the points where the nodes are to be found.

real(kind=rk), public, allocatable :: values(:)

Values of the function at all coords.


Functions

public function ply_lagrange_define(nPoints, nodeset, values) result(me)

Define a new polynomial in the Lagrange basis.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nPoints

Number of points to define the polynomial.

procedure(ply_nodeset_coords) :: nodeset

The set of nodes where the function assumes the given values.

real(kind=rk), intent(in) :: values(nPoints)

Function values at all nPoints of the nodeset.

Return Value type(ply_lagrange_type)

The newly created Lagrange series describing the polynomial function.

public function ply_lagrange_eval(me, x) result(f)

Evaluate a polynomial in the Lagrange basis at some point x.

Arguments

Type IntentOptional Attributes Name
type(ply_lagrange_type), intent(in) :: me

The polynomial in Lagrange basis to evaluate at point x.

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

Coordinate at which the function is to be evaluated.

Return Value real(kind=rk)

Value of the polynomial at coordinate x.

public function ply_lagrange_mode_at(me, mode, x) result(f)

Evaluate the given Lagrangian mode (which is 1 at coord(mode) and 0 in all other points) at a given point x.

Arguments

Type IntentOptional Attributes Name
type(ply_lagrange_type), intent(in) :: me

The polynomial in Lagrange basis.

integer, intent(in) :: mode

Mode to evaluate at x.

Read more…
real(kind=rk), intent(in) :: x

Coordinate at which the mode is to be evaluated.

Return Value real(kind=rk)

Value of the polynomial at coordinate x.

public function ply_lagrange_1D(me, points) result(pointval)

Arguments

Type IntentOptional Attributes Name
type(ply_lagrange_type), intent(in) :: me

Definition of the Lagrange polynomial basis to evaluate at points.

real(kind=rk), intent(in) :: points(:)

List of points at which the polynomials are to be evaluated.

Return Value real(kind=rk), (me%nPoints,size(points))

Resulting Lagrange values at all points.

First dimension holds the Lagrange modes, second dimension the points.