HyPar
1.0
Finite-Difference Hyperbolic-Parabolic PDE Solver on Cartesian Grids
|
Contains the function to read in a non-constant advection field. More...
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <basic.h>
#include <common.h>
#include <arrayfunctions.h>
#include <io.h>
#include <physicalmodels/linearadr.h>
#include <hypar.h>
#include <mpivars.h>
Go to the source code of this file.
Functions | |
int | LinearADRAdvectionField (void *s, void *m, int idx, int nsims, int *dim_adv) |
Contains the function to read in a non-constant advection field.
Definition in file LinearADRAdvectionField.c.
int LinearADRAdvectionField | ( | void * | s, |
void * | m, | ||
int | idx, | ||
int | nsims, | ||
int * | dim_adv | ||
) |
Set the advection field over the domain - reads the spatially-varying advection data from a file, if available. The array to store the field must already be allocated.
For a single simulation, it reads in the data from a file. The data must have the same grid dimensions as the solution.
For an ensemble simulation, it reads in the advection field from the file corresponding to the idx (index of this simulation). The data in this file must have the same grid dimensions as the domain it is being read in for.
For a sparse grids simulation, it reads in the advection field from the file with data that has the grid dimensions as the full grid. The field on the current grid is obtained by interpolation.
s | Solver object of type HyPar |
m | MPI object of type MPIVariables |
idx | Index of this simulation |
nsims | Total number of simulations |
dim_adv | Grid dimensions of the advection field stored in file |
Definition at line 33 of file LinearADRAdvectionField.c.