VerifyGeometry Subroutine

public subroutine VerifyGeometry(this, newMesh, newGeom)

Generate the geometry the original way and report, per quantity, the largest discrepancy against the incrementally built one. Diagnostic only; gated by SELF_AMR_GEOM_VERIFY.

Whole-array maxima rather than per-element reporting: naming the quantity that diverges is what localizes the defect, and it keeps this to F2008 array intrinsics.

Arguments

TypeIntentOptionalAttributesName
class(AMRController3D), intent(inout) :: this
type(Mesh3D), intent(in) :: newMesh
type(SEMHex), intent(in) :: newGeom

Called by

proc~~verifygeometry~2~~CalledByGraph proc~verifygeometry~2 VerifyGeometry proc~buildgeometry_amrcontroller3d BuildGeometry_AMRController3D proc~buildgeometry_amrcontroller3d->proc~verifygeometry~2

Contents

Source Code


Source Code

  subroutine VerifyGeometry(this,newMesh,newGeom)
    !! Generate the geometry the original way and report, per quantity, the largest
    !! discrepancy against the incrementally built one. Diagnostic only; gated by
    !! SELF_AMR_GEOM_VERIFY.
    !!
    !! Whole-array maxima rather than per-element reporting: naming the quantity that diverges
    !! is what localizes the defect, and it keeps this to F2008 array intrinsics.
    implicit none
    class(AMRController3D),intent(inout) :: this
    type(Mesh3D),intent(in) :: newMesh
    type(SEMHex),intent(in) :: newGeom
    ! Local
    type(SEMHex) :: ref

    call ref%Init(this%interp,newMesh%nElem)
    call ref%GenerateFromMesh(newMesh)

    print*,"GEOM_VERIFY nElem            =",newMesh%nElem
    print*,"GEOM_VERIFY max|d x%interior|     =", &
      maxval(abs(newGeom%x%interior-ref%x%interior))
    print*,"GEOM_VERIFY max|d x%boundary|     =", &
      maxval(abs(newGeom%x%boundary-ref%x%boundary))
    print*,"GEOM_VERIFY max|d J%interior|     =", &
      maxval(abs(newGeom%J%interior-ref%J%interior))
    print*,"GEOM_VERIFY max|d J%boundary|     =", &
      maxval(abs(newGeom%J%boundary-ref%J%boundary))
    print*,"GEOM_VERIFY max|d dsdx%interior|  =", &
      maxval(abs(newGeom%dsdx%interior-ref%dsdx%interior))
    print*,"GEOM_VERIFY max|d dsdx%boundary|  =", &
      maxval(abs(newGeom%dsdx%boundary-ref%dsdx%boundary))
    print*,"GEOM_VERIFY max|d nHat%boundary|  =", &
      maxval(abs(newGeom%nHat%boundary-ref%nHat%boundary))
    print*,"GEOM_VERIFY max|d nScale%boundary|=", &
      maxval(abs(newGeom%nScale%boundary-ref%nScale%boundary))

    call ref%Free()

  endsubroutine VerifyGeometry