Module for projection of Q Legendre Polynomials from parent cell to child cells.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | ply_QLegendrePoly_prp | = | 1 |
Parameter to specify Legendre polynomials as the degrees of freedoms of the elements. The multidimensional polynomias are build as Q-polynomials. The projection is a L2-Projection onto the ansatz function of the finer elements. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | isActive | = | .false. |
Is subsampling active |
|
integer, | public | :: | sampling_lvl |
The current sampling lvl. |
|||
integer, | public | :: | projectionType | = | ply_QLegendrePoly_prp |
The type of projection we use to subsample the elemental data. |
|
integer, | public | :: | caplevel | = | 20 |
Maximal Level down to which subsampling should be done. |
|
integer, | public | :: | minsub | = | 0 |
Minimal subsampling depth: |
|
integer, | public | :: | maxsub | = | 0 |
Maximal subsampling depth: |
|
real(kind=rk), | public | :: | eps_osci |
Maximum allowed oscillation of the solution. For adaptive subsampling only. |
|||
real(kind=rk), | public | :: | dofReducFactor |
Factor for the reduction of the degrees of freedom in one subsampling step (per spatial direction). |
|||
logical, | public | :: | adaptiveDofReduction |
Indicator for limitation of total memory consumption |
|||
integer, | public | :: | AbsUpperBoundLevel |
Absolute upper bound level to refine to. |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public, | allocatable | :: | dat(:) |
Datatype storing the coefficients arising for the projection of solutions on a parent cell to its children during the subsampling routines.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | public, | allocatable | :: | projCoeff(:,:,:) |
Array holding all the projection coefficients for the projection of a degree of freedom on the parent element (first index) to a degree of freedom on the child element (second index) for a given child element (third index). Therefore the dimension of this array is (nDofs, nDofs, 8). |
Routine to create one-dimensional projection coefficient for a coarse element to a fine element.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nDofsOneDim |
The number of dofs in one dimension. |
||
integer, | intent(in) | :: | nChildDofsOneDim |
The number of dofs in one dimension for the children. |
Projected one-dimensional coefficients.
First index is Legendre polynomial on the parent element, second index is the Legendre polynomial on the child element, third index is left or right projection.
Function to calculate the squared L2-Norm of a given Legendre polynomial on the reference element [-1,+1].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | polyIndex |
The Legendre polynomial index to calculate the squared norm for. The first polynomial has index 1. |
The squared L2 Norm of the Legendre polynomial.
Evaluate a given set of Legendre polynomials a given set of 1D points.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | points(:) |
A given set of 1D points. |
||
integer, | intent(in) | :: | nPoints |
The number of points to evaluate the polynomials at. |
||
integer, | intent(in) | :: | maxPolyDegree |
The maximal polynomial degree to evaluate for. |
Function values for for all Legendre polynomials up to degree maxPolyDegree at all given points. Therefore the dimension of this array is (maxPolyDegree+1, nPoints)
Subsampling by L2-Projection of the Q-Tensorproduct Legendre polynomials.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ply_subsample_type), | intent(in) | :: | subsamp |
Parameters for the subsampling. |
||
real(kind=rk), | intent(in) | :: | dofReduction(:) |
Factor for reducion of degrees of freedom. |
||
type(treelmesh_type), | intent(in) | :: | tree |
The tree the data is written for. |
||
type(ply_array_type), | intent(in) | :: | meshData(:) |
The data to sub-sample. |
||
integer, | intent(in) | :: | varDofs(:) |
The number of degrees of freedom for each scalar variable. |
||
integer, | intent(in) | :: | ndims |
Number of dimensions in the polynomial representation. |
||
integer, | intent(in) | :: | varcomps(:) |
Number of components |
||
logical, | intent(in) | :: | refine_tree(:) |
Logical array that marks elements for refinement from the last sampling |
||
logical, | intent(in) | :: | new_refine_tree(:) |
Logical array that marks elements for refinment. |
||
type(ply_array_type), | intent(out), | allocatable | :: | newMeshData(:) |
The subsampled data. |
|
integer, | intent(out), | allocatable | :: | newVarDofs(:) |
The number of dofs for the subsampled dofs. |
subroutine to create gauss points and weights for one-dimensional integration on the interval [x1,x2].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | x1 |
lower limit of integration interval |
||
real(kind=rk), | intent(in) | :: | x2 |
upper limit of integration interval |
||
real(kind=rk), | intent(inout), | allocatable | :: | x(:) |
The coordinates of the gauss points on the interval [-1,1]. The array has the length nIntP. |
|
real(kind=rk), | intent(inout), | allocatable | :: | w(:) |
The quadrature weights. The array has the length nIntP. |
|
integer, | intent(in) | :: | nIntP |
The number of integration points. |
Routine to initialize the projection coefficients for a usage in the subsampling routine to project degrees of freedoms of a parent cell to the degrees of freedoms of a child cell if the degrees of freedoms are Q-Legendre polynomials.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | dofType |
The type of degrees of freedom we have in our cells. |
||
integer, | intent(in) | :: | nDofs |
The number of degrees of freedom for the parent cells. |
||
integer, | intent(in) | :: | ndims |
The number of dimensions in the polynomial representation. |
||
integer, | intent(in) | :: | nChilds |
The number of child cells. |
||
integer, | intent(in) | :: | nChildDofs |
The number of degrees of freedom for the child cells. |
||
type(ply_ProjCoeff_type), | intent(out) | :: | projection |
The subsampling coefficients that will be initialized by this routine. |
Subroutine to convert linearized dof index to ansatz function number for Q-Polynomials.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | dof |
The linearized degree of freedom index. |
||
integer, | intent(in) | :: | nDofs |
The number of dofs for all directions. |
||
integer, | intent(in) | :: | ndims |
The number of Dimensions in the polynomial representation. |
||
integer, | intent(out) | :: | xAnsFunc |
The ansatz function number in x direction. |
||
integer, | intent(out) | :: | yAnsFunc |
The ansatz function number in y direction. |
||
integer, | intent(out) | :: | zAnsFunc |
The ansatz function number in z direction. |
Routine to subsample mesh information for one refinement level.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | tree |
The tree the data is written for. |
||
real(kind=rk), | intent(in) | :: | meshData(:) |
The data to sub-sample. |
||
integer, | intent(in) | :: | nDofs |
The number of degrees of freedom for each scalar variable. |
||
integer, | intent(in) | :: | nChildDofs |
The number of degrees of freedom per scalar variable on the child elements. |
||
integer, | intent(in) | :: | nComponents |
Number of components |
||
type(ply_ProjCoeff_type), | intent(in) | :: | projection |
Projection coefficients for the given data. |
||
type(ply_ProjCoeff_type), | intent(in), | optional | :: | projection_oneDof |
Projection coeffiecients for the the reduction to polynomial degree of 0. |
|
logical, | intent(in), | optional | :: | refine_tree(:) |
Logical array that marks all elements for refinement from the last sampling lvl. |
|
logical, | intent(in) | :: | new_refine_tree(:) |
Logical array that marks all elements for refinement |
||
integer, | intent(in) | :: | ndims |
The number of dimensions in the polynomial representation. |
||
type(ply_subsample_type), | intent(in) | :: | subsamp |
Parameters for the subsampling. |
||
real(kind=rk), | intent(out), | allocatable | :: | newMeshData(:) |
The subsampled data. |
Subroutine to project elemental data from a parent cell to one of its children.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | parentData(:) |
Linearized data for a single variable (can have multiple components) and a single degree of freedom of the parent cell. |
||
integer, | intent(in) | :: | nParentDofs |
The number of dofs of the parent element. |
||
integer, | intent(in) | :: | nChildDofs |
The total number of dofs for the child cells. |
||
integer, | intent(in) | :: | nComponents |
The number of componentns of the given variable. |
||
integer, | intent(in) | :: | nChilds |
The number of children. |
||
type(ply_ProjCoeff_type), | intent(in) | :: | projection |
The information about the projection coefficients for the parent dofs to the child dofs. |
||
real(kind=rk), | intent(out) | :: | childData(:) |
The created childData. |