Refindic: invert details only where they are worth it 
Refindic, Refinement indicators, is an adaptive parameterization platform using refinement indicators.
The refinement indicator algorithm is suited for the estimation of a distributed parameter occurring in a mathematical simulation model, typically a set of partial differential equations. When the numerical simulation model must be solved on a fine grid, the refinement indicator algorithm provides an adaptive parameterization of the saught parameter that avoids overparameterization difficulties. In each grid cell, the estimated parameter may be of dimension greater than one, i.e. the algorithm is able to estimate several scalar distributed parameters.
Refindic implements a generic version of the refinement indicator algorithm that can dock specific programs provided they conform to the generic algorithm API.
The API of Refindic requires four main functionalities (called tasks) for the user specific program, it must be able:
Given any such user specific program, the inversion platform automatically provides a program that solves the corresponding user inverse problem using the refinement indicator algorithm.
In its current implementation, the inversion platform can only build coarse parameterizations for a distributed parameter defined on a fine rectangular grid. From version 1.5+pl0, the user has the possibility to specify masked cells in the fine rectangular grid that will be ignored by the algorithm (with the use of the specific zone number 1 in the initial coarse parameterization). This allows for the treatment of inverse problems defined on unstructured meshes. The handling of bothway interpolations must be taken care of by the gradient computation and optimization tasks. The masked cells must be the same for all components of the parameter.
See also the INSTALL file in the root directory of the distribution.
You need OCaml version 4.01 or higher to build Refindic.
The OCaml image library Grimage, the polyglot Input/Output library Pio, the OCaml user’s additional library Ulib, and the OCaml module Generator OCamlGen are also required to build Refindic. They are provided, and their configuration, compilation, and installation (in a private location) are fully automatic.
Configuration, compilation and installation uses Pph (Portable Project Handler) technology. It is provided, and its use is fully automatic.
To configure, build and install Refindic, type
./configure [ird <installation_root_directory>] make make install # Note that you may need root privileges for that.
When called without the ird option, the configure script computes the root directory for the installation from the system default value, or from previous run of the same script.
Other options for the configuration phase may be accessible, type
./configure help
To remove all files installed by make install, all files built by make, and all files created by ./configure, respectively type
make uninstall # Note that you may also need root privileges for that. make clean ./unconfigure
To uninstall all versions of Refindic, type
make uninstallallversions # Note that you may also need root privileges # for that.
Examples are provided in the example directory. They are all configured to run the inversion platform in interactive mode. Thus, it is best to run them separately in each subdirectory (see each dedicated README file):
To configure (set up and compile), and run examples of Refindic, respectively type
make configureexample make example
To remove all files created when running the examples, and those built when configuring them, respectively type
make cleanexample make unconfigureexample
Note that all examples do not need that Refindic is installed to run properly.
Please send bug reports to refinementbugs@inria.fr, comments to refinementdevel@inria.fr, and contact the user community at refinementusers@inria.fr.
Refindic is free software distributed under the 3clause BSD license. See the LICENSE file for details.
The algorithm implemented in Refindic comes from papers cowritten with Guy Chavent.
Refindic is entirely written in OCaml.
Refindic implements the adaptive parameterization algorithm using refinement indicators to solve inverse problems set as minimization problems of the form
arg 
 J (p) 

  d − F (p) ^{2}, 
where F models the causetoeffect relation from parameter p to measures d (it is the function to invert). Typically, computing measures F(p) for some parameter p involves the resolution of a set of PDEs depending on the distributed parameter p (e.g., a function of the space variable).
Parameter p is searched for under the form p=P m where P is a piecewise constant parameterization operator splitting the domain of function p into a given number of—constant—pieces; m is called coarse parameter (one value per piece), and in contrast, p is now called fine parameter (one value per point). Piecewise constant parameterization operators are fully and uniquely defined by the choice of a partition of the space domain (with no empty part), hence the identification of partitions and parameterization operators.
To avoid overparameterization problems, pieces are progressively split one at a time in an optimal manner to build an optimal sequence of parameterization operators (P_{n})_{n=1,2,…} where each P_{n} is associated with a partition into n pieces. Hence the name “adaptive parameterization algorithm”.
The approach is efficient for inverse problems in which modeling operator F is almost linear with respect to low frequency contents of the parameter p, and may become more and more nonlinear as the frequency contents increase. It is not suited at all to the case where low frequencies of the unknown parameter are related to a highly nonlinear behavior of the model, as for seismic inversion.
Input data are a dimension management (Vector, or Best_component_only), a refinement strategy (Overall_best, or Best_in_a_family), and an initial vector partition P_{1}. An usersupplied external program provides the following functions:
optim: P ⊢→ (m^{⋆}, J^{⋆}) = (arg 
 J (P m), J(P m^{⋆})), grad: p^{′}⊢→ ∇_{p} J (p^{′}). 
For Vector dimension management, all components are always subject to the same scalar partition. For Best_component_only dimension management, different components may be subject to different scalar partitions.
A cutting c_{P} splits some part P of some partition P into nonempty disjoint subparts P^{+} and P^{−}.
(m_{1}, J_{1}) = optim (P_{1}). 
∀ k, ∀ P ∈ P_{n}^{k}, ∀ c_{P}= (P^{+}, P^{−}) ∈ C_{P}, I_{cP}^{k} =  ⎪ ⎪ ⎪ ⎪ 
 (g_{n}^{k})_{i} − 
 (g_{n}^{k})_{i}  ⎪ ⎪ ⎪ ⎪  , 
∀ P ∈ P_{n}, ∀ c_{P}∈ C_{P}, I_{cP} =  (I_{cP}^{k})_{k} _{q}. 
∀ c^{⋆}∈ C^{⋆}, (m_{c⋆}, J_{c⋆}) = optim (P_{c⋆}). 
(P_{n+1}, m_{n+1}, J_{n+1}) = (P_{copt}, m_{copt}, J_{copt}). 
This document was translated from L^{A}T_{E}X by H^{E}V^{E}A.