Module for routines and datatypes of MOdal Discontinuous Galerkin (MODG) scheme. This scheme is a spectral scheme for linear, purley hyperbolic partial differential equation systems.
HK: Split this module into three: a common one, a Q part and a P part.
Initiate the MODG kernel for cubic elements on all levels.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_kerneldata_type), | allocatable | :: | kerneldata_list(:) | Array of kerneldata_types, one for each level. They will be initialized. |
||
type(atl_statedata_type), | allocatable | :: | statedata_list(:) | Array of statedata_types, one for each level. |
||
type(atl_statedata_type), | allocatable | :: | statedata_stab_list(:,:) | |||
type(atl_cube_elem_type), | allocatable | :: | mesh_list(:) | List of cubic meshes. One entry per level. |
||
type(atl_scheme_type), | allocatable | :: | scheme_list(:) | List of schemes on the levels. |
||
type(atl_level_boundary_type), | allocatable | :: | boundary_list(:) | The boundary description for the faces on the current level. |
||
type(atl_level_boundary_type), | allocatable | :: | boundary_stab_list(:) | The boundary description for the faces on the current level. |
||
type(atl_Equations_type) | :: | equation | The equation type. |
|||
type(treelmesh_type), | intent(in) | :: | tree | The tree of the simulation domain |
||
type(tem_time_type), | intent(in) | :: | time | current time |
||
type(tem_commPattern_type), | intent(in) | :: | commPattern | mpi communication pattern type |
||
logical, | intent(in) | :: | need_deviation | Flag to indicate whether maximal polynomial deviations should be computed for the state. |
Subroutine to execute the preprocessing for the MODG kernels. Currently this includes: Convert external source terms to modal representation.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | currentLevel | |||
integer, | intent(in) | :: | minLevel | |||
integer, | intent(in) | :: | maxLevel | |||
type(atl_Equations_type), | intent(inout) | :: | equation | |||
type(atl_statedata_type), | intent(inout) | :: | statedata | |||
type(atl_cube_elem_type), | intent(inout) | :: | mesh_list(minlevel:maxlevel) | |||
type(atl_level_boundary_type), | intent(in) | :: | boundary_list(minlevel:maxLevel) | |||
type(atl_scheme_type), | intent(inout) | :: | scheme_list(minlevel:maxlevel) | |||
type(ply_poly_project_type), | intent(inout) | :: | poly_proj_material | |||
type(atl_material_type), | intent(inout) | :: | material_list(minlevel:maxlevel) | |||
type(tem_commPattern_type) | :: | commPattern | mpi communication pattern type |
|||
type(tem_comm_env_type) | :: | proc | mpi communication environment with mpi communicator |
Subroutine to project modal representations of numerical flux and source terms onto test functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_cube_elem_type), | intent(in) | :: | mesh | Descritption of the cubical elements in the mesh |
||
type(atl_Equations_type), | intent(in) | :: | equation | The equation description. |
||
type(atl_kerneldata_type), | intent(inout) | :: | kerneldata | The data of the kernel. Holds the physical fluxes. |
||
type(atl_facedata_type), | intent(inout) | :: | facedata | The representation on the face + representation of the flux. |
||
type(atl_penalizationData_type), | intent(in) | :: | penalizationdata | Volumetric data for the penalization |
||
logical, | intent(in) | :: | usePenalization | Flag to indicate whether the penalization data has to be considered, or if it is taken care of somewhere else (imex) |
||
type(atl_modg_2d_scheme_type), | intent(in) | :: | scheme | The parameters of the MODG scheme |
||
type(ply_poly_project_type), | intent(inout) | :: | poly_proj | Projection for the current level |
||
real(kind=rk), | intent(in) | :: | dl_prod(2,scheme%maxPolyDegree+1) | Precomputed scalar products of the test and ansatz function |
||
real(kind=rk), | intent(in) | :: | dl_prodDiff(2,scheme%maxPolyDegree+1) |
Projection of the source terms (in modal representation) to the test functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_source_type), | intent(in) | :: | sourcedata | The modal representation of the source |
||
integer, | intent(in) | :: | nScalars | The number scalar variables in the equation system. |
||
type(atl_cube_elem_type), | intent(in) | :: | mesh | The cubical elements. |
||
type(atl_modg_2d_scheme_type), | intent(in) | :: | scheme | The parameters of the MODG scheme |
||
type(atl_kerneldata_type), | intent(inout) | :: | kerneldata | The data of the kernel. This one is updated by the projection. |
||
integer, | intent(in) | :: | currentLevel | The current level |
Projects modal representation of each cell to its faces, i.e. this subroutine creates a modal representation on the faces.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_cube_elem_type), | intent(in) | :: | mesh | The elements we apply the projection for. |
||
type(atl_statedata_type), | intent(in) | :: | statedata | Volumetric, modal states for each element. |
||
type(atl_facedata_type), | intent(inout) | :: | facedata | Modal representation on the face (will be updated by this routine for all fluid elements in mesh). |
||
type(atl_Equations_type), | intent(in) | :: | equation | The equation system under consideration |
||
type(atl_modg_2d_scheme_type), | intent(in) | :: | modg_2d | The parameters of your modg scheme. |
Lift the mean on the face to a positive value if necessary.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nElems_fluid | Number of fluid elements |
||
real(kind=rk), | intent(in) | :: | volState(:,:,:) | Volumetric modal states for each element |
||
type(atl_faceRep_type), | intent(inout) | :: | faceRep(:) | Modal representation on the face that might need limiting. All means below 0 of variables where positivity is to be ensured will be increased to a small value above 0. |
||
integer, | intent(in) | :: | nScalars | Number of variables |
||
logical, | intent(in) | :: | ensure_positivity(:) | Indication for each variable, whether positivity is to be ensured or not. Only variables where this is set to .true. will be modified by this routine. |
Applies the inverse of the mass matrix for a 2D scheme.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_cube_elem_type) | :: | mesh | The mesh you are working with. |
|||
type(atl_Equations_type) | :: | equation | The equation you solve. |
|||
type(atl_kerneldata_type) | :: | kerneldata | The data of the kernel. |
|||
type(atl_statedata_type) | :: | statedata | THe state if the equation |
|||
procedure(atl_elemental_timestep_vec), | intent(in), | pointer | :: | elementalTimestep | The elemental timestepping routine, because of performance, this is constant. |
|
type(atl_timestep_type) | :: | timestep | The timestepping data. |
|||
type(atl_modg_2d_scheme_type), | intent(in) | :: | scheme | Parameters of the modal dg scheme |
Projection of the penalization terms (in modal representation) to the test functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nScalars | The number scalar variables in the equation system. |
||
type(atl_cube_elem_type), | intent(in) | :: | mesh | The cubical elements. |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree of the modg scheme |
||
type(atl_kerneldata_type), | intent(inout) | :: | kerneldata | The data of the kernel. This one is updated by the projection. |
||
type(atl_penalizationData_type), | intent(in) | :: | penalizationdata | Volumetric data for the penalization |
Projection of the source terms (in modal representation) to the test functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nScalars | The number scalar variables in the equation system. |
||
type(atl_source_type), | intent(in) | :: | sourcedata | The modal representation of the source |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree of the modg scheme |
||
type(atl_cube_elem_type), | intent(in) | :: | mesh | The cubical elements. |
||
type(atl_kerneldata_type), | intent(inout) | :: | kerneldata | The data of the kernel. This one is updated by the projection. |
||
integer, | intent(in) | :: | currentLevel | The current level |
Projection of the source terms (in modal representation) to the test functions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nScalars | The number scalar variables in the equation system. |
||
type(atl_source_type), | intent(in) | :: | sourcedata | The modal representation of the source |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree of the modg scheme |
||
type(atl_cube_elem_type), | intent(in) | :: | mesh | The cubical elements. |
||
type(atl_kerneldata_type), | intent(inout) | :: | kerneldata | The data of the kernel. This one is updated by the projection. |
||
integer, | intent(in) | :: | currentLevel | The current level |
Projection of the numerical flux in x direction onto the testfunctions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | numFlux(:,:,:,:) | The numerical flux on the faces in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
real(kind=rk), | intent(inout) | :: | faceState(:,:,:,:) | The state on the faces in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
type(atl_Equations_type), | intent(in) | :: | equation | The equation system under consideration |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree in each spatial direction. |
||
real(kind=rk), | intent(in) | :: | length | The length of the cubes. |
||
integer, | intent(in) | :: | nElems_fluid | The element index |
||
real(kind=rk), | intent(inout) | :: | projection(:,:,:) | The numerical flux projected onto the test functions. |
||
type(ply_poly_project_type), | intent(inout) | :: | poly_proj | Projection for the current level |
Projection of the numerical flux in y direction onto the testfunctions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | numFlux(:,:,:,:) | The numerical flux on the faces in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
real(kind=rk), | intent(inout) | :: | faceState(:,:,:,:) | The state on the faces in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
type(atl_Equations_type), | intent(in) | :: | equation | The equation system under consideration |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree in each spatial direction. |
||
real(kind=rk), | intent(in) | :: | length | The length of the cubes. |
||
integer, | intent(in) | :: | nElems_fluid | The element index |
||
real(kind=rk), | intent(inout) | :: | projection(:,:,:) | The numerical flux projected onto the test functions. |
||
type(ply_poly_project_type), | intent(inout) | :: | poly_proj | Projection for the current level |
Projection of the numerical flux in x direction onto the testfunctions for Q_space.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | numFlux(:,:,:,:) | The numerical flux on the faces in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
integer, | intent(in) | :: | nScalars | The number of scalar variables in your equation system. |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree in each spatial direction. |
||
real(kind=rk), | intent(in) | :: | length | The length of the cubes. |
||
integer, | intent(in) | :: | nElems_fluid | The element index |
||
real(kind=rk), | intent(in) | :: | dl_prod(2,maxPolyDegree+1) | Precomputed dual Legendre products: |
||
real(kind=rk), | intent(inout) | :: | projection(:,:,:) | The numerical flux projected onto the test functions. |
Projection of the numerical flux in x direction onto the testfunctions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | numFluxLeftFace(:,:,:,:) | The numerical flux on the left face in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
real(kind=rk), | intent(inout) | :: | numFluxRightFace(:,:,:,:) | The numerical flux on the right face in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
integer, | intent(in) | :: | nScalars | The number of scalar variables in your equation system. |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree in each spatial direction. |
||
real(kind=rk), | intent(in) | :: | length | The length of the cubes. |
||
integer, | intent(in) | :: | nElems_fluid | The element index |
||
real(kind=rk), | intent(in) | :: | dl_prod(2,maxPolyDegree+1) | Precomputed dual Legendre products: |
||
real(kind=rk), | intent(inout) | :: | projection(:,:,:) | The numerical flux projected onto the test functions. |
Projection of the numerical flux in y direction onto the testfunctions for Q_space.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | numFlux(:,:,:,:) | The numerical flux on the faces in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
integer, | intent(in) | :: | nScalars | The number of scalar variables in your equation system. |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree in each spatial direction. |
||
real(kind=rk), | intent(in) | :: | length | The length of the cubes. |
||
integer, | intent(in) | :: | nElems_fluid | The element index |
||
real(kind=rk), | intent(in) | :: | dl_prod(2,maxPolyDegree+1) | Precomputed dual Legendre products: |
||
real(kind=rk), | intent(inout) | :: | projection(:,:,:) | The numerical flux projected onto the test functions. |
Projection of the numerical flux in y direction onto the testfunctions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(inout) | :: | numFluxLeftFace(:,:,:,:) | The numerical flux on the left face in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
real(kind=rk), | intent(inout) | :: | numFluxRightFace(:,:,:,:) | The numerical flux on the right face in modal representations. Dimension is (maxPolyDegree+1)^2 , nScalars |
||
integer, | intent(in) | :: | nScalars | The number of scalar variables in your equation system. |
||
integer, | intent(in) | :: | maxPolyDegree | The maximal polynomial degree in each spatial direction. |
||
real(kind=rk), | intent(in) | :: | length | The length of the cubes. |
||
integer, | intent(in) | :: | nElems_fluid | The element index |
||
real(kind=rk), | intent(in) | :: | dl_prod(2,maxPolyDegree+1) | Precomputed dual Legendre products: |
||
real(kind=rk), | intent(inout) | :: | projection(:,:,:) | The numerical flux projected onto the test functions. |
Applies the inverse of the mass matrix for a 2D scheme in Q_space.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_cube_elem_type) | :: | mesh | The mesh you are working with. |
|||
type(atl_Equations_type) | :: | equation | The equation you solve. |
|||
type(atl_kerneldata_type) | :: | kerneldata | The data of the kernel. |
|||
type(atl_modg_2d_scheme_type), | intent(in) | :: | scheme | Parameters of the modal dg scheme |
||
integer, | intent(in) | :: | nElems |
Applies the inverse of the mass matrix for a 2D scheme in P_space.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atl_cube_elem_type) | :: | mesh | The mesh you are working with. |
|||
type(atl_kerneldata_type) | :: | kerneldata | The data of the kernel. |
|||
type(atl_modg_2d_scheme_type), | intent(in) | :: | scheme | Parameters of the modal dg scheme |
||
integer, | intent(in) | :: | nElems |