HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Compute the coefficients of a non-linear interpolation method (such as WENO, CRWENO) 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 | NonLinearInterpolation (double *u, void *s, void *m, double t, int(*FluxFunction)(double *, double *, int, void *, double)) |
Compute the coefficients of a non-linear interpolation method (such as WENO, CRWENO)
Definition in file NonLinearInterpolation.c.
int NonLinearInterpolation | ( | double * | u, |
void * | s, | ||
void * | m, | ||
double | t, | ||
int(*)(double *, double *, int, void *, double) | FluxFunction | ||
) |
Compute the interpolation coefficients of a nonlinear interpolation method, based on the smoothness of the flux function of the solution passed as an argument. This function is provided separately so that these coefficients can be pre-computed and stored for future use.
In the implementation of non-linear methods (such as WENO5), the calculation of the non-linear coefficients, and the actual evaluation of the interpolant are separated into different functions. This provides flexibility on when the nonlinear coefficients are evaluated. Some scenarios are as follows:
u | Solution array |
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
t | Current solution time |
FluxFunction | The flux function \({\bf f}_d\left({\bf u}\right)\), whose properties (typically smoothness) is used to evaluate the nonlinear coefficients |
Definition at line 28 of file NonLinearInterpolation.c.