HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the functions to compute the gravitation source terms for the 1D Euler equations. More...
#include <stdlib.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <physicalmodels/euler1d.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
static int | Euler1DSourceFunction (double *, double *, double *, void *, void *, double) |
int | Euler1DSource (double *source, double *u, void *s, void *m, double t) |
Contains the functions to compute the gravitation source terms for the 1D Euler equations.
Definition in file Euler1DSource.c.
|
static |
Compute the gravitational source function that is then "discretized" in a way similar to the hyperbolic flux function for the balanced formulation introduced in the reference below. The source term is reformulated and "discretized" in a similar fashion as the hyperbolic flux to ensure that the hydrostatic balance is maintained to machine precision.
f | Computed source function (array size and layout same as u) |
u | Solution (conserved variables) |
x | Spatial coordinates |
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
t | Current solution time |
Definition at line 89 of file Euler1DSource.c.
int Euler1DSource | ( | double * | source, |
double * | u, | ||
void * | s, | ||
void * | m, | ||
double | t | ||
) |
Compute the gravitational source terms for the 1D Euler equations. The source term is computed according to the balanced formulation introduced in the reference below. The source term is reformulated and "discretized" in a similar fashion as the hyperbolic flux to ensure that the hydrostatic balance is maintained to machine precision.
source | Computed source terms (array size & layout same as u) |
u | Solution (conserved variables) |
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
t | Current solution time |
Definition at line 23 of file Euler1DSource.c.