IWAVE Structure and Basic Use Cases |
The FIELD struct containing this information is organized in the order
{"szx", 1, 1, {1, 1, 0}}captures this information (here coordinate order is ).. Note that the only arbitrary choice here is the keyword string. The choice of keyword for each field must be consistent throughout the code.
The distinction between static and dynamic fields is more than a convenience. Static fields, representing the coefficients of the model differential equations, must exist in the simulation environment prior to simulation, in some form of persistent store. Simulation input and output fields, defined below, must also exist as persistent store prior to simulation. The current implementation of IWAVE presumes that ``persistent store'' is a synonym for ``disk file'', however the logic is simply that the data for these fields should exist outside of the simulation scope. Future versions of IWAVE may accommodate distributed data as persistent store, for instance. Dynamic fields exist only within the scope of the simulation: IWAVE creates and destroys them in the course of a run.
By convention, the first field listed in the application FIELD array is the source of the primary simulation grid, to which all other grids are referenced. Since this information will need to enter the compuation via i/o, this first field should be static (i.e. a coefficient), which will exist in the simulation environment prior to execution of the application.
The static array iwave_fields data member of the IWaveInfo class lists the static and dynamic fields of an IWAVE application and their top-level attributes using the FIELD struct explained above. Being static, iwave_fields must be initialized once, and only once, somewhere in global namespace. That is, the application author must supply a definition
iwave_fields = { ... };somewhere - the preferred location for this definition is in the model definition header file containing the other required definition to be reviewed below. This model definition file should be included only in main program source files, as its static declarations must appear only once in program text.
IWAVE Structure and Basic Use Cases |