transformCanoND_single Subroutine

private subroutine transformCanoND_single(canoND, transform)

This routine apply transformation to canonical objects.

Arguments

Type IntentOptional Attributes Name
type(tem_canonicalND_type), intent(inout) :: canoND

canonical geometry object type

type(tem_transformation_type), intent(in) :: transform

transformation for spatial object


Source Code

  subroutine transformCanoND_single(canoND, transform)
    !--------------------------------------------------------------------------!
    !> canonical geometry object type
    type( tem_canonicalND_type ), intent(inout) :: canoND
    !> transformation for spatial object
    type(tem_transformation_type), intent(in) :: transform
    !--------------------------------------------------------------------------!
    integer :: iVec
    !--------------------------------------------------------------------------!
    if(transform%active) then
      if(transform%deform%active) then
        canoND%origin = matmul( transform%deform%matrix, &
          &                     canoND%origin )
        do iVec=1,canoND%nDim
          canoND%vec(:,iVec) = matmul( transform%deform%matrix, &
            &                         canoND%vec(:,iVec) )
        enddo
      endif
      if(transform%translate%active) then
        canoND%origin = transform%translate%vec + canoND%origin
      endif
    endif

  end subroutine transformCanoND_single