Skip to content

Commit

Permalink
Fix compute_dTgc_* functions
Browse files Browse the repository at this point in the history
Signed-off-by: Seyed Ali Ghasemi <[email protected]>
  • Loading branch information
gha3mi committed Jun 7, 2024
1 parent 1de97b5 commit cf4908e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
6 changes: 1 addition & 5 deletions src/forcad_nurbs_curve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1596,8 +1596,6 @@ impure function compute_dTgc_nurbs_1d(Xt, knot, degree, nc, ng, Wc) result(dTgc)
integer :: i

allocate(dTgc(ng, nc))
allocate(dBi(nc))
allocate(Tgci(nc))
!$OMP PARALLEL DO PRIVATE(Tgci, dBi)
do i = 1, size(Xt)
call basis_bspline_der(Xt(i), knot, nc, degree, dBi, Tgci)
Expand Down Expand Up @@ -1626,7 +1624,6 @@ impure function compute_dTgc_bspline_1d(Xt, knot, degree, nc, ng) result(dTgc)
integer :: i

allocate(dTgc(ng, nc))
allocate(dTgci(nc))
!$OMP PARALLEL DO PRIVATE(dTgci)
do i = 1, size(Xt)
call basis_bspline_der(Xt(i), knot, nc, degree, dTgci)
Expand Down Expand Up @@ -1654,8 +1651,7 @@ impure function compute_Tgc_nurbs_1d(Xt, knot, degree, nc, ng, Wc) result(Tgc)
real(rk), allocatable :: Tgci(:)
integer :: i

allocate(Tgc(ng, nc))
allocate(Tgci(nc))
allocate(Tgc(ng, nc), Tgci(nc))
!$OMP PARALLEL DO PRIVATE(Tgci)
do i = 1, size(Xt,1)
Tgci = basis_bspline(Xt(i), knot, nc, degree)
Expand Down
9 changes: 1 addition & 8 deletions src/forcad_nurbs_surface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2203,12 +2203,7 @@ impure function compute_dTgc_nurbs_2d(Xt, knot1, knot2, degree, nc, ng, Wc) resu
integer :: i

allocate(dTgc(ng(1)*ng(2), nc(1)*nc(2)))
allocate(dTgci(nc(1)*nc(2)))
allocate(dTgc1(nc(1)))
allocate(dTgc2(nc(2)))
allocate(Tgci(nc(1)*nc(2)))
allocate(Tgc1(nc(1)))
allocate(Tgc2(nc(2)))
allocate(Tgci(nc(1)*nc(2)), dTgci(nc(1)*nc(2)))
!$OMP PARALLEL DO PRIVATE(dTgci, dTgc1, dTgc2, Tgci, Tgc1, Tgc2)
do i = 1, size(Xt, 1)
call basis_bspline_der(Xt(i,1), knot1, nc(1), degree(1), dTgc1, Tgc1)
Expand Down Expand Up @@ -2241,8 +2236,6 @@ impure function compute_dTgc_bspline_2d(Xt, knot1, knot2, degree, nc, ng) result
integer :: i

allocate(dTgc(ng(1)*ng(2), nc(1)*nc(2)))
allocate(dTgc1(nc(1)))
allocate(dTgc2(nc(2)))
!$OMP PARALLEL DO PRIVATE(dTgc1, dTgc2)
do i = 1, size(Xt, 1)
call basis_bspline_der(Xt(i,1), knot1, nc(1), degree(1), dTgc1)
Expand Down
12 changes: 1 addition & 11 deletions src/forcad_nurbs_volume.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2888,14 +2888,7 @@ impure function compute_dTgc_nurbs_3d(Xt, knot1, knot2, knot3, degree, nc, ng, W
integer :: i

allocate(dTgc(ng(1)*ng(2)*ng(3), nc(1)*nc(2)*nc(3)))
allocate(dTgci(nc(1)*nc(2)*nc(3)))
allocate(dTgc1(nc(1)))
allocate(dTgc2(nc(2)))
allocate(dTgc2(nc(3)))
allocate(Tgci(nc(1)*nc(2)*nc(3)))
allocate(Tgc1(nc(1)))
allocate(Tgc2(nc(2)))
allocate(Tgc3(nc(3)))
allocate(Tgci(nc(1)*nc(2)*nc(3)), dTgci(nc(1)*nc(2)*nc(3)))
!$OMP PARALLEL DO PRIVATE(dTgci, dTgc1, dTgc2, dTgc3, Tgci, Tgc1, Tgc2, Tgc3)
do i = 1, size(Xt, 1)
call basis_bspline_der(Xt(i,1), knot1, nc(1), degree(1), dTgc1, Tgc1)
Expand Down Expand Up @@ -2929,9 +2922,6 @@ impure function compute_dTgc_bspline_3d(Xt, knot1, knot2, knot3, degree, nc, ng)
integer :: i

allocate(dTgc(ng(1)*ng(2)*ng(3), nc(1)*nc(2)*nc(3)))
allocate(dTgc1(nc(1)))
allocate(dTgc2(nc(2)))
allocate(dTgc3(nc(3)))
!$OMP PARALLEL DO PRIVATE(dTgc1, dTgc2, dTgc3)
do i = 1, size(Xt, 1)
call basis_bspline_der(Xt(i,1), knot1, nc(1), degree(1), dTgc1)
Expand Down

0 comments on commit cf4908e

Please sign in to comment.