# ply_poly_project_module Module

The polynomial projection describes the change from modal to nodal representation and vice-versa.

The method to be used for this transformation is configured in a table that contains the kind of transformation and then further options to the transformation. There are three kinds of transformation available:

• 'fpt' Fast polynomial transformation, only available if linked against FFTW.
• 'l2p' Standard projection, evaluate each polynomial for each point.
• 'fxt' Fast transformation based on multipole method, enabled by the (included) FXTPACK library.

By default the nodal representation uses as many nodes as there are modes in the modal representation. This can be changed with the factor setting. There will factor times number of modes nodes used in the transformation. This oversampling allows for dealiasing of the nodal representation. A different set of points will be used depending on the kind of transformation to be used:

• FPT uses Chebyshev integration nodes
• L2P may make use of either Chebyshev or Gauss-Legendre nodes
• FXT Gauss-Legendre integration nodes

If the Chebyshev nodes are used for the nodal representation, the interval boundaries can be included by setting lobattoPoints=true. In this case there will also be at least one point more be used in the nodal representation than there are modes in the Legendre series.

If FPT is configured but the executable is not linked against the FFTW, there will be a warning, and the simulation uses the L2P method instead. The L2P method is also the default when no kind is provided at all.

For further options of the individual projection kinds, see their respective descriptions:

A minimalistic configuration for the projection method looks as follows:

  projection = {
kind = 'l2p',
factor = 1.5
}


The name of the table (here projection) is arbitrary and defined by the application. An application may load multiple projection definitions with differing names.

## Interfaces

• ### private subroutine Copy_poly_project(left, right)

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(out) :: left

fpt to copy to

type(ply_poly_project_type), intent(in) :: right

fpt to copy from

• ### private subroutine Copy_poly_project_body(left, right)

#### Arguments

TypeIntentOptionalAttributesName
type(ply_prj_body_type), intent(out) :: left
type(ply_prj_body_type), intent(in) :: right

• ### private subroutine ply_poly_project_m2n_multiVar(me, dim, nVars, modal_data, nodal_data)

Convert nDoF modes to nodal values.

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(inout) :: me
integer, intent(in) :: dim
integer, intent(in) :: nVars

The number of variables to project. If a variable consists of more than one component, the number of components has to be passed. If there are more than one variable, the sum of all components has to be passed (e.g. 6 when there are two three-dimensional vectors).

real(kind=rk), intent(inout) :: modal_data(:,:)
real(kind=rk), intent(inout) :: nodal_data(:,:)

• ### private subroutine ply_poly_project_n2m_multiVar(me, dim, nVars, nodal_data, modal_data)

Convert nodal values to nDoFs modes.

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(inout) :: me
integer, intent(in) :: dim
integer, intent(in) :: nVars
real(kind=rk), intent(inout) :: nodal_data(:,:)
real(kind=rk), intent(inout) :: modal_data(:,:)

## Derived Types

### type, public :: ply_prj_body_type

Additional data, required for the projection.

#### Components

TypeVisibilityAttributesNameInitial
type(ply_legFpt_type), private :: fpt

The fast polynomial transformation which will be used in case of nonlinear equations. It is used if fpt is choses as projection method in the lua file

type(ply_fxt_type), private :: fxt

The Legendre Polynomial type for the Fast Orthogonal Function Transform via fxtpack. It is used if 'fxt' is chosen as projection method in the lua file

type(ply_l2p_type), private :: l2p

Projection method which cam be used for transfoamtion from modal to nodal space and vice versa. It is used if 'l2p' is chosen as projection method in the lua file

real(kind=rk), private, allocatable:: nodes(:,:)

Volume quadrature points in the reference element

type(ply_faceNodes_type), private, allocatable:: faces(:,:)

Facial quadrature nodes (reference element) for all three spatial direction and left and right face. These points are necessary to transfer boundary conditions given in physical space to modal space by projection (l2p or fpt)

integer, private :: nQuadPoints

quadrature points including oversampling factor

integer, private :: ndofs

degree of freedom of the scheme depending on maxPolyDegree

