#include "std_cpp_includes.hh"
#include "rdomain.h"
#include "exchange.h"
#include "model.h"
#include "gridio.h"
#include "iwinfo.hh"
Go to the source code of this file.
Defines | |
#define | INCLUDE_BOUNDARY_PNTS 0 |
computational domain includes the boundary points or not | |
#define | DUAL_GRID 1 |
#define | PRIMAL_GRID 0 |
Functions | |
bool | fd_update (int ia, int iv, IWaveInfo const &ic) |
int | fd_isdyn (int i, IWaveInfo const &ic) |
(implemented) returns true if arg is index in rdomain of a dynamic field (i.e. | |
int | fd_isarr (int i, IMODEL &model, IWaveInfo const &ic) |
int | fd_numsubsteps (IWaveInfo const &ic) |
number of substeps defined in scheme | |
int | fd_readgrid (PARARRAY *par, FILE *stream, IMODEL *mdl, IWaveInfo const &ic) |
reads spatial grid info and records it in data members of IMODEL struct. | |
int | fd_modelcrea (IPNT cdims, IPNT crank, PARARRAY *par, FILE *stream, IMODEL *model, IWaveInfo const &ic) |
General FD model creator (IMODEL struct), suitable for 1st order wave equations FD modeling. |
Contains the FD_MODEL and FD_TS_PARS structs
Definition in file fd.h.
#define INCLUDE_BOUNDARY_PNTS 0 |
bool fd_update | ( | int | ia, | |
int | iv, | |||
IWaveInfo const & | ic | |||
) |
int fd_isdyn | ( | int | i, | |
IWaveInfo const & | ic | |||
) |
(implemented) returns true if arg is index in rdomain of a dynamic field (i.e.
a field updated in the simulation), else false. For example, in the constant density acoustic example, the current and previous time levels of pressure are dynamic, whereas the sound velocity is not. So isdyn(i)=1 if i=0 or 1, 0 else. May depend on spatial dimension, so same preconditions as isarr.
Preconditions: fd_model_init has been called
Postconditions: none
[in] | fd | - FD_MODEL defining scheme |
[in] | i | - array index |
int fd_numsubsteps | ( | IWaveInfo const & | ic | ) |
number of substeps defined in scheme
reads spatial grid info and records it in data members of IMODEL struct.
IWAVE presumes that all grids involved in the simulation are derived from a common primal grid, in one of two ways:
(1) Physical grid belonging to the data structure named first in the FIELDS array (see iwinfo.h) - this would be the non-extended axes of this grid
(2) indicates whether each non-dynamic grid is (internally) extended or not.
Precondition: all extended non-dynamic fields share the same grid, but non-dynamic grids may also be non-extended. All dynamic fields and non-dynamic non-extended fields share the same non-extended grid, derived from the primal grid.
Initializes the dynamic grid IMODEL.g (possibly extended), IMODEL.gp (non-extended, physical primal grid), also array of extend flags.
Postconditions: IMODEL.g, IMODEL.gp, and IMODEL.extd are initialized.
[in] | par | - associative array struct containing simulation parameters as key=value pairs |
[in] | stream | - verbose output stream |
[in] | mdl | - IMODEL struct, declared at driver level and passed as part of IWAVE struct through iwave_construct. |
[in] | ic | - IWaveInfo struct carrying field info |
Implemented in iwave/core/lib/fd.cc
int fd_modelcrea | ( | IPNT | cdims, | |
IPNT | crank, | |||
PARARRAY * | par, | |||
FILE * | stream, | |||
IMODEL * | model, | |||
IWaveInfo const & | ic | |||
) |
General FD model creator (IMODEL struct), suitable for 1st order wave equations FD modeling.
Mimics sgn_modelcrea but more general, does the following operations:
[in] | cdims | - (IPNT) cartesian grid dimensions in MPI communicator. |
[in] | crank | - (IPNT) cartesian rank of this processor in MPI communicator. |
[in] | par | - (PARARRAY *) parameter arrary pointer. |
[in] | stream | - (FILE *) stream to output comments (created by driver). [out] model - (IMODEL *) IMODEL pointer. |