Skip to content

Commit

Permalink
Update unit tests for nurbs curve and surface
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 Jun 29, 2024
1 parent f59ff9c commit b551495
Show file tree
Hide file tree
Showing 2 changed files with 127 additions and 110 deletions.
153 changes: 83 additions & 70 deletions test/test_nurbs_curve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -36,118 +36,131 @@ program test_nurbs_curve
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")

call bsp%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: 04")
call ut%check(res=nearest_Xt, expected=0.0_rk, tol=1e-5_rk, msg="test_nurbs_curve: 05")
call ut%check(res=id, expected=1, msg="test_nurbs_curve: 06")

call nurbs%nearest_point2([0.0_rk, 0.0_rk, 0.5_rk], 1e-10_rk, 10, nearest_Xt, nearest_Xg)
call ut%check(res=nearest_Xg, expected=[0.0_rk, 0.0_rk, 0.0_rk], tol=1e-5_rk, msg="test_nurbs_curve: 07")
call ut%check(res=nearest_Xt, expected=0.0_rk, tol=1e-5_rk, msg="test_nurbs_curve: 08")

call bsp%nearest_point2([0.0_rk, 0.0_rk, 0.5_rk], 1e-10_rk, 10, nearest_Xt, nearest_Xg)
call ut%check(res=nearest_Xg, expected=[0.0_rk, 0.0_rk, 0.0_rk], tol=1e-5_rk, msg="test_nurbs_curve: 09")
call ut%check(res=nearest_Xt, expected=0.0_rk, tol=1e-5_rk, msg="test_nurbs_curve: 10")

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: 04")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 05")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 11")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 12")

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: 06")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 07")
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 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: 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_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 15")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 16")

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(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 17")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 18")

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), expected=Xc(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 19")
call ut%check(res=bsp%get_Xc(1), expected=Xc(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 20")

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_Xc(1,1), expected=Xc(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 21")
call ut%check(res=bsp%get_Xc(1,1), expected=Xc(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 22")

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(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 23")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 24")

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), expected=Xg(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 25")
call ut%check(res=bsp%get_Xg(1), expected=Xgb(1,:), tol=1e-5_rk, msg="test_nurbs_curve: 26")

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_Xg(1,1), expected=Xg(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 27")
call ut%check(res=bsp%get_Xg(1,1), expected=Xgb(1,1), tol=1e-5_rk, msg="test_nurbs_curve: 28")

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(), expected=Wc, tol=1e-5_rk, msg="test_nurbs_curve: 29")

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_Wc(1), expected=Wc(1), tol=1e-5_rk, msg="test_nurbs_curve: 30")

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(), expected=knot, tol=1e-5_rk, msg="test_nurbs_curve: 31")
call ut%check(res=bsp%get_knot(), expected=knot, tol=1e-5_rk, msg="test_nurbs_curve: 32")

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_knot(1), expected=knot(1), tol=1e-5_rk, msg="test_nurbs_curve: 33")
call ut%check(res=bsp%get_knot(1), expected=knot(1), tol=1e-5_rk, msg="test_nurbs_curve: 34")

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_ng(), expected=size(Xg,1), msg="test_nurbs_curve: 35")
call ut%check(res=bsp%get_ng(), expected=size(Xgb,1), msg="test_nurbs_curve: 36")

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_degree(), expected=2, msg="test_nurbs_curve: 37")
call ut%check(res=bsp%get_degree(), expected=2, msg="test_nurbs_curve: 38")

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_multiplicity(), expected=[3,3], msg="test_nurbs_curve: 39")
call ut%check(res=bsp%get_multiplicity(), expected=[3,3], msg="test_nurbs_curve: 40")

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_continuity(), expected=[-1,-1], msg="test_nurbs_curve: 41")
call ut%check(res=bsp%get_continuity(), expected=[-1,-1], msg="test_nurbs_curve: 42")

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 ut%check(res=nurbs%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 43")
call ut%check(res=bsp%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 44")

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

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")
call ut%check(res=nurbs%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 45")
call ut%check(res=bsp%get_nc(), expected=size(Xc,1), msg="test_nurbs_curve: 46")


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: 40")
call ut%check(res=nurbs%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 47")
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: 41")
call ut%check(res=nurbs%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 48")
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: 42")
call ut%check(res=bsp%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 49")
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: 43")
call ut%check(res=bsp%get_elem_Xc_vis(), expected=elemConn, msg="test_nurbs_curve: 50")
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: 44")
call ut%check(res=nurbs%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 51")
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: 45")
call ut%check(res=nurbs%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 52")
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: 46")
call ut%check(res=bsp%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 53")
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: 47")
call ut%check(res=bsp%get_elem_Xg_vis(), expected=elemConn, msg="test_nurbs_curve: 54")
deallocate(elemConn)

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

call nurbs%modify_Xc(Xc(1,1), 1,1)
Expand All @@ -158,8 +171,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: 50")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 51")
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 nurbs%basis(res=23, Tgc=Tgc)
call bsp%basis(res=23, Tgc=Tgc)
Expand All @@ -179,71 +192,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: 52")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 53")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 59")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 60")

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: 54")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 55")
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 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: 56")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 57")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 63")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 64")

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: 58")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 59")
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 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: 60")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 61")
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 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: 62")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 63")
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 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: 64")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 65")
call ut%check(res=nurbs%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 71")
call ut%check(res=bsp%get_Xc(), expected=Xc, tol=1e-5_rk, msg="test_nurbs_curve: 72")

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: 66")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 67")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 73")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 74")

call nurbs%export_Xc("vtk/test_nurbs_curve_Xc.vtk")
call nurbs%export_Xg("vtk/test_nurbs_curve_Xg.vtk")
Expand All @@ -257,26 +270,26 @@ 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: 68")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 69")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 75")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 76")

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: 70")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 71")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 77")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 78")

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: 72")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 73")
call ut%check(res=nurbs%get_Xg(), expected=Xg, tol=1e-5_rk, msg="test_nurbs_curve: 79")
call ut%check(res=bsp%get_Xg(), expected=Xgb, tol=1e-5_rk, msg="test_nurbs_curve: 80")


call nurbs%set_circle([0.0_rk, 0.0_rk, 0.0_rk], 1.0_rk)
Expand Down
Loading

0 comments on commit b551495

Please sign in to comment.