|
HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Function to evaluate the diffusion term in the linear advection-diffusion-reaction model. More...
#include <stdlib.h>#include <basic.h>#include <arrayfunctions.h>#include <physicalmodels/linearadr.h>#include <mpivars.h>#include <hypar.h>Go to the source code of this file.
Functions | |
| int | LinearADRDiffusionG (double *f, double *u, int dir, void *s, double t) |
| int | LinearADRDiffusionH (double *f, double *u, int dir1, int dir2, void *s, double t) |
Function to evaluate the diffusion term in the linear advection-diffusion-reaction model.
Definition in file LinearADRDiffusion.c.
| int LinearADRDiffusionG | ( | double * | f, |
| double * | u, | ||
| int | dir, | ||
| void * | s, | ||
| double | t | ||
| ) |
Evaluate the diffusion term in the linear advection-diffusion-reaction model for a "pure Laplacian" type operator (no cross derivatives):
Compute
\begin{equation} \nu_d u \end{equation}
given \(u\) and \(d\) in the parabolic term
\begin{equation} \sum_d \frac {\partial^2} {\partial x_d^2} \left( \nu_d u \right) \end{equation}
| f | Array to hold the computed diffusion term (same size and layout as u) |
| u | Array containing the solution |
| dir | Spatial dimension (unused since this is a 1D system) |
| s | Solver object of type HyPar |
| t | Current time |
Definition at line 26 of file LinearADRDiffusion.c.
| int LinearADRDiffusionH | ( | double * | f, |
| double * | u, | ||
| int | dir1, | ||
| int | dir2, | ||
| void * | s, | ||
| double | t | ||
| ) |
Evaluate the diffusion term in the linear advection-diffusion-reaction model for a parabolic operator with no cross derivatives:
Compute
\begin{equation} \nu_d u \end{equation}
given \(u\) and \(d_1,d_2\) in the parabolic term
\begin{equation} \sum_{d_1}\sum_{d_2} \frac {\partial^2} {\partial x_{d_1} \partial x_{d_2}} \left( \nu_d u \right) \end{equation}
Note: it's not correctly implemented. Will implement when necessary.
| f | Array to hold the computed diffusion term (same size and layout as u) |
| u | Array containing the solution |
| dir1 | First spatial dimension of the double derivative \(d_1\) |
| dir2 | Second spatial dimension of the double derivative \(d_2\) |
| s | Solver object of type HyPar |
| t | Current time |
Definition at line 74 of file LinearADRDiffusion.c.