This module provides methods to filter polynomial representation in elements based on their shape.
The main goal of this filtering is to smooth out Gibbs oscillations while maintaining the strong gradients at discontinuities.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private, | parameter | :: | filter_strat_none | = | 0 | |
integer, | private, | parameter | :: | filter_strat_oddfract | = | 1 |
Filter the polynomial data in a given element.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ply_filter_element_type), | intent(in) | :: | me | Parameters of the filter. |
||
integer, | intent(in) | :: | element_degree | Polynomial degree in the parent element. |
||
real(kind=rk), | intent(inout) | :: | element_data(:,:) | Polynomial data in element. The first index describes the degrees of freedom. The second index refers to the elements to filter. |
Paramaters describing the filtering to apply to elemental polynomial data.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | strategy | = | filter_strat_none | Filter strategy to use. |
|
integer, | private | :: | max_order | Maximal order for exponential spectral filtering to use where little filtering is to be done. |
|||
integer, | private | :: | min_order | Minimal order for exponential spectral filtering to use. |
|||
integer, | private | :: | fract_exponent | Exponent to use for the fraction. |
|||
procedure(ply_filter_element), | private, | pointer | :: | filter1D | => | NULL() | Function pointer for 1D filtering |
procedure(ply_filter_element), | private, | pointer | :: | filter2D | => | NULL() | Function pointer for 2D filtering |
procedure(ply_filter_element), | private, | pointer | :: | filter3D | => | NULL() | Function pointer for 3D filtering |
Loading parameters for the filtering from the configuration script. This needs to be performed before any call of the actual transformation ply_split_element_1D.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ply_filter_element_type), | intent(out) | :: | me | Data structure that holds the filter parameters. |
||
type(flu_state) | :: | conf | Lua script to get the filter parameters from. |
|||
integer, | intent(in), | optional | :: | parent | Table handle to a possible parent, that contains the filter table to load. |
Filter a polynomial representation in elements in one dimension according to its odd mode fraction.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ply_filter_element_type), | intent(in) | :: | me | Filter parameters. |
||
integer, | intent(in) | :: | nDims | Number of dimensions of the polynomial data. |
||
integer, | intent(in) | :: | inLen(nDims) | Number degrees of freedom for each direction in element_data. The first index of element_data needs to have a length equal to the product of all inLen components. The splitting operation will be done in the last dimension. |
||
real(kind=rk), | intent(in) | :: | element_data(:,:) | Polynomial representation in the elements. The first index are the degrees of freedom in elements, the second index are the elements. In the first index the shape of data has to be in the form (inLen(1), inLen(2), ... , inLen(nDims)). The filtering operation is performed on the last dimension in that data. |
||
real(kind=rk), | intent(out) | :: | filtered_data(:,:) | The filtered polynomial modes. The ordering is rotated, such, that the filtered dimension becomes the first one, and all others are shifted by one to the right. Thus, the new data has the layout (inLen(nDims), inLen(1), inLen(2), ...) |
Filter one-dimensional elements of degree element_degree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ply_filter_element_type), | intent(in) | :: | me | Filter parameters. |
||
integer, | intent(in) | :: | element_degree | Polynomial degree in the parent element. |
||
real(kind=rk), | intent(inout) | :: | element_data(:,:) | Polynomial data in the parent element. The first index describes the degrees of freedom. The second index refers to the elements to split. |
Filter two-dimensional elements of degree element_degree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ply_filter_element_type), | intent(in) | :: | me | Filter parameters. |
||
integer, | intent(in) | :: | element_degree | Polynomial degree in the parent element. |
||
real(kind=rk), | intent(inout) | :: | element_data(:,:) | Polynomial data in the parent element. The first index describes the degrees of freedom. The second index refers to the elements to split. |
Filter three-dimensional elements of degree element_degree.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ply_filter_element_type), | intent(in) | :: | me | Filter parameters. |
||
integer, | intent(in) | :: | element_degree | Polynomial degree in the parent element. |
||
real(kind=rk), | intent(inout) | :: | element_data(:,:) | Polynomial data in the parent element. The first index describes the degrees of freedom. The second index refers to the elements to split. |