Geophysical Inversion and Modeling Library  v1.0.11-19-gfad5635f
GIMLI::Inversion< ModelValType > Class Template Reference
+ Inheritance diagram for GIMLI::Inversion< ModelValType >:
+ Collaboration diagram for GIMLI::Inversion< ModelValType >:

Public Types

typedef Vector< ModelValType > Vec
 
typedef Vector< ModelValType > ModelVector
 
- Public Types inherited from GIMLI::InversionBase< ModelValType >
typedef Vector< ModelValType > ModelVector
 

Public Member Functions

 Inversion (bool verbose=false, bool dosave=false)
 
 Inversion (ModellingBase &forward, bool verbose=false, bool dosave=false)
 
 Inversion (const Vec &data, ModellingBase &forward, bool verbose=false, bool dosave=false)
 
 Inversion (const Vec &data, ModellingBase &forward, Trans< Vec > &transData, bool verbose=true, bool dosave=false)
 
 Inversion (const Vec &data, ModellingBase &forward, Trans< Vec > &transData, Trans< Vec > &transModel, bool verbose=true, bool dosave=false)
 
virtual ~Inversion ()
 
void setData (const Vec &data)
 
const Vecdata () const
 
void setRelativeError (const Vec &e)
 
void setRelativeError (double relerr)
 
void setAbsoluteError (const Vec &abserr)
 
void setAbsoluteError (double abserr)
 
void setError (const Vec &err, bool isRelative=true)
 
void setError (double err, bool isRelative=true)
 
const Vecerror () const
 
void checkError ()
 
Vec errorDefault_ ()
 
void setForwardOperator (ModellingBase &forward)
 
ModellingBaseforwardOperator ()
 
ModellingBasefop ()
 
void setTransData (Trans< Vec > &tD)
 
Trans< Vec > & transData ()
 
void setTransModel (Trans< Vec > &tM)
 
Trans< Vec > & transModel ()
 
uint constraintsCount () const
 
uint dataCount () const
 
void setVerbose (bool verbose)
 
bool verbose () const
 
void setDoSave (bool d)
 
bool doSave () const
 
void saveModelHistory (bool doSaveModelHistory)
 
void setLineSearch (bool linesearch)
 
bool lineSearch () const
 
void setBlockyModel (bool isBlocky)
 
bool blockyModel () const
 
void setRobustData (bool isRobust)
 
bool robustData () const
 
void setLambda (double lambda)
 
double lambda () const
 
double getLambda () const
 
void setLambdaFactor (double lambdaFactor)
 
double lambdaFactor () const
 
void setLambdaMinimum (double l)
 
double lambdaMinimum () const
 
void setLocalRegularization (bool localReg)
 
bool localRegularization () const
 
void setOptimizeLambda (bool opt)
 
bool optimizeLambda () const
 
void setMaxIter (int maxiter)
 
int maxIter () const
 
void setMaxCGLSIter (int iter)
 
int maxCGLSIter () const
 
void setCGLSTolerance (double tol)
 
double maxCGLSTolerance () const
 
uint iter () const
 
bool isRunning () const
 
void abort ()
 
void stopAtChi1 (bool stopAtChi1)
 
void setDeltaPhiAbortPercent (double dPhi)
 
double deltaPhiAbortPercent () const
 
void setMarquardtScheme (double lambdaFactor=0.8)
 
void checkTransFunctions ()
 
void checkConstraints ()
 
void checkJacobian (bool force=false)
 
void setRecalcJacobian (bool recalc)
 
bool recalcJacobian () const
 
void setBroydenUpdate (bool broydenUpdate)
 
bool broydenUpdate () const
 
void setModel (const Vec &model)
 
const ModelVectormodel () const
 
void setReferenceModel (const Vec &model)
 
void setResponse (const Vec &response)
 
void setConstraintsH (const Vec &constraintsH)
 
const Vecresponse () const
 
Vec getIRLS () const
 
void setCWeight (const Vec &cWeight)
 
const VeccWeight () const
 
void setMWeight (const Vec &mweight)
 
const VecmWeight () const
 
void robustWeighting ()
 
void constrainBlocky ()
 
void echoStatus () const
 
void echoStatus (const Vec &response, const Vec &model, const std::string &xtra="") const
 
Vec modelCellResolution (int iModel)
 
Vec modelCellResolution (const RVector3 &pos)
 
RMatrix modelResolutionMatrix ()
 
