ply_split_legendre_module Module

This module provides the functionality to split Legendre polynomials into a left and right subinterval with transformed coordinates.

The original polynomial is defined on the interval [-1,1] and the two new polynomial representations are computed in the intervals [-1,0] and [0,1] but in the changed coordinate system, with the interval [-1,1] for each. Thus, if we refer to the coordinates in the original (coarse) element as x and to the respective coordinates in the two halfed elements as xi_left and xi_right, we compute the modal representation of the original Legendre polynomial series under these transformations:

This is needed when refining elements.


Uses

  • module~~ply_split_legendre_module~~UsesGraph module~ply_split_legendre_module ply_split_legendre_module env_module env_module module~ply_split_legendre_module->env_module

Used by

  • module~~ply_split_legendre_module~~UsedByGraph module~ply_split_legendre_module ply_split_legendre_module module~ply_split_element_module ply_split_element_module module~ply_split_element_module->module~ply_split_legendre_module program~ply_split_legendre_test_prog ply_split_legendre_test_prog program~ply_split_legendre_test_prog->module~ply_split_legendre_module module~ply_sampling_adaptive_module ply_sampling_adaptive_module module~ply_sampling_adaptive_module->module~ply_split_element_module program~ply_split_element_test_prog ply_split_element_test_prog program~ply_split_element_test_prog->module~ply_split_element_module module~ply_sampling_module ply_sampling_module module~ply_sampling_module->module~ply_sampling_adaptive_module module~ply_sampled_tracking_module ply_sampled_tracking_module module~ply_sampled_tracking_module->module~ply_sampling_module

Functions

public pure function ply_split_legendre_matrix(nModes) result(split_matrix)

Compute the transformation matrix for a projection to the left and right half-interval of Legendre polynomials for the given maximal number of modes.

Read more…

Arguments

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

The maximal number of modes to compute the transformation for.

Read more…

Return Value real(kind=rk), (nModes,nModes)

private elemental function alpha(mode)

Coefficient alpha from the recursive formulation of Legendre polynomials, for the Legendre mode 'mode'.

Read more…

Arguments

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

The Legendre mode to compute for.

Return Value real(kind=rk)

private elemental function beta(mode)

Coefficient beta from the recursive formulation of Legendre polynomials, for the Legendre mode 'mode'.

Read more…

Arguments

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

The Legendre mode to compute for.

Return Value real(kind=rk)

private elemental function alpha_frac(denominator, numerator)

Quotient of two alpha values.

Read more…

Arguments

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

Legendre mode of the to use in the denominator.

integer, intent(in) :: numerator

Legendre mode of the to use in the numeratorr.

Return Value real(kind=rk)

private elemental function alpha_beta(denominator, numerator)

Prodcut of alpha(numerator) * beta(denominator) / alpha(denominator) as needed by the Clenshaw algorithm in ply_split_legendre_matrix.

Arguments

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

Legendre mode for the in the denominator and the .

integer, intent(in) :: numerator

Legendre mode for the in the numerator.

Return Value real(kind=rk)


Subroutines

public subroutine ply_split_legendre_test(success)

A small testing routine to check the functions of this module.

Arguments

Type IntentOptional Attributes Name
logical, intent(out) :: success

Indication whether the tests were completed successfully.