There are three fundamental classes defined in the HCL class library, a vector class, a general operator class, and a solver class:
An example of a vector class is the regularly-gridded function class (RGF). The RGF class is a pure C++ class for operating with traditional SEPlib (also referred as SEPlib77) seismic datasets (n-dimensional hypercubes), which are regularly gridded functions in a mathematical sense. In a companion paper in this report, Schroeder and Schwab 1996 describe the implementation and use of the RGF class. The RGF class is derived from the base class HCL_Vector. The HCL_Vector class defines the interface for all operations that can be expected from vectors, such as adding, scaling, subtracting, inner product, etc. The RGF class implements the details of the vector operations on SEPlib77 data structures. The presence of a common interface guarantees the interaction between solvers and any instance of the RGF class, or of any other class derived from the HCL_Vector class.
A second example of a vector class is the irregularly-gridded function (IGF90) class. Like the RGF class, the IGF90 class also derives from the HCL_Vector class. The IGF90 class encapsulates the vectorial behavior of irregularly-gridded SEPlib90 data structures. The IGF90 class is a hybrid C++/Fortran90 interface between the Fortran90 internals of the SEPlib90 data structures Clapp and Crawley (1996) and the C++ abstractions of a HCL_Vector derived class; simply put, the IGF90 class is a C++ interface to the Fortran90 code of SEPlib90 data structures. The IGF90 class was written by the authors as part of the GOON project Claerbout and Biondi (1996) to bridge the advantages of the C++ language such as code reusability and readability, use of off-the-shelf mathematical optimization libraries, and the efficiency of the Fortran90 language.
This paper is a tutorial about the IGF90 class and its usage. It assumes that the reader is familiar with SEPlib90 data structures Biondi et al. (1996), and has a basic knowledge of object-oriented programming. The examples in this tutorial are used for solving an inversion algorithm. Finally, we describe the design of the C++/Fortran90 interface, we illustrate it with the interface to the SEPlib90 data structures, and show an example of how to create the interface for a Fortran 90 operator.