RVector roughness (const RVector &model) const
 
RVector pureRoughness (const RVector &model) const
 
RVector roughness () const
 
double getPhiD (const Vec &response) const
 
double getPhiM (const Vec &model) const
 
double getPhi (const Vec &model, const Vec &response) const
 
double getPhiD () const
 
double getPhiM () const
 
double getPhi () const
 
double getChi2 () const
 
double getChi2 (const Vec &response) const
 
double chi2 () const
 
double absrms () const
 
double relrms () const
 
double linesearch (const Vec &modelNew, const Vec &responseNew) const
 
double linesearchQuad (const Vec &modelNew, const Vec &responseNew, const Vec &modelQuad, const Vec &responseQuad, double tauquad) const
 
const std::vector< RVector > & modelHistory () const
 
Vec invSubStep (const Vec &rhs)
 
Vec optLambda (const Vec &deltaData, const Vec &deltaModel0)
 
bool oneStep ()
 !! h-variante More...
 
const Vecinvert (const Vec &data)
 
const Vecstart ()
 
const Vecrun ()
 
Vec runChi1 (double acc=0.01, int maxiter=50)
 
const RVectormodelWeight () const
 
const RVectormodelRef () const
 
const RVectordataWeight () const
 
const RVectordeltaDataIter () const
 
const RVectordeltaModelIter () const
 
IPCClientSHMipc ()
 
void reset ()
 
- Public Member Functions inherited from GIMLI::InversionBase< ModelValType >
 InversionBase ()
 
virtual ~InversionBase ()
 

Protected Member Functions

void init_ ()
 

Protected Attributes

Vec data_
 
ModellingBaseforward_
 
Trans< Vec > * tD_
 
Trans< Vec > * tM_
 
Trans< Vec > * transModelDefault_
 
Trans< Vec > * transDataDefault_
 
bool verbose_
 
bool dosave_
 
bool saveModelHistory_
 
Vec error_
 
Vec response_
 
Vec model_
 
Vec modelRef_
 
Vec constraintsH_
 
Vec constraintsWeight_
 
Vec modelWeight_
 
Vec dataWeight_
 
Vec deltaDataIter_
 
Vec deltaModelIter_
 
int maxiter_
 
int iter_
 
int maxCGLSIter_
 
double lambda_
 
double lambdaFactor_
 
double lambdaMin_
 
double dPhiAbortPercent_
 
double CGLStol_
 
bool isBlocky_
 
bool isRobust_
 
bool isRunning_
 
bool useLinesearch_
 
bool optimizeLambda_
 
bool abort_
 
bool stopAtChi1_
 
bool doBroydenUpdate_
 
bool localRegularization_
 
bool haveReferenceModel_
 
bool recalcJacobian_
 
bool jacobiNeedRecalc_
 
bool activateFillConstraintsWeight_
 
bool fixError_
 
std::vector< RVectormodelHist_
 
IPCClientSHM ipc_
 

Detailed Description

template<class ModelValType>
class GIMLI::Inversion< ModelValType >

