# Joint Inversion

This section introduces the methodology to invert multiple datasets
jointly. The goal of a joint inversion is to invert for a
``Common Earth Model`` based on multiple geophysical surveys that might
provide complementary information.

In its simplest form, a joint inversion can be performed on multiple
surveys that are sensitive to the same physical property.

```{image} images/joint_survey.svg
:scale: 200%
:align: center
```
For example,
one could invert a magnetotelluric survey and a direct-current
resistivity survey together to obtain a common resistivity model. This kind of
joint inversion does not require a coupling term - simply the summation
of multiple misfit functions.

- [](joint_surveys)

More general joint inversion strategies attempt to find commonality
between multiple physical property models.

```{image} images/joint_coupling.svg
:scale: 200%
:align: center
```
Different geophysical surveys typically respond to different subsurface features, but combining complementary
information about physical property contrasts can significantly reduce inversion ambiguity.
For example, one could invert a direct-current resistivity survey for the thickness of
conductive overburden, along with a gravity survey to highlight dense anomalies in the basement.

This kind of joint inversion requires a `coupling` term in order to tie
those physical properties together. The following strategies are currently
available through the SimPEG framework {cite:p}`heagy_2017`:

- [](cross_gradient)
- [](pgi)

(inversion_mesh)=

## Inversion Mesh

For any of the joint inversion methods, the inversion mesh can be different from the computational (local) meshes of the standalone inversion groups, used for forward simulation and sensitivity calculations.
If left without a selection, the inversion (global) mesh is generated automatically by combining the finest cell size encountered across all standalone meshes.

```{image} images/optional_mesh.png
:scale: 25%
:align: center
```

This allows for a more efficient inversion process, where the local forward meshes can have a finer cell-size only around
their respective survey locations. The global inversion mesh, used by the regularization function, can capture all the necessary details of
the ``Common Earth Model``.

```{figure} images/joint_meshes.svg
---
scale: 50%
align: center
---
Autogenerated inversion mesh (bottom) that combines the finest cell size across all local forward meshes (top).
```

The main requirements is for all local forward meshes to be compatible with each other in terms of

- outer extent and origin
- base cell size.

which guarantees that the local meshes are nested within the global inversion mesh.
This greatly simplifies the two-way interpolation of the model (from the global to the local meshes) and sensitivities
(from the local to the global mesh) during the inversion process.
