Evaluates the bilinear map of face s of a trilinear (nGeo=1) element at the face coordinates (u,v) in [-1,1]^2, using the face trace-coordinate convention of BoundaryInterp: faces 1,6 -> (xi1,xi2); faces 2,4 -> (xi1,xi3); faces 3,5 -> (xi2,xi3).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=prec), | intent(in) | :: | elemCoords(1:3,1:2,1:2,1:2) | |||
| integer, | intent(in) | :: | s | |||
| real(kind=prec), | intent(in) | :: | u | |||
| real(kind=prec), | intent(in) | :: | v |
pure function BilinearFacePoint3D(elemCoords,s,u,v) result(p)
!! Evaluates the bilinear map of face s of a trilinear (nGeo=1) element at the
!! face coordinates (u,v) in [-1,1]^2, using the face trace-coordinate convention
!! of BoundaryInterp: faces 1,6 -> (xi1,xi2); faces 2,4 -> (xi1,xi3);
!! faces 3,5 -> (xi2,xi3).
implicit none
real(prec),intent(in) :: elemCoords(1:3,1:2,1:2,1:2)
integer,intent(in) :: s
real(prec),intent(in) :: u,v
real(prec) :: p(1:3)
! Local
real(prec) :: c(1:3,1:2,1:2)
real(prec) :: wu(1:2),wv(1:2)
integer :: i,j
select case(s)
case(selfSide3D_Bottom)
c = elemCoords(1:3,1:2,1:2,1)
case(selfSide3D_South)
c = elemCoords(1:3,1:2,1,1:2)
case(selfSide3D_East)
c = elemCoords(1:3,2,1:2,1:2)
case(selfSide3D_North)
c = elemCoords(1:3,1:2,2,1:2)
case(selfSide3D_West)
c = elemCoords(1:3,1,1:2,1:2)
case default ! selfSide3D_Top
c = elemCoords(1:3,1:2,1:2,2)
endselect
wu = [0.5_prec*(1.0_prec-u),0.5_prec*(1.0_prec+u)]
wv = [0.5_prec*(1.0_prec-v),0.5_prec*(1.0_prec+v)]
p = 0.0_prec
do j = 1,2
do i = 1,2
p = p+wu(i)*wv(j)*c(1:3,i,j)
enddo
enddo
endfunction BilinearFacePoint3D