jInv.ForwardShare

The ForwardShare submodule provides methods that are useful for different forward problems such as mesh-to-mesh interpolation, parallelization, etc.

List of types and methods

# jInv.ForwardShare.adjointTestMethod.

function jInv.adjointTest

automatic adjoint test for forward problems. If sensitivity matrix is m x n then this method generates vector v,m of lengths n and m, respectively and computes

err = abs(dot(v,JTw) - dot(w,Jv)) / abs(dot(w,Jv))

Input:

sig::Vector           - current model
pFor::ForwardProbType - forward problem

Optional Inputs:

out::Bool            - controls verbosity (default=false)
tol::Real            - tol on relative error (default=1e-10)

Output:

passed              - true/false depending whether test passed or not
err                 - absolute error

source

# jInv.ForwardShare.getNumberOfDataMethod.

nd = getNumberOfData(pFor)

Returns number of data in forward problem

source

# jInv.ForwardShare.getSensMatMethod.

S = function getSensMat(...)

constructs sensitivity matrix.

WARNING: For large-scale problems this will be prohibively expensive. Use with caution

Inputs:

m    - model
pFor - forward problems

Examples:

S = getSensMat(m,pFor)            # single pFor
S = getSensMat(m,[pFor1;pFor2])   # multiple pFor's
S = getSensMat(m,pForRef)         # pFor as remote reference

source

# jInv.ForwardShare.getSensMatSizeMethod.

(m,n) = getSensMatSize(pFor)

Returns size of sensitivity matrix where m is the number of data points and n the number of parameters in the model.

Input

pFor - forward problem:: Union{ForwardProbType, Array, RemoteChannel}

This is problem dependent and should be implemented in the respective packages.

source

# jInv.ForwardShare.getSensMatVecMethod.

Jv = getSensMatVec(v::Vector,m::Vector,param::ForwardProbType)

Computes matrix-vector product with the Jacobian.

source

# jInv.ForwardShare.getSensTMatVecMethod.

JTv = getSensMatVec(v::Vector,m::Vector,param::ForwardProbType)

Computes matrix-vector product with the transpose of Jacobian. Implementation depends on forward problem.

source