Next: MODELING STRUCTURE
Up: Karrenbach: Wave equation modules
Previous: Acoustic Medium
Variables used in the entire program are located in an include file which
acts as an object specification for different variables. I list here
only some of the possible types I adopted. Since this information is in an
include file, the port to different machines is easy and only a few
machine dependent lines have to be changed.
- MODEL(uuu) specifies the variable uuu to contain model material
parameters; it has typically 3 space dimensions
- MODELLAY(uuu) specifies a layout for the variable uuu.
This is a machine dependent specification.
- WFIELD(uu) designates the variable uu as wave field, eg.
displacement or pressure.
- TENSOR(uu) designates the variable uu as a tensor, eg. stress or strain.
- STIFF(uu) designates the variable uu as an elastic stiffness tensor.
- BOUND(uu) designates the variable uu as a boundary grid type.
Each if those types is actually a macro that is expanded during compilation.
And if a change to the types is made, automatically all source will be getting
the correct type. To see how to use these specifications, see the programs
included in this paper.
The modeling program right now categorizes the medium in different types:
``ACOUSTIC, ISOTROPIC, CUBIC, TRANSISO, ORTHO, MONO and TRICLINIC''.
The keywords are recognized as parameters and some simple parameter
checking is performed. But more importantly, these keywords set an internal
representation of the stiffness matrix. This representation is a mask function
as can be seen in the code getstress() . This representation is a simple
image of the symmetry properties of the medium in the notation most commonly
used.
As an example, here is the acoustic symmetry mask:
stiffmask(1,1)=1;
stiffmask(2,2)=1;
stiffmask(3,3)=1;
and here the transverse isotropic symmetry mask:
stiffmask(1,1)=1; stiffmask(1,2)=1; stiffmask(1,3)=1;
stiffmask(2,1)=1; stiffmask(2,2)=1; stiffmask(2,3)=1;
stiffmask(3,1)=1; stiffmask(3,2)=1; stiffmask(3,3)=1;
stiffmask(4,4)=1;
stiffmask(5,5)=1;
stiffmask(6,6)=1;
In general my coding scheme implements notions of C++
or look very similar to code written in C++. This suggests that C++ would be
the preferred language. Nichols et al 1992 and Dunbar
1992 describe in detail the
design and implementation of linear operators in C++.
Next: MODELING STRUCTURE
Up: Karrenbach: Wave equation modules
Previous: Acoustic Medium
Stanford Exploration Project
11/17/1997