This module provides the means to sample polynomial data to break it down into voxels for visualization.
Not to be confused with the oversample module!
This is the data type providing the definitions for the sampling.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | max_nlevels | = | 0 | Maximal number of levels by which any mesh element should be refined. |
|
character(len=labelLen), | private | :: | method | Method to use for the sampling. |
|||
type(ply_sampling_adaptive_type), | private | :: | adaptive | ||||
real(kind=rk), | private | :: | eps_osci | Maximum allowed oscillation of the solution. For adaptive subsampling only. |
|||
real(kind=rk), | private | :: | dofReducFactor | Factor to Reduce dofs for every sampling level. Can be used to avoid too drastic increase of memory consumption. For adaptive subsampling only. |
|||
logical, | private | :: | adaptiveDofReduction | Indicator for the limitation of memory consumption. |
|||
integer, | private | :: | AbsUpperBoundLevel | Absolute upper bound level to refine to. |
Private data type to describe variables with varying polynomial representation from element to element for each variable.
Required to make use of c_loc and accessing an array.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=rk), | private, | allocatable | :: | dat(:) |
This subroutine reads the sampling configuration from the Lua script provided in conf and fills the sampling data in 'me' accordingly.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ply_sampling_type), | intent(out) | :: | me | Sampling definition to load. |
||
type(flu_State), | intent(in) | :: | conf | Configuration to read the sampling settings from. |
||
integer, | intent(in), | optional | :: | parent | Parent table in which to look for the sampling settings. |
Sampling polynomial data from a given array and mesh to a new mesh with a new data array, where just a single degree of freedom per element is used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ply_sampling_type), | intent(in) | :: | me | A ply_sampling_type to describe the sampling method. |
||
type(treelmesh_type), | intent(in) | :: | orig_mesh | The original mesh to be refined. |
||
type(tem_BC_prop_type), | intent(in) | :: | orig_bcs | Boundary conditions for the original mesh. |
||
type(tem_varSys_type), | intent(in) | :: | varsys | |||
integer, | intent(in) | :: | var_degree(:) | Maximal polynomial degree for each variable. Needs to be matching the variable definition in the variable system. TodoNeeds to be changed to be an information per element per variable! Possibly by defining a variable in the varsys, providing the degree. |
||
integer, | intent(in) | :: | lvl_degree(:) | Maximal polynomial degree for each level. |
||
integer, | intent(in) | :: | var_space(:) | Polynomial space for each variable. Needs to be matching the variable definition in the variable system. |
||
integer, | intent(in) | :: | ndims | Number of dimensions in the polynomial representation. |
||
type(tem_tracking_instance_type), | intent(in) | :: | trackInst | |||
type(tem_tracking_config_type), | intent(in) | :: | trackConfig | |||
type(tem_time_type), | intent(in) | :: | time | |||
type(treelmesh_type), | intent(out) | :: | new_mesh | The new mesh with the refined elements. |
||
type(tem_varSys_type), | intent(out) | :: | resvars | Resulting system of variables describing the data in the arrays of subsampled elements. |
Free previously allocated methodData of variable.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tem_varSys_op_type), | intent(inout) | :: | fun | Description of the method to free the data for. |
Get sampled data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(tem_varSys_op_type), | intent(in) | :: | fun | Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables. |
||
type(tem_varSys_type), | intent(in) | :: | varSys | The variable system to obtain the variable from. |
||
integer, | intent(in) | :: | elempos(:) | TreeID of the element to get the variable for. |
||
type(tem_time_type), | intent(in) | :: | time | Point in time at which to evaluate the variable. |
||
type(treelmesh_type), | intent(in) | :: | tree | global treelm mesh info |
||
integer, | intent(in) | :: | n | Number of elements to obtain for this variable (vectorized access). |
||
integer, | intent(in) | :: | nDofs | Number of degrees of freedom within an element. |
||
real(kind=rk), | intent(out) | :: | res(:) | Resulting values for the requested variable. Linearized array dimension: (nComponents of resulting variable) x (nDegrees of freedom) x (nElems) Access: (iElem-1)fun%nComponentsnDofs + (iDof-1)*fun%nComponents + iComp |