CalculateMetricTerms_SEMQuad Subroutine

public subroutine CalculateMetricTerms_SEMQuad(myGeom)

Arguments

TypeIntentOptionalAttributesName
class(SEMQuad), intent(inout) :: myGeom

Contents


Source Code

  subroutine CalculateMetricTerms_SEMQuad(myGeom)
    implicit none
    class(SEMQuad),intent(inout) :: myGeom

    call myGeom%x%Gradient(myGeom%dxds%interior)
    ! No boundary interpolation of dxds, and no device upload of it (AMR Stage 6c). In 2-D dxds
    ! is scratch consumed only inside this module: J comes from its interior via Determinant, and
    ! dsdx from its interior via the adjugate in CalculateContravariantBasis, which then fills
    ! dsdx%boundary with dsdx's own BoundaryInterp. A whole-tree search for %dxds%boundary and
    ! for any dxds device pointer finds exactly one hit, in SELF_Geometry_1D (the SEMLine type,
    ! which is distinct), and none respectively. The removed host tensor boundary interpolation
    ! had no GPU override and ran over the largest arrays in SEMQuad.
    !
    ! Note the contrast with x, just above: x%boundary has 37 consumers across SELF_Points,
    ! ESAtmo2D, examples and tests, so its boundary interpolation and the device round trip that
    ! wraps it are load-bearing and stay.

    call myGeom%dxds%Determinant(myGeom%J%interior)

    call myGeom%J%UpdateDevice()
    call myGeom%J%BoundaryInterp()
    call myGeom%J%UpdateHost()

    call myGeom%CalculateContravariantBasis()

  endsubroutine CalculateMetricTerms_SEMQuad