previous up next print clean
Next: MODELING STRUCTURE Up: Karrenbach: Wave equation modules Previous: Acoustic Medium

OBJECT TYPES

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. 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++.


previous up next print clean
Next: MODELING STRUCTURE Up: Karrenbach: Wave equation modules Previous: Acoustic Medium
Stanford Exploration Project
11/17/1997