SELF_SolutionTransfer_3D Module

Solution transfer between an element and its eight h-refinement children (AMR Stage 3).

When a 3-D hexahedral element is refined into eight children (SELF child ordering = CGNS corner order, child c covering the octant with half-interval indices (octAxc(c),octAyc(c),octAzc(c)) of the parent reference cube; see SELF_RefinementPrimitives_3D), the prognostic solution must move with the mesh:

  • Prolongation (parent -> 8 children): sample the parent's degree-N nodal polynomial at the children's nodes. Each child occupies a reference half-interval in each direction, so this is exactly a triple tensor product of the 2:1 mortar restriction operator Lagrange%mortarR (built and identity-checked for the nonconforming interface machinery). It is an exact interpolation: the child fields reproduce the parent polynomial with no loss.

  • Restriction (8 children -> parent): the L2 projection of the (generally discontinuous across children) fine solution back onto the parent's degree-N polynomial space, a triple tensor product of the mortar projection operator Lagrange%mortarP (the M-inner-product adjoint of mortarR). Each 1-D mortarP carries the 1/2 per-direction sub-interval Jacobian, so the triple product carries the 1/8 sub-cell Jacobian appropriate for projecting solution fields: a conservative L2 projection.

These inherit the discrete identities established for the 1-D mortar operators (test/mortarprojection_identity.f90):

  • Consistency / reversibility: RestrictFromChildren(ProlongToChildren(u)) = u exactly, from sum_k P_k R_k = I applied in each tensor direction. Refining then immediately coarsening does not perturb the solution.
  • Conservation: sum_ijk w_i w_j w_k u_parent(i,j,k) = (1/8) sum_c sum_ijk w_i w_j w_k u_child_c(i,j,k), i.e. the reference-cell integral of the restricted parent equals the sum of the children's reference-cell integrals (each child is an eighth of the parent). Weighted by the geometry Jacobian this is conservation of the cell-integrated prognostic quantity.

The routines are element-local and portable (host do concurrent over children/variables); the AMR driver maps forest parent/child relationships onto the element index ranges it passes in. Transfer runs between time steps, so it is not a per-step hot path.

These routines remain the reference implementation and are what the CPU backend and the multi-rank migration path execute, and they are what the transfer tests pin. On a single-rank GPU build the same mathematics run in TransferSolution_3D_gpu (src/gpu/SELF_SolutionTransfer.cpp), so the contractions below are performed on the device rather than on one CPU core and the transferred field never crosses the host link; see ApplyTransferPlan_DGModel3D.


Uses

  • module~~self_solutiontransfer_3d~~UsesGraph module~self_solutiontransfer_3d SELF_SolutionTransfer_3D module~self_lagrange~2 SELF_Lagrange module~self_solutiontransfer_3d->module~self_lagrange~2 module~self_constants SELF_Constants module~self_solutiontransfer_3d->module~self_constants module~self_lagrange~2->module~self_constants iso_fortran_env iso_fortran_env module~self_lagrange~2->iso_fortran_env iso_c_binding iso_c_binding module~self_lagrange~2->iso_c_binding module~self_lagrange_t SELF_Lagrange_t module~self_lagrange~2->module~self_lagrange_t module~self_constants->iso_fortran_env module~self_constants->iso_c_binding module~self_lagrange_t->module~self_constants module~self_lagrange_t->iso_fortran_env module~self_lagrange_t->iso_c_binding module~self_quadrature SELF_Quadrature module~self_lagrange_t->module~self_quadrature HDF5 HDF5 module~self_lagrange_t->HDF5 module~self_supportroutines SELF_SupportRoutines module~self_lagrange_t->module~self_supportroutines module~self_hdf5 SELF_HDF5 module~self_lagrange_t->module~self_hdf5 module~self_quadrature->module~self_constants module~self_quadrature->iso_fortran_env module~self_supportroutines->module~self_constants module~self_supportroutines->iso_fortran_env module~self_hdf5->module~self_constants module~self_hdf5->iso_fortran_env module~self_hdf5->HDF5 mpi mpi module~self_hdf5->mpi

