HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the function to compute the hyperbolic flux for the Vlasov equations over the domain. More...
#include <math.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <physicalmodels/vlasov.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
double | VlasovAdvectionCoeff (int *, int, void *) |
int | VlasovAdvection (double *f, double *u, int dir, void *s, double t) |
Contains the function to compute the hyperbolic flux for the Vlasov equations over the domain.
Definition in file VlasovAdvection.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 VlasovAdvection | ( | double * | f, |
double * | u, | ||
int | dir, | ||
void * | s, | ||
double | t | ||
) |
Compute the hyperbolic flux over the local domain.
\begin{equation} {\bf F}\left({\bf u}(x,v)\right) = c {\bf u}(x,v), \end{equation}
where the advection coefficient \(c\) is computed by VlasovAdvectionCoeff().
f | Array to hold the computed flux (same size and layout as u) |
u | Array containing the conserved solution |
dir | Spatial dimension |
s | Solver object of type HyPar |
t | Current time |
Definition at line 22 of file VlasovAdvection.c.