Here we'll add a forward physics module called BarPhysics
, which is totally independent of transD_GP
. To couple the physics through a misfit function to transD_GP
we'll use a helper module BarPhysicsInversion
. This helps in code distribution as the authors of BarPhysics
will not have to modifytransD_GP
at all. Navigate to examples/Bar
and have a look at BarPhysics.jl
, which willl contain everything you need for forward computation, this file needs to know nothing about transD_GP
. To define the get_misfit
function such that transD_GP
can use it, look at BarPhysicsInversion.jl
in the same folder.
Have a close look at these two files