QuadrantMatches3D Function

public function QuadrantMatches3D(coordsBig, sBig, q, coordsSmall, sSmall, flip, tol) result(matched)

Determines whether face sSmall of the small element coincides with quadrant q of face sBig of the big element under the given flip: face_small(F_flip(u,v)) == face_big(quadrant_q(u,v)) at the sampled points.

Arguments

TypeIntentOptionalAttributesName
real(kind=prec), intent(in) :: coordsBig(1:3,1:2,1:2,1:2)
integer, intent(in) :: sBig
integer, intent(in) :: q
real(kind=prec), intent(in) :: coordsSmall(1:3,1:2,1:2,1:2)
integer, intent(in) :: sSmall
integer, intent(in) :: flip
real(kind=prec), intent(in) :: tol

Return Value logical


Calls

proc~~quadrantmatches3d~~CallsGraph proc~quadrantmatches3d QuadrantMatches3D proc~bilinearfacepoint3d BilinearFacePoint3D proc~quadrantmatches3d->proc~bilinearfacepoint3d proc~flipfacecoords3d FlipFaceCoords3D proc~quadrantmatches3d->proc~flipfacecoords3d

Called by

proc~~quadrantmatches3d~~CalledByGraph proc~quadrantmatches3d QuadrantMatches3D proc~simplemortarmesh_mesh3d_t SimpleMortarMesh_Mesh3D_t proc~simplemortarmesh_mesh3d_t->proc~quadrantmatches3d

Contents

Source Code


Source Code

  function QuadrantMatches3D(coordsBig,sBig,q,coordsSmall,sSmall,flip,tol) result(matched)
    !! Determines whether face sSmall of the small element coincides with quadrant q
    !! of face sBig of the big element under the given flip:
    !! face_small(F_flip(u,v)) == face_big(quadrant_q(u,v)) at the sampled points.
    implicit none
    real(prec),intent(in) :: coordsBig(1:3,1:2,1:2,1:2)
    integer,intent(in) :: sBig,q
    real(prec),intent(in) :: coordsSmall(1:3,1:2,1:2,1:2)
    integer,intent(in) :: sSmall,flip
    real(prec),intent(in) :: tol
    logical :: matched
    ! Local
    real(prec),parameter :: us(1:5) = [-1.0_prec,1.0_prec,-1.0_prec,1.0_prec,0.25_prec]
    real(prec),parameter :: vs(1:5) = [-1.0_prec,-1.0_prec,1.0_prec,1.0_prec,-0.5_prec]
    real(prec) :: pBig(1:3),pSmall(1:3)
    real(prec) :: uq,vq,u2,v2
    integer :: n

    matched = .true.
    do n = 1,5
      ! Big-face coordinates of the quadrant point
      uq = 0.5_prec*(us(n)+real(2*mortarQuadKx(q)-3,prec))
      vq = 0.5_prec*(vs(n)+real(2*mortarQuadKy(q)-3,prec))
      pBig = BilinearFacePoint3D(coordsBig,sBig,uq,vq)
      call FlipFaceCoords3D(us(n),vs(n),flip,u2,v2)
      pSmall = BilinearFacePoint3D(coordsSmall,sSmall,u2,v2)
      if(maxval(abs(pBig-pSmall)) > tol) then
        matched = .false.
        return
      endif
    enddo

  endfunction QuadrantMatches3D