Used by

  • module~~self_solutiontransfer_3d~~UsedByGraph module~self_solutiontransfer_3d SELF_SolutionTransfer_3D module~self_transferplan_3d SELF_TransferPlan_3D module~self_transferplan_3d->module~self_solutiontransfer_3d module~self_dgmodel3d_t SELF_DGModel3D_t module~self_dgmodel3d_t->module~self_transferplan_3d module~self_amrcontroller_3d SELF_AMRController_3D module~self_amrcontroller_3d->module~self_transferplan_3d module~self_amrcontroller_3d->module~self_dgmodel3d_t module~self_dgmodel3d SELF_DGModel3D module~self_dgmodel3d->module~self_transferplan_3d module~self_dgmodel3d->module~self_dgmodel3d_t module~self_dgmodel3d~2 SELF_DGModel3D module~self_dgmodel3d~2->module~self_dgmodel3d_t module~self_ecdgmodel3d_t SELF_ECDGModel3D_t module~self_ecdgmodel3d_t->module~self_dgmodel3d~2 module~self_advection_diffusion_3d_t self_advection_diffusion_3d_t module~self_advection_diffusion_3d_t->module~self_dgmodel3d~2 module~self_lineareuler3d_t self_LinearEuler3D_t module~self_lineareuler3d_t->module~self_dgmodel3d~2 module~self_nulldgmodel3d_t self_NullDGModel3D_t module~self_nulldgmodel3d_t->module~self_dgmodel3d~2 module~self_ecdgmodel3d~2 SELF_ECDGModel3D module~self_ecdgmodel3d~2->module~self_ecdgmodel3d_t module~self_ecdgmodel3d SELF_ECDGModel3D module~self_ecdgmodel3d->module~self_ecdgmodel3d_t module~self_advection_diffusion_3d~2 self_advection_diffusion_3d module~self_advection_diffusion_3d~2->module~self_advection_diffusion_3d_t module~self_ecadvection3d SELF_ECAdvection3D module~self_ecadvection3d->module~self_ecdgmodel3d_t module~self_ecadvection3d_t SELF_ECAdvection3D_t module~self_ecadvection3d->module~self_ecadvection3d_t module~self_esatmo3d SELF_ESAtmo3D module~self_esatmo3d->module~self_ecdgmodel3d_t module~self_esatmo3d_t SELF_ESAtmo3D_t module~self_esatmo3d->module~self_esatmo3d_t module~self_advection_diffusion_3d self_advection_diffusion_3d module~self_advection_diffusion_3d->module~self_advection_diffusion_3d_t module~self_lineareuler3d~2 self_LinearEuler3D module~self_lineareuler3d~2->module~self_lineareuler3d_t module~self_lineareuler3d self_LinearEuler3D module~self_lineareuler3d->module~self_lineareuler3d_t module~self_nulldgmodel3d~2 self_NullDGModel3D module~self_nulldgmodel3d~2->module~self_nulldgmodel3d_t module~self_nulldgmodel3d self_NullDGModel3D module~self_nulldgmodel3d->module~self_nulldgmodel3d_t module~self_esatmo3d_t->module~self_ecdgmodel3d~2 module~self_ecadvection3d_t->module~self_ecdgmodel3d~2 module~self_esatmo3d~2 SELF_ESAtmo3D module~self_esatmo3d~2->module~self_esatmo3d_t module~self_ecadvection3d~2 SELF_ECAdvection3D module~self_ecadvection3d~2->module~self_ecadvection3d_t

Contents


Variables

TypeVisibilityAttributesNameInitial
integer, public, parameter:: transferAxc(1:8) =[0, 1, 1, 0, 0, 1, 1, 0]
integer, public, parameter:: transferAyc(1:8) =[0, 0, 1, 1, 0, 0, 1, 1]
integer, public, parameter:: transferAzc(1:8) =[0, 0, 0, 0, 1, 1, 1, 1]

Subroutines

public subroutine ProlongToChildren(interp, nVar, uParent, uChildren)

Prolong (interpolate) a parent element's nodal solution onto its eight children. uChildren(:,:,:,:,c) is the field on child c (SELF child ordering = CGNS corner order). Exact for the parent's degree-N polynomial representation.

Arguments

TypeIntentOptionalAttributesName
type(Lagrange), intent(in) :: interp
integer, intent(in) :: nVar
real(kind=prec), intent(in) :: uParent(1:interp%N+1,1:interp%N+1,1:interp%N+1,1:nVar)
real(kind=prec), intent(out) :: uChildren(1:interp%N+1,1:interp%N+1,1:interp%N+1,1:nVar,1:8)

public subroutine RestrictFromChildren(interp, nVar, uChildren, uParent)

Restrict (L2-project) the solution on eight children back onto their parent element. Conservative, and the exact left inverse of ProlongToChildren.

Arguments

TypeIntentOptionalAttributesName
type(Lagrange), intent(in) :: interp
integer, intent(in) :: nVar
real(kind=prec), intent(in) :: uChildren(1:interp%N+1,1:interp%N+1,1:interp%N+1,1:nVar,1:8)
real(kind=prec), intent(out) :: uParent(1:interp%N+1,1:interp%N+1,1:interp%N+1,1:nVar)