integer, private :: oversamp_dofs
integer, private :: min_dofs

### type, public :: ply_poly_project_type

Projection definition.

#### Components

TypeVisibilityAttributesNameInitial
integer, private :: basisType

Polynomial basis type.

Read more…
character(len=labelLen), private :: kind

Kind of projection. Currently available: - 'l2p', L2-Projection - 'fpt', Fast Polynomial Transformation. Requires the FFTW. - 'fxt', Fast Polynomial Transformation. uses FXTPACK

integer, private :: maxPolyDegree

The maximal polynomial degree per spatial direction.

integer, private :: oversamp_degree

Using oversampling, the modal space need to be extended according

integer, private :: min_degree
integer, private :: nQuadPointsPerDir

quadrature points including oversampling factor

logical, private :: lobattoPoints =.false.

Logical to indicate whether Chebyshev-Lobatto points or simple Chebyshev points are used

type(ply_prj_body_type), private :: body_1d

projection header consits of general information like which kind of projection is used In the body datatype, there is for each dimension the main data for the projection method stored

type(ply_prj_body_type), private :: body_2d
type(ply_prj_body_type), private :: body_3d

## Subroutines

### public subroutine ply_fill_project_list(proj_list, dyn_projectArray, scheme_dim)

Fill ups the bodys accroding to the DA.

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(out), allocatable:: proj_list(:)
type(dyn_projectionarray_type), intent(in) :: dyn_projectArray
integer, intent(in) :: scheme_dim

### public subroutine ply_poly_project_fillbody(me, proj_init, scheme_dim)

Fill the body of the projection with all required data, ply_poly_project_define has to be used beforehand to set necessary header information.

Read more…

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(inout) :: me
type(ply_prj_init_type), intent(in) :: proj_init
integer, intent(in) :: scheme_dim

### public subroutine ply_get_quadpoints_faces(poly_proj, idir, ialign, points)

function to provide the coordinates from the quadrature points on the faces

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(in) :: poly_proj
integer, intent(in) :: idir
integer, intent(in) :: ialign
real(kind=rk), intent(inout), allocatable:: points(:,:)

### public subroutine ply_get_quadpoints_faces_2d(poly_proj, idir, ialign, points)

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(in) :: poly_proj
integer, intent(in) :: idir
integer, intent(in) :: ialign
real(kind=rk), intent(out), allocatable:: points(:,:)

### public subroutine ply_get_quadpoints_faces_1d(poly_proj, idir, ialign, points)

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(in) :: poly_proj
integer, intent(in) :: idir
integer, intent(in) :: ialign
real(kind=rk), intent(out), allocatable:: points(:,:)

### private subroutine Copy_poly_project(left, right)

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(out) :: left

fpt to copy to

type(ply_poly_project_type), intent(in) :: right

fpt to copy from

### private subroutine Copy_poly_project_body(left, right)

#### Arguments

TypeIntentOptionalAttributesName
type(ply_prj_body_type), intent(out) :: left
type(ply_prj_body_type), intent(in) :: right

### private subroutine ply_poly_project_m2n_multiVar(me, dim, nVars, modal_data, nodal_data)

Convert nDoF modes to nodal values.

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(inout) :: me
integer, intent(in) :: dim
integer, intent(in) :: nVars

The number of variables to project. If a variable consists of more than one component, the number of components has to be passed. If there are more than one variable, the sum of all components has to be passed (e.g. 6 when there are two three-dimensional vectors).

real(kind=rk), intent(inout) :: modal_data(:,:)
real(kind=rk), intent(inout) :: nodal_data(:,:)

### private subroutine ply_poly_project_n2m_multiVar(me, dim, nVars, nodal_data, modal_data)

Convert nodal values to nDoFs modes.

#### Arguments

TypeIntentOptionalAttributesName
type(ply_poly_project_type), intent(inout) :: me
integer, intent(in) :: dim
integer, intent(in) :: nVars
real(kind=rk), intent(inout) :: nodal_data(:,:)
real(kind=rk), intent(inout) :: modal_data(:,:)