Error checks for the user-specified knot vector sizes.
Note
If more than one is the wrong size, then the iflag
error code will
correspond to the one with the highest rank.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in), | optional | :: | nx | ||
integer(kind=ip), | intent(in), | optional | :: | ny | ||
integer(kind=ip), | intent(in), | optional | :: | nz | ||
integer(kind=ip), | intent(in), | optional | :: | nq | ||
integer(kind=ip), | intent(in), | optional | :: | nr | ||
integer(kind=ip), | intent(in), | optional | :: | ns | ||
integer(kind=ip), | intent(in), | optional | :: | kx | ||
integer(kind=ip), | intent(in), | optional | :: | ky | ||
integer(kind=ip), | intent(in), | optional | :: | kz | ||
integer(kind=ip), | intent(in), | optional | :: | kq | ||
integer(kind=ip), | intent(in), | optional | :: | kr | ||
integer(kind=ip), | intent(in), | optional | :: | ks | ||
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tx | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | ty | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tz | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tq | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | tr | |
real(kind=wp), | intent(in), | optional, | dimension(:) | :: | ts | |
integer(kind=ip), | intent(out) | :: | iflag |
0 if everything is OK |
pure subroutine check_knot_vectors_sizes(nx,ny,nz,nq,nr,ns,& kx,ky,kz,kq,kr,ks,& tx,ty,tz,tq,tr,ts,iflag) implicit none integer(ip),intent(in),optional :: nx integer(ip),intent(in),optional :: ny integer(ip),intent(in),optional :: nz integer(ip),intent(in),optional :: nq integer(ip),intent(in),optional :: nr integer(ip),intent(in),optional :: ns integer(ip),intent(in),optional :: kx integer(ip),intent(in),optional :: ky integer(ip),intent(in),optional :: kz integer(ip),intent(in),optional :: kq integer(ip),intent(in),optional :: kr integer(ip),intent(in),optional :: ks real(wp),dimension(:),intent(in),optional :: tx real(wp),dimension(:),intent(in),optional :: ty real(wp),dimension(:),intent(in),optional :: tz real(wp),dimension(:),intent(in),optional :: tq real(wp),dimension(:),intent(in),optional :: tr real(wp),dimension(:),intent(in),optional :: ts integer(ip),intent(out) :: iflag !! 0 if everything is OK iflag = 0_ip if (present(nx) .and. present(kx) .and. present(tx)) then if (size(tx,kind=ip)/=(nx+kx)) then iflag = 501_ip ! tx is not the correct size (nx+kx) end if end if if (present(ny) .and. present(ky) .and. present(ty)) then if (size(ty,kind=ip)/=(ny+ky)) then iflag = 502_ip ! ty is not the correct size (ny+ky) end if end if if (present(nz) .and. present(kz) .and. present(tz)) then if (size(tz,kind=ip)/=(nz+kz)) then iflag = 503_ip ! tz is not the correct size (nz+kz) end if end if if (present(nq) .and. present(kq) .and. present(tq)) then if (size(tq,kind=ip)/=(nq+kq)) then iflag = 504_ip ! tq is not the correct size (nq+kq) end if end if if (present(nr) .and. present(kr) .and. present(tr)) then if (size(tr,kind=ip)/=(nr+kr)) then iflag = 505_ip ! tr is not the correct size (nr+kr) end if end if if (present(ns) .and. present(ks) .and. present(ts)) then if (size(ts,kind=ip)/=(ns+ks)) then iflag = 506_ip ! ts is not the correct size (ns+ks) end if end if end subroutine check_knot_vectors_sizes