HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Evaluate the parabolic term using a "1.5"-stage discretization. More...
#include <stdlib.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
int | ParabolicFunctionNC1_5Stage (double *par, double *u, void *s, void *m, double t) |
Evaluate the parabolic term using a "1.5"-stage discretization.
Definition in file ParabolicFunctionNC1.5Stage.c.
int ParabolicFunctionNC1_5Stage | ( | double * | par, |
double * | u, | ||
void * | s, | ||
void * | m, | ||
double | t | ||
) |
Evaluate the parabolic term using a "1.5"-stage finite-difference spatial discretization: The parabolic term is assumed to be of the form:
\begin{equation} {\bf P}\left({\bf u}\right) = \sum_{d1=0}^{D-1}\sum_{d2=0}^{D-1} \frac {\partial^2 h_{d1,d2}\left(\bf u\right)} {\partial x_{d1} \partial x_{d2}}, \end{equation}
where \(d1\) and \(d2\) are spatial dimension indices, and \(D\) is the total number of spatial dimensions (HyPar::ndims). This term is discretized at a grid point as:
\begin{equation} \left.{\bf P}\left({\bf u}\right)\right|_j = \sum_{d1=0}^{D-1} \sum_{d2=0}^{D-1} \frac { \mathcal{D}_{d1}\mathcal{D}_{d2} \left[ {\bf h}_{d1,d2} \right] } {\Delta x_{d1} \Delta x_{d2}}, \end{equation}
where \(\mathcal{D}\) denotes the finite-difference approximation to the first derivative.
Note: this form of the parabolic term does allow for cross-derivatives ( \( d1 \ne d2 \)).
To use this form of the parabolic term:
par | array to hold the computed parabolic term |
u | solution |
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
t | Current simulation time |
Definition at line 35 of file ParabolicFunctionNC1.5Stage.c.