Commit 7cd4fb54 authored by alge's avatar alge
Browse files

first steps toward resync with tripacks fortran code. necessary for alpha!

parent abdc7e6a
......@@ -87,7 +87,8 @@
ier = integer(1),
double(36 * n),
integer(25 * n),
extrap = as.logical(extrap)
extrap = as.logical(extrap),
near =
)
temp <- ans[c("x", "y", "z", "extrap")]
if(miss)
......
SUBROUTINE SDBI3P(MD,NDP,XD,YD,ZD,NIP,XI,YI, ZI,IER, WK,IWK,
+ EXTRPI)
+ EXTRPI,NEAR,NEXT,DIST)
*
* Scattered-data bivariate interpolation
* (a master subroutine of the SDBI3P/SDSF3P subroutine package)
......@@ -82,7 +82,8 @@
* ..
* .. Array Arguments ..
DOUBLE PRECISION WK(NDP,17),XD(NDP),XI(NIP),YD(NDP),
+ YI(NIP),ZD(NDP),ZI(NIP)
+ YI(NIP),ZD(NDP),ZI(NIP),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
INTEGER IWK(NDP,25)
LOGICAL EXTRPI(NIP)
* ..
......@@ -112,7 +113,8 @@
* Triangulates the x-y plane. (for MD=1)
IF (MD.NE.2 .AND. MD.NE.3) THEN
CALL SDTRAN(NDP,XD,YD, NT,IWK(1,1),NL,IWK(1,7),IERT,
+ IWK(1,1),IWK(1,7),IWK(1,13),IWK(1,14),IWK(1,9))
+ IWK(1,1),IWK(1,7),IWK(1,13),IWK(1,14),IWK(1,9),
+ NEAR,NEXT,DIST)
* CALL SDTRAN(NDP,XD,YD, NT,IPT,NL,IPL,IERT,
* + LIST,LPTR,LEND,LTRI,ITL)
IF (IERT.GT.0) GO TO 50
......@@ -163,7 +165,7 @@
SUBROUTINE SDSF3P(MD,NDP,XD,YD,ZD,NXI,XI,NYI,YI, ZI,IER, WK,IWK,
+ EXTRPI)
+ EXTRPI,NEAR,NEXT,DIST)
*
* Scattered-data smooth surface fitting
* (a master subroutine of the SDBI3P/SDSF3P subroutine package)
......@@ -250,7 +252,8 @@
* ..
* .. Array Arguments ..
DOUBLE PRECISION WK(NDP,17),XD(NDP),XI(NXI),YD(NDP),
+ YI(NYI),ZD(NDP),ZI(NXI,NYI)
+ YI(NYI),ZD(NDP),ZI(NXI,NYI),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
INTEGER IWK(NDP,25)
LOGICAL EXTRPI(NXI,NYI)
* ..
......@@ -282,7 +285,8 @@
* Triangulates the x-y plane. (for MD=1)
IF (MD.NE.2 .AND. MD.NE.3) THEN
CALL SDTRAN(NDP,XD,YD, NT,IWK(1,1),NL,IWK(1,7),IERT,
+ IWK(1,1),IWK(1,7),IWK(1,13),IWK(1,14),IWK(1,9))
+ IWK(1,1),IWK(1,7),IWK(1,13),IWK(1,14),IWK(1,9),
+ NEAR,NEXT,DIST)
* CALL SDTRAN(NDP,XD,YD, NT,IPT,NL,IPL,IERT,
* + LIST,LPTR,LEND,LTRI,ITL)
IF (IERT.GT.0) GO TO 80
......@@ -344,7 +348,7 @@
SUBROUTINE SDTRAN(NDP,XD,YD, NT,IPT,NL,IPL,IERT, LIST,LPTR,LEND,
+ LTRI,ITL)
+ LTRI,ITL,NEAR,NEXT,DIST)
*
* Triangulation of the data area in a plane with a scattered data
* point set
......@@ -411,7 +415,8 @@
INTEGER IERT,NDP,NL,NT
* ..
* .. Array Arguments ..
DOUBLE PRECISION XD(NDP),YD(NDP)
DOUBLE PRECISION XD(NDP),YD(NDP),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
INTEGER IPL(2,*),IPT(3,*),ITL(NDP),LEND(NDP),LIST(6,NDP),
+ LPTR(6,NDP),LTRI(12,NDP)
* ..
......@@ -423,7 +428,7 @@
* ..
* Basic triangulation
CALL SDTRCH(NDP,XD,YD, NT,IPT,NL,IPL,IERTM,IERTL, LIST,LPTR,LEND,
+ LTRI)
+ LTRI,NEAR,NEXT,DIST)
IF (IERTM.NE.0) GO TO 10
IF (IERTL.NE.0) GO TO 20
IERT = 0
......@@ -467,7 +472,7 @@
SUBROUTINE SDTRCH(NDP,XD,YD, NT,IPT,NL,IPL,IERTM,IERTL,
+ LIST,LPTR,LEND,LTRI)
+ LIST,LPTR,LEND,LTRI,NEAR,NEXT,DIST)
*
* Basic triangulation in the convex hull of a scattered data point
* set in a plane
......@@ -531,6 +536,8 @@
* LTRI = two-dimensional integer array of dimension 12*NDP
* used internally as a work area.
*
* agebhard@uni-klu.ac.at: added from new TRIPACK:
* NEAR, NEXT, DIST work arrays from TRMESH, size NDP
*
* Specification statements
* .. Parameters ..
......@@ -541,7 +548,8 @@
INTEGER IERTL,IERTM,NDP,NL,NT
* ..
* .. Array Arguments ..
DOUBLE PRECISION XD(NDP),YD(NDP)
DOUBLE PRECISION XD(NDP),YD(NDP),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
INTEGER IPL(2,*),IPT(3,*),LEND(NDP),LIST(*),LPTR(*),
+ LTRI(NROW,*)
* ..
......@@ -558,7 +566,7 @@
INTRINSIC MOD
* ..
* Performs basic triangulation.
CALL TRMESH(NDP,XD,YD, LIST,LPTR,LEND,LNEW,IERTM)
CALL TRMESH(NDP,XD,YD, LIST,LPTR,LEND,LNEW,NEAR,NEXT,DIST,IERTM)
IF (IERTM.NE.0) RETURN
CALL TRLIST(NCC,LCC,NDP,LIST,LPTR,LEND,NROW, NT,LTRI,LCT,IERTL)
IF (IERTL.NE.0) RETURN
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment