Commit 7bd8aeb4 authored by agebhard's avatar agebhard
Browse files

updated to use the same TRIPACK functions as package tripack.

works also with crosslinking aklima against tripack (R-genlibs patch at
ftp://ftp-stat.uni.klu.ac.at/pub/R/contrib). In this case src/tripack.f
can be removed.
parent 12501e0d
......@@ -74,7 +74,6 @@
}
ans <- .Fortran("sdsf3p",
as.integer(1),
# as.integer(ncp),
as.integer(n),
as.double(x),
as.double(y),
......@@ -88,6 +87,9 @@
double(36 * n),
integer(25 * n),
extrap = as.logical(extrap),
near = integer(n),
nxt = integer(n),
dist = double(n),
PACKAGE = "akima")
temp <- ans[c("x", "y", "z", "extrap")]
if(miss)
......
......@@ -69,7 +69,8 @@
z = zo,
integer((31 + ncp) * n + nx * ny),
double(5 * n),
misso = as.logical(misso))
misso = as.logical(misso),
PACKAGE = "akima")
temp <- ans[c("x", "y", "z", "misso")]
temp$z[temp$misso]<-NA
temp[c("x", "y", "z")]
......
......@@ -73,7 +73,11 @@
z = zo,
double(17 * n),
integer(25 * n),
extrap = as.logical(extrap))
extrap = as.logical(extrap),
near = integer(n),
net = integer(n),
dist = double(n),
PACKAGE = "akima")
temp <- ans[c("x", "y", "z", "extrap")]
if(miss)
temp$z[temp$extrap]<-NA
......
......@@ -73,7 +73,8 @@
z = zo,
integer((31 + ncp) * n + np),
double(8 * n),
misso = as.logical(misso))
misso = as.logical(misso),
PACKAGE = "akima")
temp <- ans[c("x", "y", "z", "misso")]
temp$z[temp$misso]<-NA
temp[c("x", "y", "z")]
......
......@@ -48,6 +48,9 @@
* IWK = two-dimensional integer array of dimension NDP*25
* used internally as a work area.
*
* agebhard@uni-klu.ac.at: added from new TRIPACK:
* NEAR, NEXT, DIST work arrays from TRMESH, size NDP
*
* The very first call to this subroutine and the call with a new
* NDP value or new XD and YD arrays must be made with MD=1. The
* call with MD=2 must be preceded by another call with the same
......@@ -78,12 +81,12 @@
PARAMETER (NIPIMX=51)
* ..
* .. Scalar Arguments ..
INTEGER IER,MD,NDP,NIP
INTEGER IER,MD,NDP,NIP,NEAR(NDP),NEXT(NDP)
* ..
* .. Array Arguments ..
DOUBLE PRECISION WK(NDP,17),XD(NDP),XI(NIP),YD(NDP),
+ YI(NIP),ZD(NDP),ZI(NIP),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
+ YI(NIP),ZD(NDP),ZI(NIP),DIST(NDP)
INTEGER IWK(NDP,25)
LOGICAL EXTRPI(NIP)
* ..
......@@ -218,6 +221,9 @@
* IWK = two-dimensional integer array of dimension NDP*25
* used internally as a work area.
*
* agebhard@uni-klu.ac.at: added from new TRIPACK:
* NEAR, NEXT, DIST work arrays from TRMESH, size NDP
*
* The very first call to this subroutine and the call with a new
* NDP value or new XD and YD arrays must be made with MD=1. The
* call with MD=2 must be preceded by another call with the same
......@@ -248,12 +254,11 @@
PARAMETER (NIPIMX=51)
* ..
* .. Scalar Arguments ..
INTEGER IER,MD,NDP,NXI,NYI
INTEGER IER,MD,NDP,NXI,NYI,NEAR(NDP),NEXT(NDP)
* ..
* .. Array Arguments ..
DOUBLE PRECISION WK(NDP,17),XD(NDP),XI(NXI),YD(NDP),
+ YI(NYI),ZD(NDP),ZI(NXI,NYI),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
+ YI(NYI),ZD(NDP),ZI(NXI,NYI),DIST(NDP)
INTEGER IWK(NDP,25)
LOGICAL EXTRPI(NXI,NYI)
* ..
......@@ -409,14 +414,16 @@
* ITL = integer array of dimension 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
* .. Scalar Arguments ..
INTEGER IERT,NDP,NL,NT
INTEGER IERT,NDP,NL,NT,NEAR(NDP),NEXT(NDP)
* ..
* .. Array Arguments ..
DOUBLE PRECISION XD(NDP),YD(NDP),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
DOUBLE PRECISION XD(NDP),YD(NDP),DIST(NDP)
INTEGER IPL(2,*),IPT(3,*),ITL(NDP),LEND(NDP),LIST(6,NDP),
+ LPTR(6,NDP),LTRI(12,NDP)
* ..
......@@ -545,11 +552,10 @@
PARAMETER (NCC=0,NROW=6)
* ..
* .. Scalar Arguments ..
INTEGER IERTL,IERTM,NDP,NL,NT
INTEGER IERTL,IERTM,NDP,NL,NT,NEAR(NDP),NEXT(NDP)
* ..
* .. Array Arguments ..
DOUBLE PRECISION XD(NDP),YD(NDP),NEAR(NDP),NEXT(NDP),
+ DIST(NDP)
DOUBLE PRECISION XD(NDP),YD(NDP),DIST(NDP)
INTEGER IPL(2,*),IPT(3,*),LEND(NDP),LIST(*),LPTR(*),
+ LTRI(NROW,*)
* ..
......
This diff is collapsed.
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