Skip to content

Commit

Permalink
Update test_nurbs_curve.f90
Browse files Browse the repository at this point in the history
Signed-off-by: Seyed Ali Ghasemi <info@gha3mi.com>
  • Loading branch information
gha3mi committed May 19, 2024
1 parent 8f49ee8 commit fa6776e
Showing 1 changed file with 83 additions and 71 deletions.
154 changes: 83 additions & 71 deletions test/test_nurbs_curve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ program test_nurbs_curve
real(rk) :: knot(6)
integer, allocatable :: elemConn(:,:)
real(rk), allocatable :: Tgc(:,:), dTgc(:,:)
integer :: i
integer :: i, id
real(rk), allocatable :: nearest_Xg(:)
real(rk) :: nearest_Xt
type(unit_test) :: ut

allocate(Xc(3, 3))
Expand All @@ -29,118 +31,123 @@ program test_nurbs_curve
call nurbs%create(res = 23)
call bsp%create(res = 23)

call nurbs%nearest_point([0.0_rk, 0.0_rk, 0.5_rk], nearest_Xg, nearest_Xt, id)
call ut%check(res=nearest_Xg, expected=[0.0_rk, 0.0_rk, 0.0_rk], tol=1e-5_rk, msg="test_nurbs_curve: 01")
call ut%check(res=nearest_Xt, expected=0.0_rk, tol=1e-5_rk, msg="test_nurbs_curve: 02")
call ut%check(res=id, expected=1, msg="test_nurbs_curve: 03")

Xg = nurbs%get_Xg()
Xgb = bsp%get_Xg()

call nurbs%set([0.0_rk, 1.0_rk], 2, [-1, -1], Xc, Wc)
call bsp%set([0.0_rk, 1.0_rk], 2, [-1, -1], Xc)

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 01")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 02")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 04")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 05")

call nurbs%set(Xc, Wc)
call bsp%set(Xc)

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 03")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 04")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 06")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 07")

call nurbs%create(Xt = nurbs%get_Xt())
call bsp%create(Xt = bsp%get_Xt())

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 05")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 06")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 08")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 09")

call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 07")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 08")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 10")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 11")

