ply_modg_basis_module Module

Routines and datatypes related to the modal basis functions of the modal discontinuous Galerkin scheme. \author{Jens Zudrop}


Uses

  • module~~ply_modg_basis_module~~UsesGraph module~ply_modg_basis_module ply_modg_basis_module module~ply_space_integration_module ply_space_integration_module module~ply_modg_basis_module->module~ply_space_integration_module module~env_module env_module module~ply_modg_basis_module->module~env_module module~ply_dof_module ply_dof_module module~ply_modg_basis_module->module~ply_dof_module module~ply_space_integration_module->module~env_module module~tem_param_module tem_param_module module~ply_space_integration_module->module~tem_param_module module~ply_dof_module->module~env_module

Used by

  • module~~ply_modg_basis_module~~UsedByGraph module~ply_modg_basis_module ply_modg_basis_module module~atl_project_physflux_module atl_project_physflux_module module~atl_project_physflux_module->module~ply_modg_basis_module module~atl_operator_module atl_operator_module module~atl_operator_module->module~ply_modg_basis_module module~ply_sampling_module ply_sampling_module module~ply_sampling_module->module~ply_modg_basis_module module~atl_modg_multilevel_module atl_modg_multilevel_module module~atl_modg_multilevel_module->module~ply_modg_basis_module module~atl_scheme_module atl_scheme_module module~atl_scheme_module->module~ply_modg_basis_module module~ply_split_element_module ply_split_element_module module~ply_split_element_module->module~ply_modg_basis_module module~atl_modg_nerplanck_kernel_module atl_modg_nerplanck_kernel_module module~atl_modg_nerplanck_kernel_module->module~ply_modg_basis_module module~atl_voltoface_module atl_volToFace_module module~atl_voltoface_module->module~ply_modg_basis_module module~atl_modg_2d_kernel_module atl_modg_2d_kernel_module module~atl_modg_2d_kernel_module->module~ply_modg_basis_module module~atl_modg_kernel_module atl_modg_kernel_module module~atl_modg_kernel_module->module~ply_modg_basis_module module~atl_space_basis atl_space_basis module~atl_space_basis->module~ply_modg_basis_module module~atl_modg_1d_multilevel_module atl_modg_1d_multilevel_module module~atl_modg_1d_multilevel_module->module~ply_modg_basis_module module~atl_modg_1d_kernel_module atl_modg_1d_kernel_module module~atl_modg_1d_kernel_module->module~ply_modg_basis_module module~ply_l2p_module ply_l2p_module module~ply_l2p_module->module~ply_modg_basis_module module~atl_varsys_module atl_varSys_module module~atl_varsys_module->module~ply_modg_basis_module module~atl_covolume_boundary_module atl_covolume_boundary_module module~atl_covolume_boundary_module->module~ply_modg_basis_module module~atl_modg_2d_multilevel_module atl_modg_2d_multilevel_module module~atl_modg_2d_multilevel_module->module~ply_modg_basis_module

Contents


Derived Types

type, public :: ply_modg_refine_type

\brief Coefficients for the projections of the elemental basis functions from coarser to finer elements and vice versa.

Read more…

Components

TypeVisibilityAttributesNameInitial
real(kind=rk), private, allocatable:: anz_anzShift(:,:,:)

type, public :: ply_modg_covolume_type

Projection coefficients for covolume filtering.

Read more…

Components

TypeVisibilityAttributesNameInitial
real(kind=rk), private, allocatable:: anz_anzShift(:,:,:)

type, public :: ply_modg_basis_type

Datatype to represent the polynomial basis functions of the modg scheme.

Components

TypeVisibilityAttributesNameInitial
type(ply_modg_refine_type), private :: refineBaseCoeff

Projections of ansatz functions of a finer element to a coarser element and vice versa. These coefficients are required for non-conforming element refinement in the MODG scheme.

type(ply_modg_covolume_type), private :: covolumeBaseCoeff

Projections of ansatz functions to covolume grid and vice versa. These coefficients are required for covolume stabilizations.


Functions

public pure function ply_integrateLeg(integrand, maxdegree) result(integral)

Integrate the integrand function in Legendre basis, and represent the integral again in the Legendre basis up to the maximal degree.

Read more…

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: integrand(:)

Coefficients of the function to integrate in Legendre basis.

integer, intent(in) :: maxdegree

Maximal polynomial degree for the integral, should be larger than the degree of the integrand

Return Value real(kind=rk)(maxdegree+1)

Legendre coefficients of the resulting integral.

public pure function ply_legendre_1D(points, degree) result(one_dim_eval)

Evaluate all 1D Legendre polynomials at a given set of points up to the given degree.

Read more…

Arguments

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

1D points to evaluate.

integer, intent(in) :: degree

Degree up to which to evaluate the polynomials

Return Value real(kind=rk)(degree+1,size(points))

Resulting vector of all mode values at all points

public pure function ply_faceValRightBndDiffAns(ansFunc) result(val)

Returns the value of the non-normalized differentiated Legendre polynomial at the right boundary of the reference element, i.e. at +1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The ansatz function index, first ansatz function has index 1.

Return Value real(kind=rk)

The function value.

public pure function ply_faceValLeftBndAns(ansFunc) result(val)

Returns the value of the non-normalized Legendre polynomial at the left boundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The ansatz function index, first ansatz function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValLeftBndAns_vec(mPD) result(val)

Returns the value of the non-normalized Legendre polynomial at the left boundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first ansatz function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_faceValLeftBndDiffAns(ansFunc) result(val)

Returns the value of the non-normalized differentiated Legendre polynomial at the leftboundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The ansatz function index, first ansatz function has index 1.

Return Value real(kind=rk)

The function value.

