Next: UNIVERSAL DOT-PRODUCT ROUTINE
Up: Fomel & Claerbout: F90
Previous: Fomel & Claerbout: F90
A linear operator maps an input vector to an output vector. In the
adjoint mode, the mapping direction is reverse. The simplest
implementation of this idea is a minimal interface
operator( adj, add, model, data), where the logical variable
adj defines adjoint or forward mode, and variable
add defines whether the output of the program
should be added to the previous value of the corresponding actual
argument. The minimal interface is the ``mathematical'' connection to
operators as objects. To provide the ``geophysical'' connection,
we need to initialize an operator with the arguments that
construct it. Unlike object-oriented languages, such as C++, Fortran
90 doesn't have a built-in mechanism for constructing the objects. It
provides, however, a secure way for encapsulating the construction
variables in modules.
This paper shows some examples of translating Fortran 77 operator
subroutines to Fortran 90 operator modules. In all the
examples, both the model and the data vectors are represented in the
minimal interface as one-dimensional real-number arrays. In
geophysical data processing, such arrays can correspond to data
traces, sampled in time. The array data type is naturally embedded in
Fortran 90, which allows us to use a lot of intrinsic
constructs. However, the general idea of minimal interfaces applies
equally well to more complicated data structures.
The first natural use of the minimal interface is a generic
dot-product routine, testing whether an adjoint operator complies with
its formal definition. The second use, not covered in this paper, is a
generic framework for estimating the solutions of inverse problems
with methods of mathematical optimization.
Next: UNIVERSAL DOT-PRODUCT ROUTINE
Up: Fomel & Claerbout: F90
Previous: Fomel & Claerbout: F90
Stanford Exploration Project
9/12/2000