SELF_SolutionTransfer_2D Module

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

When a 2-D quadrilateral element is refined into four children (SELF child ordering 1=SW, 2=SE, 3=NE, 4=NW, each covering one quadrant of the parent reference square), the prognostic solution must move with the mesh:

  • Prolongation (parent -> 4 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 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 (4 children -> parent): the L2 projection of the (generally discontinuous across children) fine solution back onto the parent's degree-N polynomial space, a tensor product of the mortar projection operator Lagrange%mortarP (the M-inner-product adjoint of mortarR). mortarP already carries the 1/2 per-direction sub-edge Jacobian appropriate for projecting solution traces.

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_ij w_i w_j u_parent(i,j) = (1/4) sum_c sum_ij w_i w_j u_child_c(i,j), i.e. the reference-cell integral of the restricted parent equals the sum of the children's reference-cell integrals (each child is a quarter 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; on GPU backends the transferred field is re-uploaded as part of the Stage-6 device re-allocation.


Uses

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

Used by

  • module~~self_solutiontransfer_2d~~UsedByGraph module~self_solutiontransfer_2d SELF_SolutionTransfer_2D module~self_transferplan_2d SELF_TransferPlan_2D module~self_transferplan_2d->module~self_solutiontransfer_2d module~self_dgmodel2d_t SELF_DGModel2D_t module~self_dgmodel2d_t->module~self_transferplan_2d module~self_amrcontroller_2d SELF_AMRController_2D module~self_amrcontroller_2d->module~self_transferplan_2d module~self_amrcontroller_2d->module~self_dgmodel2d_t module~self_dgmodel2d~2 SELF_DGModel2D module~self_dgmodel2d~2->module~self_transferplan_2d module~self_dgmodel2d~2->module~self_dgmodel2d_t module~self_dgmodel2d SELF_DGModel2D module~self_dgmodel2d->module~self_dgmodel2d_t module~self_ecdgmodel2d_t SELF_ECDGModel2D_t module~self_ecdgmodel2d_t->module~self_dgmodel2d module~self_lineareuler2d_pml_t self_LinearEuler2D_PML_t module~self_lineareuler2d_pml_t->module~self_dgmodel2d module~self_lineareuler2d_t self_LinearEuler2D_t module~self_lineareuler2d_pml_t->module~self_lineareuler2d_t module~self_nulldgmodel2d_t self_NullDGModel2D_t module~self_nulldgmodel2d_t->module~self_dgmodel2d module~self_linearshallowwater2d_t self_LinearShallowWater2D_t module~self_linearshallowwater2d_t->module~self_dgmodel2d module~self_lineareuler2d_t->module~self_dgmodel2d module~self_advection_diffusion_2d_t self_advection_diffusion_2d_t module~self_advection_diffusion_2d_t->module~self_dgmodel2d module~self_advection_diffusion_2d~2 self_advection_diffusion_2d module~self_advection_diffusion_2d~2->module~self_advection_diffusion_2d_t module~self_lineareuler2d self_LinearEuler2D module~self_lineareuler2d->module~self_lineareuler2d_t module~self_ecdgmodel2d SELF_ECDGModel2D module~self_ecdgmodel2d->module~self_ecdgmodel2d_t module~self_ecdgmodel2d~2 SELF_ECDGModel2D module~self_ecdgmodel2d~2->module~self_ecdgmodel2d_t module~self_lineareuler2d_pml self_LinearEuler2D_PML module~self_lineareuler2d_pml->module~self_lineareuler2d_pml_t module~self_ecadvection2d~2 SELF_ECAdvection2D module~self_ecadvection2d~2->module~self_ecdgmodel2d_t module~self_ecadvection2d_t SELF_ECAdvection2D_t module~self_ecadvection2d~2->module~self_ecadvection2d_t module~self_esatmo2d SELF_ESAtmo2D module~self_esatmo2d->module~self_ecdgmodel2d_t module~self_esatmo2d_t SELF_ESAtmo2D_t module~self_esatmo2d->module~self_esatmo2d_t module~self_lineareuler2d_pml~2 self_LinearEuler2D_PML module~self_lineareuler2d_pml~2->module~self_lineareuler2d_pml_t module~self_nulldgmodel2d self_NullDGModel2D module~self_nulldgmodel2d->module~self_nulldgmodel2d_t module~self_nulldgmodel2d~2 self_NullDGModel2D module~self_nulldgmodel2d~2->module~self_nulldgmodel2d_t module~self_linearshallowwater2d self_LinearShallowWater2D module~self_linearshallowwater2d->module~self_linearshallowwater2d_t module~self_linearshallowwater2d~2 self_LinearShallowWater2D module~self_linearshallowwater2d~2->module~self_linearshallowwater2d_t module~self_lineareuler2d~2 self_LinearEuler2D module~self_lineareuler2d~2->module~self_lineareuler2d_t module~self_advection_diffusion_2d self_advection_diffusion_2d module~self_advection_diffusion_2d->module~self_advection_diffusion_2d_t module~self_ecadvection2d_t->module~self_ecdgmodel2d module~self_esatmo2d_t->module~self_ecdgmodel2d module~self_ecadvection2d SELF_ECAdvection2D module~self_ecadvection2d->module~self_ecadvection2d_t module~self_esatmo2d~2 SELF_ESAtmo2D module~self_esatmo2d~2->module~self_esatmo2d_t

Contents


Variables

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

Subroutines

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

Prolong (interpolate) a parent element's nodal solution onto its four children. uChildren(:,:,:,c) is the field on child c (ordering 1=SW,2=SE,3=NE,4=NW). 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:nVar)
real(kind=prec), intent(out) :: uChildren(1:interp%N+1,1:interp%N+1,1:nVar,1:4)

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

Restrict (L2-project) the solution on four 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:nVar,1:4)
real(kind=prec), intent(out) :: uParent(1:interp%N+1,1:interp%N+1,1:nVar)