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 module~env_module env_module module~ply_split_legendre_module->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 module~ply_sampling_adaptive_module ply_sampling_adaptive_module module~ply_sampling_adaptive_module->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

Contents


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

TypeIntentOptionalAttributesName
integer, intent(in) :: nModes

The maximal number of modes to compute the transformation for.

The resulting matrix v will be max_modes x max_modes large and can be used for the transformation of all polynomials with up to this many modes.

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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
logical, intent(out) :: success

Indication whether the tests were completed successfully.