HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the functions to compute the source terms for the 1D shallow water equations. More...
#include <stdlib.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <physicalmodels/shallowwater1d.h>
#include <mpivars.h>
#include <hypar.h>
Go to the source code of this file.
Functions | |
static int | ShallowWater1DSourceFunction1 (double *, double *, double *, void *, void *, double) |
static int | ShallowWater1DSourceFunction2 (double *, double *, double *, void *, void *, double) |
int | ShallowWater1DSource (double *source, double *u, void *s, void *m, double t) |
Contains the functions to compute the source terms for the 1D shallow water equations.
Definition in file ShallowWater1DSource.c.
|
static |
Compute the first 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 111 of file ShallowWater1DSource.c.
|
static |
Compute the second 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 155 of file ShallowWater1DSource.c.
int ShallowWater1DSource | ( | double * | source, |
double * | u, | ||
void * | s, | ||
void * | m, | ||
double | t | ||
) |
Compute the source terms for the 1D shallow water 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 25 of file ShallowWater1DSource.c.