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.
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. |
Define a new polynomial in the Lagrange basis.
Type | Intent | Optional | 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. |
The newly created Lagrange series describing the polynomial function.
Evaluate a polynomial in the Lagrange basis at some point x.
Type | Intent | Optional | 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. |
Value of the polynomial at coordinate x.
Evaluate the given Lagrangian mode (which is 1 at coord(mode) and 0 in all other points) at a given point x.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ply_lagrange_type), | intent(in) | :: | me |
The polynomial in Lagrange basis. |
||
integer, | intent(in) | :: | mode |
Mode to evaluate at x. |
||
real(kind=rk), | intent(in) | :: | x |
Coordinate at which the mode is to be evaluated. |
Value of the polynomial at coordinate x.
Type | Intent | Optional | 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. |
Resulting Lagrange values at all points.
First dimension holds the Lagrange modes, second dimension the points.