The base operator class contains the ability to perform
a mapping from the vector-space of
, its domain,
to the vector space of
, the operator's range (the
forward), and vice versa. It is beneficial
for an operator to store a description of these two spaces
(the reason for the clone-space function described above).
This performs two functions. First, the operator can
perform a sanity check to make sure that the spaces of
model and data
passed into the forward adjoint function call match
the space of initialized domain and range. The second
reason is that inversion problems are often more
complicated then the generic problem described by
equation 1. For example, if
is actually the cascade of two operator
and
,
(3)
we need the ability to check that the domain of is
is equivalent to the range of
and we need to
create a vector of that size to hold the intermediate
result of applying
in the forward case (and
in
the case of the adjoint).
Hybrid-norm and Fortran 2003: Separating the physics from the solver