DPCHCS(3)

SYNOPSIS
SUBROUTINE DPCHCS (SWITCH, N, H, SLOPE, D, INCFD, IERR)

NAME
dpchcs - Adjusts derivative values for DPCHIC

LIBRARY
SLATEC (PCHIP)

TYPE
DOUBLE PRECISION (PCHCS-S, DPCHCS-D)

AUTHOR
Fritsch, F. N., (LLNL)

DESCRIPTION
DPCHCS: DPCHIC Monotonicity Switch Derivative Setter. Called by DPCHIC to adjust the values of D in the vicinity of a switch in direction of monotonicity, to produce a more "visually pleasing" curve than that given by DPCHIM . ---------------------------------------------------------------------- Calling sequence: PARAMETER (INCFD = ...) INTEGER N, IERR DOUBLE PRECISION SWITCH, H(N), SLOPE(N), D(INCFD,N) CALL DPCHCS (SWITCH, N, H, SLOPE, D, INCFD, IERR) Parameters: SWITCH -- (input) indicates the amount of control desired over local excursions from data. N -- (input) number of data points. (assumes N.GT.2 .) H -- (input) real*8 array of interval lengths. SLOPE -- (input) real*8 array of data slopes. If the data are (X(I),Y(I)), I=1(1)N, then these inputs are: H(I) = X(I+1)-X(I), SLOPE(I) = (Y(I+1)-Y(I))/H(I), I=1(1)N-1. D -- (input) real*8 array of derivative values at the data points, as determined by DPCHCI. (output) derivatives in the vicinity of switches in direction of monotonicity may be adjusted to produce a more "visually pleasing" curve. The value corresponding to X(I) is stored in D(1+(I-1)*INCFD), I=1(1)N. No other entries in D are changed. INCFD -- (input) increment between successive values in D. This argument is provided primarily for 2-D applications. IERR -- (output) error flag. should be zero. If negative, trouble in DPCHSW. (should never happen.) ------- WARNING: This routine does no validity-checking of arguments. ------- Fortran intrinsics used: ABS, MAX, MIN.

SEE ALSO
DPCHIC

ROUTINES CALLED
DPCHST, DPCHSW

REVISION HISTORY (YYMMDD)
820218 DATE WRITTEN
820617 Redesigned to (1) fix problem with lack of continuity approaching a flat-topped peak (2) be cleaner and easier to verify. Eliminated subroutines PCHSA and PCHSX in the process.
820622 1. Limited fact to not exceed one, so computed D is a convex combination of DPCHCI value and DPCHSD value. 2. Changed fudge from 1 to 4 (based on experiments).
820623 Moved PCHSD to an inline function (eliminating MSWTYP).
820805 Converted to SLATEC library version.
870707 Corrected conversion to double precision.
870813 Minor cosmetic changes.
890411 Added SAVE statements (Vers. 3.2).
890531 Changed all specific intrinsics to generic. (WRB)
890831 Modified array declarations. (WRB)
891006 Modified spacing in computation of DFLOC. (WRB)
891006 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)
900328 Added TYPE section. (WRB)
910408 Updated AUTHOR section in prologue. (WRB)
930503 Improved purpose. (FNF)