public pure function ply_faceValRightBndTest(testFunc) result(val)

Returns the value of the dual Legendre polynomial at the right boundary of the reference element, i.e. at +1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: testFunc

The ansatz function index, first test function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValRightBndTest_vec(mPD) result(val)

Returns the value of the dual Legendre polynomial at the right boundary of the reference element, i.e. at +1. Vectorized Version.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first test function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_faceValRightBndgradTest(testFunc) result(val)

Returns the value of the gradient of dual Legendre polynomial at the right boundary of the reference element, i.e. at +1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: testFunc

The ansatz function index, first test function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValRightBndgradTest_vec(mPD) result(val)

Returns the value of the gradient of dual Legendre polynomial at the right boundary of the reference element, i.e. at +1. Vectorized version.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first test function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_faceValLeftBndTest(testFunc) result(val)

Returns the value of the dual Legendre polynomial at the left boundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: testFunc

The ansatz function index, first test function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValLeftBndTest_vec(mPD) result(val)

Returns the value of the dual Legendre polynomial at the left boundary of the reference element, i.e. at -1.Vectorized version.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first test function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_faceValLeftBndgradTest(testFunc) result(val)

Returns the value of the gradient of the dual Legendre polynomial at the left boundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: testFunc

The ansatz function index, first test function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValLeftBndgradTest_vec(mPD) result(val)

Returns the value of the gradient of the dual Legendre polynomial at the left boundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first test function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_faceValLeftBndTestGrad(testFunc) result(val)

Returns the value of the derivaitve of the dual Legendre polynomial at the left boundary of the reference element, i.e. at -1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: testFunc

The ansatz function index, first test function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValLeftBndTestGrad_vec(mPD) result(val)

Returns the value of the derivaitve of the dual Legendre polynomial at the left boundary of the reference element, i.e. at -1.Vectorized version.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first test function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_faceValRightBndTestGrad(testFunc) result(val)

Returns the value of the derivaitve of the dual Legendre polynomial at the right boundary of the reference element, i.e. at +1.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: testFunc

The ansatz function index, first test function has index 1.

Return Value real(kind=rk)

The function value.

public function ply_faceValRightBndTestGrad_vec(mPD) result(val)

Returns the value of the derivaitve of the dual Legendre polynomial at the right boundary of the reference element, i.e. at +1.vectoized version.

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: mPD

The ansatz function index, first test function has index 1.

Return Value real(kind=rk),allocatable, (:)

The function value.

public pure function ply_scalProdLeg(ansFunc) result(scalProd)

Function to calculate the L2 scalar product of a Legendre polynomial with itself on the reference element [-1,+1].

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The Legendre polynomial to calculate the scalar product for. The first Legendre polynomial has index 1.

Return Value real(kind=rk)

The scalar product on the refenece element [-1,+1].

public pure function ply_scalProdDualLeg(ansFunc, testFunc) result(scalProd)

Function to calculate the scalar product between a Legendre polynomial (ansatz function) and a dual Legendre polynomial (test function) on the reference element [-1;+1].

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The ansatz function index, there first ansatz function has index 1.

integer, intent(in) :: testFunc

The test function index, there first test function has index 1.

Return Value real(kind=rk)

The scalar product of the two functions.

public pure function ply_scalProdDualLegDiff(ansFunc, testFunc) result(scalProd)

Function to calculate the scalar product between a Legendre polynomial (ansatz function) and a differentiated dual Legendre polynomial (test function) on the reference element [-1;+1].

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The ansatz function index, there first ansatz function has index 1.

integer, intent(in) :: testFunc

The test function index, there first test function has index 1.

Return Value real(kind=rk)

The scalar product of the two functions.

public function ply_scalProdDualLeg_vec(ansFunc, testFunc, mPd) result(scalProd)

Vectorized Function to calculate the scalar product between a Legendre polynomial (ansatz function) and a dual Legendre polynomial (test function) on the reference element [-1;+1] and to calculate the scalar product between a Legendre polynomial (ansatz function) and a differentiated dual Legendre polynomial (test function) on the reference element [-1;+1].

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: ansFunc

The ansatz function index, there first ansatz function has index 1.

integer, intent(in) :: testFunc

The test function index, there first test function has index 1.

integer, intent(in) :: mPd

maxPolyDegree

Return Value real(kind=rk)(mPd+1)

The scalar product of the two functions.


Subroutines

public subroutine ply_init_modg_covolumeCoeffs(nPoints, nFunc, integral)

Integral of combination of all anzatz functions for projection onto finer element

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nPoints
integer, intent(in) :: nFunc
type(ply_modg_covolume_type), intent(out) :: integral

public subroutine ply_init_modg_multilevelCoeffs(nPoints, nFunc, integral)

Integral of combination of all anzatz functions for projection onto finer element

Arguments

TypeIntentOptionalAttributesName
integer, intent(in) :: nPoints
integer, intent(in) :: nFunc
type(ply_modg_refine_type), intent(out) :: integral

public subroutine ply_evalLegendreTensPoly(coords, nCoords, maxPolyDegree, basisType, polyVal)

Evaluate three-dimensional tensor product Legendre polynomials (not-normalized) at a given set of coordinates.

Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: coords(:,:)

Array of coordinates (on the reference element) to evaluate the tensor product polynomials at. First dimension is nCoord, second is 3 for x,y,z component.

integer, intent(in) :: nCoords

The number of coordinates to evaluate the polynomials at.

integer, intent(in) :: maxPolyDegree

The maximum polynomail degree of the MODG scheme.

integer, intent(in) :: basisType
real(kind=rk), intent(out), allocatable:: polyVal(:,:)

The polynomial values. First dimension is the number of tensor product polynomials and the second dimension is the number of points, i.e. nCoords.