HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains functions to compute the upwind flux at grid interfaces for the Vlasov equations. More...
#include <stdlib.h>
#include <math.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <mathfunctions.h>
#include <physicalmodels/vlasov.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
double | VlasovAdvectionCoeff (int *, int, void *) |
int | VlasovUpwind (double *fI, double *fL, double *fR, double *uL, double *uR, double *u, int dir, void *s, double t) |
Contains functions to compute the upwind flux at grid interfaces for the Vlasov equations.
Definition in file VlasovUpwind.c.
double VlasovAdvectionCoeff | ( | int * | idx, |
int | dir, | ||
void * | s | ||
) |
Returns the advection coefficient at a given grid index \(c\), where
\begin{equation} c = v_i, \end{equation}
if dir < Vlasov::ndims_x ( \(i = {\rm dir}\)), and
\begin{equation} c = E_i, \end{equation}
the electric field if dir >= Vlasov::ndims_x ( \(i = \) dir-Vlasov::ndims_x).
Note: this function assumes that the electric field has already been set.
idx | grid index |
dir | Spatial dimension |
s | Solver object of type HyPar |
Definition at line 28 of file VlasovAdvectionCoeff.c.
int VlasovUpwind | ( | double * | fI, |
double * | fL, | ||
double * | fR, | ||
double * | uL, | ||
double * | uR, | ||
double * | u, | ||
int | dir, | ||
void * | s, | ||
double | t | ||
) |
Upwinding scheme for the Vlasov equations
fI | Computed upwind interface flux |
fL | Left-biased reconstructed interface flux |
fR | Right-biased reconstructed interface flux |
uL | Left-biased reconstructed interface solution |
uR | Right-biased reconstructed interface solution |
u | Cell-centered solution |
dir | Spatial dimension |
s | Solver object of type HyPar |
t | Current solution time |
Definition at line 17 of file VlasovUpwind.c.