call ut%check(res=nurbs%get_Xc(1), expected=Xc(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 09")
call ut%check(res=bsp%get_Xc(1), expected=Xc(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 10")
call ut%check(res=nurbs%get_Xc(1), expected=Xc(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 12")
call ut%check(res=bsp%get_Xc(1), expected=Xc(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 13")

call ut%check(res=nurbs%get_Xc(1,1), expected=Xc(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 11")
call ut%check(res=bsp%get_Xc(1,1), expected=Xc(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 12")
call ut%check(res=nurbs%get_Xc(1,1), expected=Xc(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 14")
call ut%check(res=bsp%get_Xc(1,1), expected=Xc(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 15")

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 13")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 14")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 16")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 17")

call ut%check(res=nurbs%get_Xg(1), expected=Xg(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 15")
call ut%check(res=bsp%get_Xg(1), expected=Xgb(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 16")
call ut%check(res=nurbs%get_Xg(1), expected=Xg(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 18")
call ut%check(res=bsp%get_Xg(1), expected=Xgb(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 19")

call ut%check(res=nurbs%get_Xg(1,1), expected=Xg(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 17")
call ut%check(res=bsp%get_Xg(1,1), expected=Xgb(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 18")
call ut%check(res=nurbs%get_Xg(1,1), expected=Xg(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 20")
call ut%check(res=bsp%get_Xg(1,1), expected=Xgb(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 21")

call ut%check(res=nurbs%get_Wc(), expected=Wc, tol=1e-5_rk, msg="test_nurbs_curve: 19")
call ut%check(res=nurbs%get_Wc(), expected=Wc, tol=1e-5_rk, msg="test_nurbs_curve: 22")

call ut%check(res=nurbs%get_Wc(1), expected=Wc(1), tol=1e-5_rk, msg="test_nurbs_curve: 20")
call ut%check(res=nurbs%get_Wc(1), expected=Wc(1), tol=1e-5_rk, msg="test_nurbs_curve: 23")

call ut%check(res=nurbs%get_knot(), expected=knot, tol=1e-5_rk, msg="test_nurbs_curve: 21")
call ut%check(res=bsp%get_knot(), expected=knot, tol=1e-5_rk, msg="test_nurbs_curve: 22")
call ut%check(res=nurbs%get_knot(), expected=knot, tol=1e-5_rk, msg="test_nurbs_curve: 24")
call ut%check(res=bsp%get_knot(), expected=knot, tol=1e-5_rk, msg="test_nurbs_curve: 25")

call ut%check(res=nurbs%get_knot(1), expected=knot(1), tol=1e-5_rk, msg="test_nurbs_curve: 23")
call ut%check(res=bsp%get_knot(1), expected=knot(1), tol=1e-5_rk, msg="test_nurbs_curve: 24")
call ut%check(res=nurbs%get_knot(1), expected=knot(1), tol=1e-5_rk, msg="test_nurbs_curve: 26")
call ut%check(res=bsp%get_knot(1), expected=knot(1), tol=1e-5_rk, msg="test_nurbs_curve: 27")

call ut%check(res=nurbs%get_ng(), expected=size(Xg,1), msg="test_nurbs_curve: 25")
call ut%check(res=bsp%get_ng(), expected=size(Xgb,1), msg="test_nurbs_curve: 26")
call ut%check(res=nurbs%get_ng(), expected=size(Xg,1), msg="test_nurbs_curve: 28")
call ut%check(res=bsp%get_ng(), expected=size(Xgb,1), msg="test_nurbs_curve: 29")

call ut%check(res=nurbs%get_degree(), expected=2, msg="test_nurbs_curve: 27")
call ut%check(res=bsp%get_degree(), expected=2, msg="test_nurbs_curve: 28")
call ut%check(res=nurbs%get_degree(), expected=2, msg="test_nurbs_curve: 30")
call ut%check(res=bsp%get_degree(), expected=2, msg="test_nurbs_curve: 31")

call ut%check(res=nurbs%get_multiplicity(), expected=[3,3], msg="test_nurbs_curve: 29")
call ut%check(res=bsp%get_multiplicity(), expected=[3,3], msg="test_nurbs_curve: 30")
call ut%check(res=nurbs%get_multiplicity(), expected=[3,3], msg="test_nurbs_curve: 32")
call ut%check(res=bsp%get_multiplicity(), expected=[3,3], msg="test_nurbs_curve: 33")

call ut%check(res=nurbs%get_continuity(), expected=[-1,-1], msg="test_nurbs_curve: 31")
call ut%check(res=bsp%get_continuity(), expected=[-1,-1], msg="test_nurbs_curve: 32")
call ut%check(res=nurbs%get_continuity(), expected=[-1,-1], msg="test_nurbs_curve: 34")
call ut%check(res=bsp%get_continuity(), expected=[-1,-1], msg="test_nurbs_curve: 35")

call ut%check(res=nurbs%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 33")
call ut%check(res=bsp%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 34")
call ut%check(res=nurbs%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 36")
call ut%check(res=bsp%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 37")

call nurbs%cmp_nc()
call bsp%cmp_nc()

call ut%check(res=nurbs%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 35")
call ut%check(res=bsp%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 36")
call ut%check(res=nurbs%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 38")
call ut%check(res=bsp%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 39")


elemConn = nurbs%cmp_elem_Xc_vis(2)
call nurbs%set_elem_Xc_vis(elemConn)
call ut%check(res=nurbs%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 37")
call ut%check(res=nurbs%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 40")
deallocate(elemConn)
elemConn = nurbs%cmp_elem_Xc_vis()
call nurbs%set_elem_Xc_vis(elemConn)
call ut%check(res=nurbs%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 38")
call ut%check(res=nurbs%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 41")
deallocate(elemConn)
elemConn = bsp%cmp_elem_Xc_vis(2)
call bsp%set_elem_Xc_vis(elemConn)
call ut%check(res=bsp%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 39")
call ut%check(res=bsp%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 42")
deallocate(elemConn)
elemConn = bsp%cmp_elem_Xc_vis()
call bsp%set_elem_Xc_vis(elemConn)
call ut%check(res=bsp%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 40")
call ut%check(res=bsp%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 43")
deallocate(elemConn)

elemConn = nurbs%cmp_elem_Xg_vis(2)
call nurbs%set_elem_Xg_vis(elemConn)
call ut%check(res=nurbs%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 41")
call ut%check(res=nurbs%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 44")
deallocate(elemConn)
elemConn = nurbs%cmp_elem_Xg_vis()
call nurbs%set_elem_Xg_vis(elemConn)
call ut%check(res=nurbs%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 42")
call ut%check(res=nurbs%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 45")
deallocate(elemConn)
elemConn = bsp%cmp_elem_Xg_vis(2)
call bsp%set_elem_Xg_vis(elemConn)
call ut%check(res=bsp%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 43")
call ut%check(res=bsp%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 46")
deallocate(elemConn)
elemConn = bsp%cmp_elem_Xg_vis()
call bsp%set_elem_Xg_vis(elemConn)
call ut%check(res=bsp%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 44")
call ut%check(res=bsp%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 47")
deallocate(elemConn)

elemConn = nurbs%cmp_elem()
call nurbs%set_elem(elemConn)
call ut%check(res=nurbs%get_elem(), expected=elemConn, msg="test_nurbs_curve: 45")
call ut%check(res=nurbs%get_elem(), expected=elemConn, msg="test_nurbs_curve: 48")
deallocate(elemConn)
elemConn = bsp%cmp_elem()
call bsp%set_elem(elemConn)
call ut%check(res=bsp%get_elem(), expected=elemConn, msg="test_nurbs_curve: 46")
call ut%check(res=bsp%get_elem(), expected=elemConn, msg="test_nurbs_curve: 49")
deallocate(elemConn)

call nurbs%modify_Xc(Xc(1,1), 1,1)
Expand All @@ -151,8 +158,8 @@ program test_nurbs_curve
call nurbs%create()
call bsp%create()

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 47")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 48")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 50")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 51")

call nurbs%basis(res=23, Tgc=Tgc)
call bsp%basis(res=23, Tgc=Tgc)
Expand All @@ -172,71 +179,71 @@ program test_nurbs_curve
call bsp%rotate_Xc(45.0_rk, 0.0_rk, 0.0_rk)
call bsp%rotate_Xc(-45.0_rk, 0.0_rk, 0.0_rk)

call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 49")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 50")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 52")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 53")

call nurbs%rotate_Xc(0.0_rk, 45.0_rk, 0.0_rk)
call nurbs%rotate_Xc(0.0_rk, -45.0_rk, 0.0_rk)

call bsp%rotate_Xc(0.0_rk, 45.0_rk, 0.0_rk)
call bsp%rotate_Xc(0.0_rk, -45.0_rk, 0.0_rk)

call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 51")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 52")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 54")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 55")

call nurbs%rotate_Xc(0.0_rk, 0.0_rk, 45.0_rk)
call nurbs%rotate_Xc(0.0_rk, 0.0_rk, -45.0_rk)

call bsp%rotate_Xc(0.0_rk, 0.0_rk, 45.0_rk)
call bsp%rotate_Xc(0.0_rk, 0.0_rk, -45.0_rk)

call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 53")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 54")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 56")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 57")

call nurbs%rotate_Xg(45.0_rk, 0.0_rk, 0.0_rk)
call nurbs%rotate_Xg(-45.0_rk, 0.0_rk, 0.0_rk)

call bsp%rotate_Xg(45.0_rk, 0.0_rk, 0.0_rk)
call bsp%rotate_Xg(-45.0_rk, 0.0_rk, 0.0_rk)

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 55")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 56")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 58")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 59")

call nurbs%rotate_Xg(0.0_rk, 45.0_rk, 0.0_rk)
call nurbs%rotate_Xg(0.0_rk, -45.0_rk, 0.0_rk)

call bsp%rotate_Xg(0.0_rk, 45.0_rk, 0.0_rk)
call bsp%rotate_Xg(0.0_rk, -45.0_rk, 0.0_rk)

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 57")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 58")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 60")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 61")

call nurbs%rotate_Xg(0.0_rk, 0.0_rk, 45.0_rk)
call nurbs%rotate_Xg(0.0_rk, 0.0_rk, -45.0_rk)

call bsp%rotate_Xg(0.0_rk, 0.0_rk, 45.0_rk)
call bsp%rotate_Xg(0.0_rk, 0.0_rk, -45.0_rk)

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 59")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 60")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 62")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 63")

call nurbs%translate_Xc([5.0_rk, 5.0_rk, 5.0_rk])
call nurbs%translate_Xc([-5.0_rk, -5.0_rk, -5.0_rk])

call bsp%translate_Xc([5.0_rk, 5.0_rk, 5.0_rk])
call bsp%translate_Xc([-5.0_rk, -5.0_rk, -5.0_rk])

call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 61")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 62")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 64")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 65")

call nurbs%translate_Xg([5.0_rk, 5.0_rk, 5.0_rk])
call nurbs%translate_Xg([-5.0_rk, -5.0_rk, -5.0_rk])

call bsp%translate_Xg([5.0_rk, 5.0_rk, 5.0_rk])
call bsp%translate_Xg([-5.0_rk, -5.0_rk, -5.0_rk])

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 63")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 64")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 66")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 67")

call nurbs%export_Xc("vtk/test_nurbs_curve_Xc.vtk")
call nurbs%export_Xg("vtk/test_nurbs_curve_Xg.vtk")
Expand All @@ -250,26 +257,31 @@ program test_nurbs_curve
call nurbs%create()
call bsp%create()

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 65")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 66")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 68")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 69")

call nurbs%elevate_degree(2)
call bsp%elevate_degree(2)

call nurbs%create()
call bsp%create()

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 67")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 68")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 70")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 71")

call nurbs%remove_knots([0.25_rk, 0.75_rk], [2,1])
call bsp%remove_knots([0.25_rk, 0.75_rk], [2,1])

call nurbs%create()
call bsp%create()

call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 69")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 70")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 72")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 73")


call nurbs%set_circle([0.0_rk, 0.0_rk, 0.0_rk], 1.0_rk)
call nurbs%set_half_circle([0.0_rk, 0.0_rk, 0.0_rk], 1.0_rk)
call nurbs%set_C([0.0_rk, 0.0_rk, 0.0_rk], 1.0_rk)

call nurbs%finalize()
call bsp%finalize()
Expand Down

0 comments on commit fa6776e

Please sign in to comment.