diff --git a/src/forcad_nurbs_curve.f90 b/src/forcad_nurbs_curve.f90 index b763477e9..c32154b87 100644 --- a/src/forcad_nurbs_curve.f90 +++ b/src/forcad_nurbs_curve.f90 @@ -1596,12 +1596,11 @@ impure function compute_dTgc_nurbs_1d(Xt, knot, degree, nc, ng, Wc) result(dTgc) integer :: i allocate(dTgc(ng, nc)) - + allocate(dTgci(nc)) !$OMP PARALLEL DO PRIVATE(dTgci) do i = 1, size(Xt) dTgci = basis_bspline_der(Xt(i), knot, nc, degree) - dTgci = dTgci*(Wc/(dot_product(dTgci,Wc))) - dTgc(i,:) = dTgci + dTgc(i,:) = dTgci*(Wc/(dot_product(dTgci,Wc))) end do !$OMP END PARALLEL DO end function @@ -1651,11 +1650,11 @@ impure function compute_Tgc_nurbs_1d(Xt, knot, degree, nc, ng, Wc) result(Tgc) integer :: i allocate(Tgc(ng, nc)) + allocate(Tgci(nc)) !$OMP PARALLEL DO PRIVATE(Tgci) do i = 1, size(Xt,1) Tgci = basis_bspline(Xt(i), knot, nc, degree) - Tgci = Tgci*(Wc/(dot_product(Tgci,Wc))) - Tgc(i,:) = Tgci + Tgc(i,:) = Tgci*(Wc/(dot_product(Tgci,Wc))) end do !$OMP END PARALLEL DO end function diff --git a/src/forcad_nurbs_surface.f90 b/src/forcad_nurbs_surface.f90 index f6622b349..1a7d776cb 100644 --- a/src/forcad_nurbs_surface.f90 +++ b/src/forcad_nurbs_surface.f90 @@ -2202,14 +2202,13 @@ 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))) !$OMP PARALLEL DO PRIVATE(dTgci) do i = 1, size(Xt, 1) dTgci = kron(& basis_bspline_der(Xt(i,2), knot2, nc(2), degree(2)),& basis_bspline_der(Xt(i,1), knot1, nc(1), degree(1))) - dTgci = dTgci*(Wc/(dot_product(dTgci,Wc))) - dTgc(i,:) = dTgci + dTgc(i,:) = dTgci*(Wc/(dot_product(dTgci,Wc))) end do !$OMP END PARALLEL DO end function @@ -2261,13 +2260,13 @@ impure function compute_Tgc_nurbs_2d(Xt, knot1, knot2, degree, nc, ng, Wc) resul integer :: i allocate(Tgc(ng(1)*ng(2), nc(1)*nc(2))) + allocate(Tgci(nc(1)*nc(2))) !$OMP PARALLEL DO PRIVATE(Tgci) do i = 1, size(Xt, 1) Tgci = kron(& basis_bspline(Xt(i,2), knot2, nc(2), degree(2)),& basis_bspline(Xt(i,1), knot1, nc(1), degree(1))) - Tgci = Tgci*(Wc/(dot_product(Tgci,Wc))) - Tgc(i,:) = Tgci + Tgc(i,:) = Tgci*(Wc/(dot_product(Tgci,Wc))) end do !$OMP END PARALLEL DO end function diff --git a/src/forcad_nurbs_volume.f90 b/src/forcad_nurbs_volume.f90 index e156957f0..cc9215ca7 100644 --- a/src/forcad_nurbs_volume.f90 +++ b/src/forcad_nurbs_volume.f90 @@ -2694,14 +2694,13 @@ 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))) !$OMP PARALLEL DO PRIVATE(dTgci) do i = 1, size(Xt, 1) dTgci = kron(basis_bspline_der(Xt(i,3), knot3, nc(3), degree(3)), kron(& basis_bspline_der(Xt(i,2), knot2, nc(2), degree(2)),& basis_bspline_der(Xt(i,1), knot1, nc(1), degree(1)))) - dTgci = dTgci*(Wc/(dot_product(dTgci,Wc))) - dTgc(i,:) = dTgci + dTgc(i,:) = dTgci*(Wc/(dot_product(dTgci,Wc))) end do !$OMP END PARALLEL DO end function @@ -2753,13 +2752,13 @@ impure function compute_Tgc_nurbs_3d(Xt, knot1, knot2, knot3, degree, nc, ng, Wc integer :: i allocate(Tgc(ng(1)*ng(2)*ng(3), nc(1)*nc(2)*nc(3))) + allocate(Tgci(nc(1)*nc(2)*nc(3))) !$OMP PARALLEL DO PRIVATE(Tgci) do i = 1, size(Xt, 1) Tgci = kron(basis_bspline(Xt(i,3), knot3, nc(3), degree(3)), kron(& basis_bspline(Xt(i,2), knot2, nc(2), degree(2)),& basis_bspline(Xt(i,1), knot1, nc(1), degree(1)))) - Tgci = Tgci*(Wc/(dot_product(Tgci,Wc))) - Tgc(i,:) = Tgci + Tgc(i,:) = Tgci*(Wc/(dot_product(Tgci,Wc))) end do !$OMP END PARALLEL DO end function