@@ -47,8 +47,7 @@ module fitpack_curves
4747
4848 ! Estimated and actual number of knots and their allocations
4949 integer (FP_SIZE) :: nest = 0
50- integer (FP_SIZE) :: lwrk = 0
51- real (FP_REAL), allocatable :: wrk(:),wrk_fou(:,:)
50+ real (FP_REAL), allocatable :: wrk_fou(:,:)
5251
5352 ! Curve extrapolation behavior
5453 integer (FP_FLAG) :: bc = OUTSIDE_NEAREST_BND
@@ -156,15 +155,13 @@ elemental subroutine destroy(this)
156155 deallocate (this% y,stat= ierr)
157156 deallocate (this% w,stat= ierr)
158157 deallocate (this% sp,stat= ierr)
159- deallocate (this% wrk,stat= ierr)
160158 deallocate (this% wrk_fou,stat= ierr)
161159 deallocate (this% t,stat= ierr)
162160 this% xleft = zero
163161 this% xright = zero
164162
165163 this% order = 3
166164 this% nest = 0
167- this% lwrk = 0
168165 this% knots = 0
169166 this% bc = OUTSIDE_NEAREST_BND
170167
@@ -615,16 +612,15 @@ end function zeros
615612 elemental integer (FP_SIZE) function curve_comm_size(this)
616613 class(fitpack_curve), intent (in ) :: this
617614
618- ! Base fields (iopt, smoothing, fp, c, iwrk)
619- ! Curve-specific scalars: m, order, knots, bc, nest, lwrk, xleft, xright (8 values)
615+ ! Base fields (iopt, smoothing, fp, c, iwrk, wrk )
616+ ! Curve-specific scalars: m, order, knots, bc, nest, xleft, xright (7 values)
620617 curve_comm_size = this% core_comm_size() &
621- + 8 &
618+ + 7 &
622619 + FP_COMM_SIZE(this% x) &
623620 + FP_COMM_SIZE(this% y) &
624621 + FP_COMM_SIZE(this% sp) &
625622 + FP_COMM_SIZE(this% w) &
626623 + FP_COMM_SIZE(this% t) &
627- + FP_COMM_SIZE(this% wrk) &
628624 + FP_COMM_SIZE(this% wrk_fou)
629625
630626 end function curve_comm_size
@@ -646,7 +642,6 @@ pure subroutine curve_comm_pack(this, buffer)
646642 buffer(pos) = real (this% knots, FP_COMM); pos = pos + 1
647643 buffer(pos) = real (this% bc, FP_COMM); pos = pos + 1
648644 buffer(pos) = real (this% nest, FP_COMM); pos = pos + 1
649- buffer(pos) = real (this% lwrk, FP_COMM); pos = pos + 1
650645 buffer(pos) = this% xleft; pos = pos + 1
651646 buffer(pos) = this% xright; pos = pos + 1
652647
@@ -656,7 +651,6 @@ pure subroutine curve_comm_pack(this, buffer)
656651 call FP_COMM_PACK(this% sp, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% sp)
657652 call FP_COMM_PACK(this% w, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% w)
658653 call FP_COMM_PACK(this% t, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% t)
659- call FP_COMM_PACK(this% wrk, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% wrk)
660654 call FP_COMM_PACK(this% wrk_fou, buffer(pos:))
661655
662656 end subroutine curve_comm_pack
@@ -678,7 +672,6 @@ pure subroutine curve_comm_expand(this, buffer)
678672 this% knots = nint (buffer(pos), FP_SIZE); pos = pos + 1
679673 this% bc = nint (buffer(pos), FP_FLAG); pos = pos + 1
680674 this% nest = nint (buffer(pos), FP_SIZE); pos = pos + 1
681- this% lwrk = nint (buffer(pos), FP_SIZE); pos = pos + 1
682675 this% xleft = buffer(pos); pos = pos + 1
683676 this% xright = buffer(pos); pos = pos + 1
684677
@@ -688,7 +681,6 @@ pure subroutine curve_comm_expand(this, buffer)
688681 call FP_COMM_EXPAND(this% sp, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% sp)
689682 call FP_COMM_EXPAND(this% w, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% w)
690683 call FP_COMM_EXPAND(this% t, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% t)
691- call FP_COMM_EXPAND(this% wrk, buffer(pos:)); pos = pos + FP_COMM_SIZE(this% wrk)
692684 call FP_COMM_EXPAND(this% wrk_fou, buffer(pos:))
693685
694686 end subroutine curve_comm_expand
0 commit comments