Inversion template using a Generalized Minimization Approach, atm fixed to Gauss-Newton solver Inversion(bool verbose, bool dosave Inversion(RVector data, FOP f, bool verbose, bool dosave Inversion(RVector data, FOP f, transData, transModel, bool verbose, bool dosave

Constructor & Destructor Documentation

◆ Inversion() [1/5]

template<class ModelValType>
GIMLI::Inversion< ModelValType >::Inversion ( bool  verbose = false,
bool  dosave = false 
)
inline

Minimal constructor. verbose – gives some output and status information about the inversion progress; dosave – advanced debuging, saves alot of stuff and temporary data

References GIMLI::Inversion< ModelValType >::init_().

Referenced by GIMLI::Inversion< ModelValType >::~Inversion().

◆ Inversion() [2/5]

template<class ModelValType>
GIMLI::Inversion< ModelValType >::Inversion ( ModellingBase forward,
bool  verbose = false,
bool  dosave = false 
)
inline

◆ Inversion() [3/5]

template<class ModelValType>
GIMLI::Inversion< ModelValType >::Inversion ( const Vec data,
ModellingBase forward,
bool  verbose = false,
bool  dosave = false 
)
inline

Usual constructor. data – vector of the given data; forward – the associated forward operator

References GIMLI::Inversion< ModelValType >::init_(), GIMLI::Inversion< ModelValType >::setData(), and GIMLI::Inversion< ModelValType >::setForwardOperator().

◆ Inversion() [4/5]

template<class ModelValType>
GIMLI::Inversion< ModelValType >::Inversion ( const Vec data,
ModellingBase forward,
Trans< Vec > &  transData,
bool  verbose = true,
bool  dosave = false 
)
inline

◆ Inversion() [5/5]

template<class ModelValType>
GIMLI::Inversion< ModelValType >::Inversion ( const Vec data,
ModellingBase forward,
Trans< Vec > &  transData,
Trans< Vec > &  transModel,
bool  verbose = true,
bool  dosave = false 
)
inline

◆ ~Inversion()

template<class ModelValType>
virtual GIMLI::Inversion< ModelValType >::~Inversion ( )
inlinevirtual

Destructor. Frees allocated memory

References GIMLI::inv(), and GIMLI::Inversion< ModelValType >::Inversion().

Member Function Documentation

◆ abort()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::abort ( )
inlinevirtual

Force abort at next iteration

Implements GIMLI::InversionBase< ModelValType >.

◆ absrms()

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::absrms ( ) const
inline

Return last absolute RMS misfit

◆ checkConstraints()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::checkConstraints ( )
inline

Create constraints, check and compare size of constraint matrix with model/boundary control

References GIMLI::MatrixBase::cols(), GIMLI::Vector< ValueType >::resize(), and GIMLI::MatrixBase::rows().

Referenced by GIMLI::Inversion< ModelValType >::run().

◆ checkError()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::checkError ( )
inline

Validate the data error. This check will be called at every new run or change of the error; Check size and content unequal to zero. If problems found, warn and set the data error to errorDefault_()

References GIMLI::Inversion< ModelValType >::errorDefault_(), and GIMLI::Inversion< ModelValType >::fixError_.

Referenced by GIMLI::Inversion< ModelValType >::robustWeighting(), GIMLI::Inversion< ModelValType >::run(), and GIMLI::Inversion< ModelValType >::setRelativeError().

◆ checkJacobian()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::checkJacobian ( bool  force = false)
inline

◆ checkTransFunctions()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::checkTransFunctions ( )
inline

Check if transfunctions are valid, set default if no transfunctions are given or override given functions by regionManager.transfunctions if available

References GIMLI::Inversion< ModelValType >::setTransModel().

Referenced by GIMLI::Inversion< ModelValType >::run().

◆ chi2()

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::chi2 ( ) const
inlinevirtual

◆ constrainBlocky()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::constrainBlocky ( )
inline

Apply blocky model constraints (see also setBlockyModel)

References GIMLI::getIRLSWeights(), and GIMLI::Inversion< ModelValType >::setCWeight().

Referenced by GIMLI::Inversion< ModelValType >::run().

◆ constraintsCount()

template<class ModelValType>
uint GIMLI::Inversion< ModelValType >::constraintsCount ( ) const
inline

Return number of constraints

◆ cWeight()

template<class ModelValType>
const Vec& GIMLI::Inversion< ModelValType >::cWeight ( ) const
inlinevirtual

Return reference to the current constraints weight vector

Implements GIMLI::InversionBase< ModelValType >.

Referenced by GIMLI::Inversion< ModelValType >::setCWeight().

◆ data()

template<class ModelValType>
const Vec& GIMLI::Inversion< ModelValType >::data ( ) const
inline

◆ dataCount()

template<class ModelValType>
uint GIMLI::Inversion< ModelValType >::dataCount ( ) const
inline

Return number of data

◆ echoStatus() [1/2]

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::echoStatus ( ) const
inline

◆ echoStatus() [2/2]

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::echoStatus ( const Vec response,
const Vec model,
const std::string &  xtra = "" 
) const
inline

◆ error()

template<class ModelValType>
const Vec& GIMLI::Inversion< ModelValType >::error ( ) const
inline

Old vector error setter still fixed to relative error, should not be used due to ambiguity

Old scalar error setter still fixed to relative error, should not be used due to ambiguity

Return the used data error

◆ errorDefault_()

template<class ModelValType>
Vec GIMLI::Inversion< ModelValType >::errorDefault_ ( )
inline

Return a copy of the default data error array, [ Relative data error of 1% ]

Referenced by GIMLI::Inversion< ModelValType >::checkError().

◆ fop()

template<class ModelValType>
ModellingBase* GIMLI::Inversion< ModelValType >::fop ( )
inline

Return forward operator. Shortcut for forwardOperator()

References GIMLI::Inversion< ModelValType >::forwardOperator().

◆ forwardOperator()

template<class ModelValType>
ModellingBase* GIMLI::Inversion< ModelValType >::forwardOperator ( )
inlinevirtual

Return forward operator.

Implements GIMLI::InversionBase< ModelValType >.

Referenced by GIMLI::Inversion< ModelValType >::fop().

◆ getChi2() [1/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getChi2 ( ) const
inline

Return the chi-squared data misfit DEPRECATED wrong nameing scheme

References GIMLI::Inversion< ModelValType >::getPhiD().

Referenced by GIMLI::Inversion< ModelValType >::runChi1().

◆ getChi2() [2/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getChi2 ( const Vec response) const
inline

Return the chi-squared data misfit for given forward response. DEPRECATED wrong nameing scheme

References GIMLI::Inversion< ModelValType >::getPhiD().

◆ getIRLS()

template<class ModelValType>
Vec GIMLI::Inversion< ModelValType >::getIRLS ( ) const
inline

Return IRLS function of roughness vector

References GIMLI::getIRLSWeights().

◆ getPhi() [1/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getPhi ( const Vec model,
const Vec response 
) const
inline

Return total objective function (data OF plus lambda times model OF) DEPRECATED wrong nameing scheme

References GIMLI::Inversion< ModelValType >::getPhiD(), and GIMLI::Inversion< ModelValType >::getPhiM().

◆ getPhi() [2/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getPhi ( ) const
inline

◆ getPhiD() [1/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getPhiD ( const Vec response) const
inline

Return data objective function (sum of squared data-weighted misfit)

References GIMLI::dot(), and GIMLI::str().

◆ getPhiD() [2/2]

◆ getPhiM() [1/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getPhiM ( const Vec model) const
inline

Return model objective function (squared model roughness)

References GIMLI::dot(), GIMLI::Inversion< ModelValType >::roughness(), and GIMLI::str().

◆ getPhiM() [2/2]

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::getPhiM ( ) const
inline

◆ init_()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::init_ ( )
inlineprotected

Internal initialization function, which is called from constructor. Set default paramater and allocate required memory

References GIMLI::Inversion< ModelValType >::fixError_.

Referenced by GIMLI::Inversion< ModelValType >::Inversion().

◆ invert()

template<class ModelValType >
const Vector< ModelValType > & GIMLI::Inversion< ModelValType >::invert ( const Vec data)

Start the inversion with specific data.

Start inversion from starting model.

References GIMLI::Inversion< ModelValType >::reset(), GIMLI::Inversion< ModelValType >::run(), and GIMLI::Inversion< ModelValType >::setData().

Referenced by GIMLI::Inversion< ModelValType >::invSubStep().

◆ invSubStep()

template<class ModelValType>
Vec GIMLI::Inversion< ModelValType >::invSubStep ( const Vec rhs)
inline

◆ isRunning()

template<class ModelValType>
bool GIMLI::Inversion< ModelValType >::isRunning ( ) const
inlinevirtual

Return true if inversion is running

Implements GIMLI::InversionBase< ModelValType >.

◆ iter()

template<class ModelValType>
uint GIMLI::Inversion< ModelValType >::iter ( ) const
inlinevirtual

◆ lambdaMinimum()

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::lambdaMinimum ( ) const
inline

Return the minimum lambda value that can be reached if lambda factor is set.

◆ linesearch()

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::linesearch ( const Vec modelNew,
const Vec responseNew 
) const
inline

Start with linear interpolation, followed by quadratic fit if linesearch parameter tau is lower than 0.03. Tries to return values between 0.03 and 1

rigorous minimization of the total objective function

parabolic line search using step 0, 1 and tauquad to fit parabola

too large

negative or nearly zero (stucked) -> use small step instead

only if not nearly one (which saves a forward run

References GIMLI::Inversion< ModelValType >::echoStatus(), GIMLI::Inversion< ModelValType >::getPhi(), GIMLI::Inversion< ModelValType >::getPhiD(), and GIMLI::Inversion< ModelValType >::linesearchQuad().

Referenced by GIMLI::Inversion< ModelValType >::oneStep(), and GIMLI::Inversion< ModelValType >::setLineSearch().

◆ linesearchQuad()

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::linesearchQuad ( const Vec modelNew,
const Vec responseNew,
const Vec modelQuad,
const Vec responseQuad,
double  tauquad 
) const
inline

Compute objective function for old (tau=0), new (tau=1) and another model

References GIMLI::Inversion< ModelValType >::getPhi().

Referenced by GIMLI::Inversion< ModelValType >::linesearch().

◆ localRegularization()

template<class ModelValType>
bool GIMLI::Inversion< ModelValType >::localRegularization ( ) const
inline

Return whether regularization is global or local (e.g. Marquardt method)

◆ model()

template<class ModelValType>
const ModelVector& GIMLI::Inversion< ModelValType >::model ( ) const
inlinevirtual

◆ modelCellResolution() [1/2]

template<class ModelValType>
Vec GIMLI::Inversion< ModelValType >::modelCellResolution ( int  iModel)
inline

Compute model cell resolution (specific column of resolution matrix) by an LSCG solver (Guenther, 2004)

References GIMLI::ModellingBase::jacobian().

Referenced by GIMLI::Inversion< ModelValType >::modelCellResolution(), and GIMLI::Inversion< ModelValType >::modelResolutionMatrix().

◆ modelCellResolution() [2/2]

template<class ModelValType>
Vec GIMLI::Inversion< ModelValType >::modelCellResolution ( const RVector3 pos)
inline

Compute cell resolution for closest cell to given position

References GIMLI::Inversion< ModelValType >::modelCellResolution().

◆ modelHistory()

template<class ModelValType>
const std::vector< RVector >& GIMLI::Inversion< ModelValType >::modelHistory ( ) const
inline

Return the single models for each iteration. For debugging.

References GIMLI::Inversion< ModelValType >::modelHist_.

◆ modelResolutionMatrix()

template<class ModelValType>
RMatrix GIMLI::Inversion< ModelValType >::modelResolutionMatrix ( )
inline

Compute whole resolution matrix by single cell resolutions

References GIMLI::Inversion< ModelValType >::modelCellResolution(), and GIMLI::Matrix< ValueType >::push_back().

◆ mWeight()

template<class ModelValType>
const Vec& GIMLI::Inversion< ModelValType >::mWeight ( ) const
inline

Return reference to the current model weight vector

◆ oneStep()

◆ optLambda()

template<class ModelValType >
Vector< ModelValType > GIMLI::Inversion< ModelValType >::optLambda ( const Vec deltaData,
const Vec deltaModel0 
)

◆ pureRoughness()

template<class ModelValType>
RVector GIMLI::Inversion< ModelValType >::pureRoughness ( const RVector model) const
inline

Return (C * m) , i.e. the pure (unweighted) roughness

◆ relrms()

template<class ModelValType>
double GIMLI::Inversion< ModelValType >::relrms ( ) const
inline

Return last relative RMS misfit

◆ reset()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::reset ( )
inline

◆ response()

template<class ModelValType>
const Vec& GIMLI::Inversion< ModelValType >::response ( ) const
inline

Return a reference to the current response vector

Referenced by GIMLI::Inversion< ModelValType >::setResponse().

◆ robustWeighting()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::robustWeighting ( )
inline

Call robust date reweighting (see also setRobustData)

References GIMLI::Inversion< ModelValType >::checkError(), and GIMLI::getIRLSWeights().

Referenced by GIMLI::Inversion< ModelValType >::run().

◆ roughness() [1/2]

template<class ModelValType>
RVector GIMLI::Inversion< ModelValType >::roughness ( const RVector model) const
inline

Return (C * m * m_w) * c_w

◆ roughness() [2/2]

template<class ModelValType>
RVector GIMLI::Inversion< ModelValType >::roughness ( ) const
inline

◆ run()

template<class ModelValType >
const Vector< ModelValType > & GIMLI::Inversion< ModelValType >::run ( )
virtual

Start the inversion procedure from the last model and return the final model vector.

Run inversion with current model.

calculation of initial modelresponse

() clear the model history

validate and rebuild the data error if necessary

validate and rebuild the constraint matrix if necessary

compute roughness constraint and correct it for inter-region constraints

!!template

validate and rebuild the jacobian if necessary

Implements GIMLI::InversionBase< ModelValType >.

References GIMLI::Inversion< ModelValType >::checkConstraints(), GIMLI::Inversion< ModelValType >::checkError(), GIMLI::Inversion< ModelValType >::checkJacobian(), GIMLI::Inversion< ModelValType >::checkTransFunctions(), GIMLI::MatrixBase::cols(), GIMLI::Inversion< ModelValType >::constrainBlocky(), GIMLI::RegionManager::constraintCount(), GIMLI::RegionManager::fillConstraintsWeight(), GIMLI::RegionManager::fillModelControl(), GIMLI::Inversion< ModelValType >::getPhi(), GIMLI::Inversion< ModelValType >::getPhiD(), GIMLI::Inversion< ModelValType >::getPhiM(), GIMLI::ModellingBase::jacobian(), GIMLI::Inversion< ModelValType >::modelHist_, GIMLI::Inversion< ModelValType >::oneStep(), GIMLI::Vector< ValueType >::resize(), GIMLI::Inversion< ModelValType >::robustWeighting(), GIMLI::MatrixBase::rows(), GIMLI::MatrixBase::save(), GIMLI::Inversion< ModelValType >::setModel(), GIMLI::Vector< ValueType >::setVal(), GIMLI::ModellingBase::startModel(), and GIMLI::toStr().

Referenced by GIMLI::Inversion< ModelValType >::invert(), GIMLI::Inversion< ModelValType >::invSubStep(), GIMLI::Inversion< ModelValType >::runChi1(), and GIMLI::Inversion< ModelValType >::start().

◆ runChi1()

template<class ModelValType>
Vec GIMLI::Inversion< ModelValType >::runChi1 ( double  acc = 0.01,
int  maxiter = 50 
)
inline

◆ saveModelHistory()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::saveModelHistory ( bool  doSaveModelHistory)
inline

Set and get verbose behaviour

◆ setAbsoluteError() [1/2]

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setAbsoluteError ( const Vec abserr)
inline

Set the absolute data error to the vector abserr

References GIMLI::Inversion< ModelValType >::setRelativeError().

Referenced by GIMLI::Inversion< ModelValType >::setAbsoluteError().

◆ setAbsoluteError() [2/2]

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setAbsoluteError ( double  abserr)
inline

Set absolute data error to the scalar value abserr

References GIMLI::Inversion< ModelValType >::setAbsoluteError(), and GIMLI::Inversion< ModelValType >::setRelativeError().

◆ setBlockyModel()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setBlockyModel ( bool  isBlocky)
inline

Set and get blocky model behaviour (by L1 reweighting of constraints)

◆ setBroydenUpdate()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setBroydenUpdate ( bool  broydenUpdate)
inline

Enable/disable broyden update (which enforces scaling by transform function derivatives

◆ setCGLSTolerance()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setCGLSTolerance ( double  tol)
inline

Set and get abort tolerance for cgls solver. -1 means default scaling [default]

◆ setConstraintsH()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setConstraintsH ( const Vec constraintsH)
inline

Set constraint right-hand side by hand (very special cases, so be careful)

◆ setCWeight()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setCWeight ( const Vec cWeight)
inline

Set the constraint weight (boundary control) vector

References GIMLI::Inversion< ModelValType >::cWeight().

Referenced by GIMLI::Inversion< ModelValType >::constrainBlocky().

◆ setData()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setData ( const Vec data)
inlinevirtual

◆ setDeltaPhiAbortPercent()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setDeltaPhiAbortPercent ( double  dPhi)
inline

Set and get relative objective function decrease

◆ setDoSave()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setDoSave ( bool  d)
inline

Set debug output

◆ setForwardOperator()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setForwardOperator ( ModellingBase forward)
inlinevirtual

Set the forward operator and the model-transform-function derived from fop-regionManager if not set before.

why is this so strictly necessary???

Always use a region manager

Implements GIMLI::InversionBase< ModelValType >.

Referenced by GIMLI::Inversion< ModelValType >::Inversion().

◆ setLambda()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setLambda ( double  lambda)
inlinevirtual

Set and get regularization parameter and its change over iteration

Implements GIMLI::InversionBase< ModelValType >.

Referenced by GIMLI::Inversion< ModelValType >::runChi1().

◆ setLambdaMinimum()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setLambdaMinimum ( double  l)
inline

Set the minimum lambda value that can be reached if lambda factor is set. Default is 1.

◆ setLineSearch()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setLineSearch ( bool  linesearch)
inline

Set and get line search

References GIMLI::Inversion< ModelValType >::linesearch().

◆ setLocalRegularization()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setLocalRegularization ( bool  localReg)
inline

Set whether regularization is global or local (e.g. Marquardt method)

Referenced by GIMLI::Inversion< ModelValType >::setMarquardtScheme().

◆ setMarquardtScheme()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setMarquardtScheme ( double  lambdaFactor = 0.8)
inline

Marquardt scheme (local damping with decreasing regularization strength

no contribution of regularization to objective function

lambda is decreased towards zero

let the solution fully converge (important for statistics)

References GIMLI::Inversion< ModelValType >::setLocalRegularization(), and GIMLI::Inversion< ModelValType >::stopAtChi1().

◆ setMaxCGLSIter()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setMaxCGLSIter ( int  iter)
inline

Set and get maximum iteration number for inverse sub step

References GIMLI::Inversion< ModelValType >::iter().

◆ setMaxIter()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setMaxIter ( int  maxiter)
inlinevirtual

Set and get maximum iteration number

Implements GIMLI::InversionBase< ModelValType >.

◆ setModel()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setModel ( const Vec model)
inlinevirtual

Set model vector . If you call run() the inversion starts with this model, otherwise it will start with fop.startModel().

Implements GIMLI::InversionBase< ModelValType >.

References GIMLI::Inversion< ModelValType >::model().

Referenced by GIMLI::Inversion< ModelValType >::reset(), and GIMLI::Inversion< ModelValType >::run().

◆ setMWeight()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setMWeight ( const Vec mweight)
inline

Set the model weight vector

◆ setOptimizeLambda()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setOptimizeLambda ( bool  opt)
inline

Set and get whether lambda is being optimized by Lcurve

◆ setRecalcJacobian()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setRecalcJacobian ( bool  recalc)
inline

Define and find out whether Jacobian is recalculated in each iteration

◆ setReferenceModel()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setReferenceModel ( const Vec model)
inlinevirtual

Set reference model vector

Implements GIMLI::InversionBase< ModelValType >.

References GIMLI::Inversion< ModelValType >::model().

◆ setRelativeError() [1/2]

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setRelativeError ( const Vec e)
inline

◆ setRelativeError() [2/2]

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setRelativeError ( double  relerr)
inline

Set relative data error to scalar error value relerr. If you force relerr == 0 here. Data will not corrected or weighted.

References GIMLI::Inversion< ModelValType >::fixError_, and GIMLI::Inversion< ModelValType >::setRelativeError().

◆ setResponse()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setResponse ( const Vec response)
inline

Set current model response (e.g. to avoid time-consuming forward calculation, but be careful)

References GIMLI::Inversion< ModelValType >::response().

◆ setRobustData()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setRobustData ( bool  isRobust)
inline

Set and get robust data weighting by L1 reweighting scheme

◆ setTransData()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setTransData ( Trans< Vec > &  tD)
inlinevirtual

Set and get data transform. WARNING! we just store a reference to the trans .. U have to ensure that the trans is and stayes valid. TODO change this!!!

Implements GIMLI::InversionBase< ModelValType >.

Referenced by GIMLI::Inversion< ModelValType >::Inversion().

◆ setTransModel()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setTransModel ( Trans< Vec > &  tM)
inlinevirtual

Set and get Model transform WARNING! we just store a reference to the trans .. U have to ensure that the trans is and stayes valid. TODO change this!!!

Implements GIMLI::InversionBase< ModelValType >.

Referenced by GIMLI::Inversion< ModelValType >::checkTransFunctions(), and GIMLI::Inversion< ModelValType >::Inversion().

◆ setVerbose()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::setVerbose ( bool  verbose)
inline

Set verbose output

◆ start()

template<class ModelValType >
const Vector< ModelValType > & GIMLI::Inversion< ModelValType >::start ( )

Start the inversion procedure from starting model.

Start inversion from starting model.

References GIMLI::Inversion< ModelValType >::reset(), and GIMLI::Inversion< ModelValType >::run().

Referenced by GIMLI::Inversion< ModelValType >::invSubStep().

◆ stopAtChi1()

template<class ModelValType>
void GIMLI::Inversion< ModelValType >::stopAtChi1 ( bool  stopAtChi1)
inline

Member Data Documentation

◆ fixError_

template<class ModelValType>
bool GIMLI::Inversion< ModelValType >::fixError_
protected

◆ modelHist_

template<class ModelValType>
std::vector< RVector > GIMLI::Inversion< ModelValType >::modelHist_
protected