HyPar  1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
secondderivative.h
Go to the documentation of this file.
1 
6 #ifndef _SECOND_DERIV_H_
7 #define _SECOND_DERIV_H_
8 
10 #define _SECOND_ORDER_CENTRAL_ "2"
11 
12 #define _FOURTH_ORDER_CENTRAL_ "4"
13 
14 /* One-dimensional second derivative functions: Functions to calculate the
15  * finite-difference approximation to the second derivative along a given
16  * dimension at the cell-centers / grid points.
17  *
18  * Arguments:-
19  *
20  * Df double* array containing the approximation to the second derivative
21  * (1D array representing an n-D solution)
22  *
23  * f double* array containing the function whose second derivative is to
24  * be computed.
25  * (1D array representing an n-D solution)
26  *
27  * dir int dimension (x/y/z/...) along which to compute the second derivative
28  *
29  * s void* pointer to an object providing the solver context. The object must
30  * contain at least the following:
31  * ndims int number of dimensions
32  * nvars int number of elements at each grid location
33  * dim int* array of grid size along each dimension
34  * (integer array of size ndims)
35  * ghosts int number of ghost points
36  *
37  * m void* Pointer to an object providing the MPI context. Current not being
38  * used. This will be required for compact finite-difference methods.
39  *
40  *
41  * Notes:
42  *
43  * + Df and f are arrays with halos / ghost points. However, the second derivative is computed
44  * only in the interior. So the ghost points of Df contain uninitialized/unusable values.
45 */
46 
47 /* Second derivative functions */
48 int SecondDerivativeSecondOrderCentral (double*,double*,int,void*,void*);
49 int SecondDerivativeFourthOrderCentral (double*,double*,int,void*,void*);
51 int SecondDerivativeSecondOrderCentralNoGhosts (double*,double*,int,int,int*,int,int,void*);
53 #endif
int SecondDerivativeFourthOrderCentral(double *, double *, int, void *, void *)
int SecondDerivativeSecondOrderCentralNoGhosts(double *, double *, int, int, int *, int, int, void *)
int SecondDerivativeSecondOrderCentral(double *, double *, int, void *, void *)