/* ptrepl.f -- translated by f2c (version 20000817). You must link the resulting object file with the libraries: -lf2c -lm (in that order) */ #include "f2c.h" #include "blaswrap.h" /* Common Block Declarations */ struct { integer iout, iprint; doublereal mcheps, cnstol; } dfocm_; #define dfocm_1 dfocm_ /* Table of constant values */ static integer c__1 = 1; /* Copyright (C) 2000, International Business Machines */ /* Corporation and others. All Rights Reserved. */ /* Subroutine */ int ptrepl_(xnew, ipoly, vnew, pntint, poly, nind, n, lpoly, lptint) doublereal *xnew; integer *ipoly; doublereal *vnew, *pntint, *poly; integer *nind, *n, *lpoly, *lptint; { /* Format strings */ static char fmt_1000[] = "(\002PTREPL **** TRYING TO REPLACE A POINT\ \002,/,\002 IN THE LINEAR BLOCK, IPOLY=\002,i6)"; /* System generated locals */ integer i__1, i__2; /* Builtin functions */ integer s_wsfe(), do_fio(), e_wsfe(); /* Subroutine */ int s_stop(); /* Local variables */ static integer i__, j, k, block, npbeg, npend; extern /* Subroutine */ int evalx_(); static integer dd; extern /* Subroutine */ int nextnp_(); static integer np1; static doublereal val; /* Fortran I/O blocks */ static cilist io___4 = { 0, 0, 0, fmt_1000, 0 }; /* ********************************************************************** */ /* THIS SUBROUTINE REPLACES A POINT WITH A GIVEN INDEX IN THE INTERPOLATION */ /* SET BY ANOTHER GIVEN POINT AND UPDATES NEWTON FUNDAMENTAL POLYNOMIALS */ /* ACCORDINGLY. IT CAN ALSO BE USED TO ADD A POINT TO AN INCOMPLETE */ /* INTERPOLATION SET, THIS CAN BE DONE BY SETTING INDEX */ /* IPOLY = NIND+1 = NUMBER OF INTERPOLATION POINTS + 1. */ /* IF THE INTERPOLATION IS QUADRATIC ( NIND > N+1 ) THEN WE ARE ALLOWED */ /* TO REPLACE POINTS ONLY IN THE QUADRATIC BLOCK, THUS IPOLY > N + 1. */ /* PARAMETERS */ /* POLY (INPUT/OUTPUT) THE SET OF NEWTON FUNDAMENTAL POLYNOMIALS */ /* XNEW (INPUT) POINT THAT IS INTRODUCED INTO THE SET */ /* IPOLY (INPUT) THE INDEX OF THE POINT THAT HAS TO BE REPLACED */ /* VNEW (INPUT) VALUE OF IPOLY-TH POLYNOMIAL AT XGNEW */ /* PNTINT (INPUT) SET OF INTERPOLATION POINTS */ /* NIND (INPUT) NUMBER OF INTERPOLATION POINTS */ /* N (INPUT) PROBLEM DIMENSION */ /* ******************************************************************** */ /* PARAMETERS */ /* COMMON VARIABLES */ /* LOCAL VARIABLES */ /* SUBROUTINES AND FUNCTIONS CALLED: */ /* APPLICATION : NEXTNP, EVALX */ /* FORTRAN SUPPLIED: ABS */ /* Parameter adjustments */ --xnew; --poly; --pntint; /* Function Body */ np1 = *n + 1; dd = np1 * (*n + 2) / 2; /* CHECK TO WHICH BLOCK WE ARE ADDING THE POINT, CLEARLY NIND