Vcap class

Collection of routines which cap certain exponential and hyperbolic functions. More...

Files

file  vcap.h
 

Contains declarations for class Vcap.


file  vcap.c
 

Class Vcap methods.


Defines

#define EXPMAX   85.00
 Maximum argument for exp(), sinh(), or cosh().
#define EXPMIN   -85.00
 Minimum argument for exp(), sinh(), or cosh().

Functions

double Vcap_exp (double x, int *ichop)
 Provide a capped exp() function.
double Vcap_sinh (double x, int *ichop)
 Provide a capped sinh() function.
double Vcap_cosh (double x, int *ichop)
 Provide a capped cosh() function.

Detailed Description

Collection of routines which cap certain exponential and hyperbolic functions.

Note:
These routines are based on FORTRAN code by Mike Holst

Function Documentation

double Vcap_cosh ( double  x,
int *  ichop 
)

Provide a capped cosh() function.

If the argument x of Vcap_cosh() exceeds EXPMAX or EXPMIN, then we return cosh(EXPMAX) or cosh(EXPMIN) rather than cosh(x).

Note:
Original FORTRAN routine from PMG library by Mike Holst Original notes: to control overflow in the hyperbolic and exp functions, note that the following are the argument limits of the various functions on various machines after which overflow occurs: Convex C240, Sun 3/60, Sun SPARC, IBM RS/6000: sinh, cosh, exp: maximal argument (abs value) = 88.0d0 dsinh, dcosh, dexp: maximal argument (abs value) = 709.0d0
Author:
Nathan Baker (based on FORTRAN code by Mike Holst)
Returns:
cosh(x) or capped equivalent
Parameters:
x Argument to cosh()
ichop Set to 1 if function capped, 0 otherwise

References EXPMAX, and EXPMIN.

double Vcap_exp ( double  x,
int *  ichop 
)

Provide a capped exp() function.

If the argument x of Vcap_exp() exceeds EXPMAX or EXPMIN, then we return exp(EXPMAX) or exp(EXPMIN) rather than exp(x).

Note:
Original FORTRAN routine from PMG library by Mike Holst Original notes: to control overflow in the hyperbolic and exp functions, note that the following are the argument limits of the various functions on various machines after which overflow occurs: Convex C240, Sun 3/60, Sun SPARC, IBM RS/6000: sinh, cosh, exp: maximal argument (abs value) = 88.0d0 dsinh, dcosh, dexp: maximal argument (abs value) = 709.0d0
Author:
Nathan Baker (based on FORTRAN code by Mike Holst)
Returns:
exp(x) or capped equivalent
Parameters:
x Argument to exp()
ichop Set to 1 if function capped, 0 otherwise

References EXPMAX, and EXPMIN.

Referenced by Vfetk_fillArray(), Vfetk_PDE_Ju(), Vpmg_fillArray(), Vpmg_ibForce(), and Vpmg_qmEnergySMPBE().

double Vcap_sinh ( double  x,
int *  ichop 
)

Provide a capped sinh() function.

If the argument x of Vcap_sinh() exceeds EXPMAX or EXPMIN, then we return sinh(EXPMAX) or sinh(EXPMIN) rather than sinh(x).

Note:
Original FORTRAN routine from PMG library by Mike Holst Original notes: to control overflow in the hyperbolic and exp functions, note that the following are the argument limits of the various functions on various machines after which overflow occurs: Convex C240, Sun 3/60, Sun SPARC, IBM RS/6000: sinh, cosh, exp: maximal argument (abs value) = 88.0d0 dsinh, dcosh, dexp: maximal argument (abs value) = 709.0d0
Author:
Nathan Baker (based on FORTRAN code by Mike Holst)
Returns:
sinh(x) or capped equivalent
Parameters:
x Argument to sinh()
ichop Set to 1 if function capped, 0 otherwise

References EXPMAX, and EXPMIN.


Generated by  doxygen 1.6.2