HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Initialize the Vlasov module. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <bandedmatrix.h>
#include <physicalmodels/vlasov.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
double | VlasovComputeCFL (void *, void *, double, double) |
int | VlasovAdvection (double *, double *, int, void *, double) |
int | VlasovUpwind (double *, double *, double *, double *, double *, double *, int, void *, double) |
int | VlasovWriteEFieldAndPotential (void *, void *, double) |
int | VlasovPreStep (double *, void *, void *, double) |
int | VlasovPostStage (double *, void *, void *, double) |
int | VlasovEField (double *, void *, double) |
int | VlasovInitialize (void *s, void *m) |
Initialize the Vlasov module.
Definition in file VlasovInitialize.c.
double VlasovComputeCFL | ( | void * | s, |
void * | m, | ||
double | dt, | ||
double | t | ||
) |
Compute the maximum CFL number
Computes the maximum CFL number over the domain. Note that the CFL is computed over the local domain on this processor only.
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
dt | Time step size for which to compute the CFL |
t | Time |
Definition at line 19 of file VlasovComputeCFL.c.
int VlasovAdvection | ( | double * | f, |
double * | u, | ||
int | dir, | ||
void * | s, | ||
double | t | ||
) |
Compute the advection term
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.
int VlasovUpwind | ( | double * | fI, |
double * | fL, | ||
double * | fR, | ||
double * | uL, | ||
double * | uR, | ||
double * | u, | ||
int | dir, | ||
void * | s, | ||
double | t | ||
) |
Compute the upwind flux at interfaces
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.
int VlasovWriteEFieldAndPotential | ( | void * | s, |
void * | m, | ||
double | a_t | ||
) |
Write E-field and potential to file
Write out the electric field and potential to file
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
a_t | Current simulation time |
Definition at line 23 of file VlasovWriteEFieldAndPotential.c.
int VlasovPreStep | ( | double * | u, |
void * | s, | ||
void * | m, | ||
double | waqt | ||
) |
Vlasov-specific function called at the beginning of each time-step: Calls the function to set the electric field
u | Solution (conserved variables) |
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
waqt | Current solution time |
Definition at line 14 of file VlasovFunctions.c.
int VlasovPostStage | ( | double * | u, |
void * | s, | ||
void * | m, | ||
double | waqt | ||
) |
Vlasov-specific function called at the end of each stage in a multistage time integrator: Calls the function to set the electric field
u | Solution (conserved variables) |
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
waqt | Current solution time |
Definition at line 33 of file VlasovFunctions.c.
int VlasovEField | ( | double * | u, |
void * | s, | ||
double | t | ||
) |
Compute electric field.
u | Conserved solution |
s | Solver object of type HyPar |
t | Current time |
Definition at line 258 of file VlasovEField.c.
int VlasovInitialize | ( | void * | s, |
void * | m | ||
) |
Initialize the Vlasov physics module - allocate and set physics-related parameters, read physics-related inputs from file, and set the physics-related function pointers in HyPar
s | Solver object of type HyPar |
m | Object of type MPIVariables containing MPI-related info |
Definition at line 43 of file VlasovInitialize.c.