Geophysical Inversion and Modelling Library v1.5.4
Loading...
Searching...
No Matches
GIMLI::RInversion Class Reference

#include <inversion.h>

+ Inheritance diagram for GIMLI::RInversion:

Public Types

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

Public Member Functions

 RInversion (bool verbose=false, bool dosave=false)
 
 RInversion (ModellingBase &forward, bool verbose=false, bool dosave=false)
 
 RInversion (const Vec &data, ModellingBase &forward, bool verbose=false, bool dosave=false)
 
 RInversion (const Vec &data, ModellingBase &forward, Trans< Vec > &transData, bool verbose=true, bool dosave=false)
 
 RInversion (const Vec &data, ModellingBase &forward, Trans< Vec > &transData, Trans< Vec > &transModel, bool verbose=true, bool dosave=false)
 
virtual ~RInversion ()
 
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 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 checkConstraints ()
 
void checkJacobian (bool force=false)
 
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 roughness () const
 
RVector pureRoughness (const RVector &model) 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
 
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
 
void reset ()
 
- Public Member Functions inherited from GIMLI::InversionBase< double >
 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 constraintWeights_
 
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 activateFillConstraintWeights_
 
bool fixError_
 
std::vector< RVectormodelHist_
 

Detailed Description

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

◆ RInversion() [1/5]

GIMLI::RInversion::RInversion ( 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 init_(), and GIMLI::InversionBase< double >::InversionBase().

◆ RInversion() [2/5]

GIMLI::RInversion::RInversion ( ModellingBase & forward,
bool verbose = false,
bool dosave = false )
inline

Contructor for forward operator only

References init_(), GIMLI::InversionBase< double >::InversionBase(), and setForwardOperator().

◆ RInversion() [3/5]

GIMLI::RInversion::RInversion ( 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 data(), init_(), GIMLI::InversionBase< double >::InversionBase(), setData(), and setForwardOperator().

◆ RInversion() [4/5]

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

Intermediate constructor including transforms and data transformation function

References data(), init_(), GIMLI::InversionBase< double >::InversionBase(), setData(), setForwardOperator(), and setTransData().

◆ RInversion() [5/5]

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

Full constructor including transforms. transData – data transformation function; transModel – model transformation function

References data(), init_(), GIMLI::InversionBase< double >::InversionBase(), setData(), setForwardOperator(), setTransData(), and setTransModel().

◆ ~RInversion()

virtual GIMLI::RInversion::~RInversion ( )
inlinevirtual

Destructor. Frees allocated memory

Member Function Documentation

◆ abort()

void GIMLI::RInversion::abort ( )
inlinevirtual

Force abort at next iteration

Implements GIMLI::InversionBase< double >.

◆ absrms()

double GIMLI::RInversion::absrms ( ) const
inline

Return last absolute RMS misfit

◆ checkConstraints()

void GIMLI::RInversion::checkConstraints ( )

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

Referenced by run().

◆ checkError()

void GIMLI::RInversion::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 errorDefault_(), and fixError_.

Referenced by robustWeighting(), run(), and setRelativeError().

◆ checkJacobian()

void GIMLI::RInversion::checkJacobian ( bool force = false)

Check size of Jacobian matrix against data and model number

References GIMLI::Stopwatch::duration().

Referenced by oneStep(), and run().

◆ checkTransFunctions()

void GIMLI::RInversion::checkTransFunctions ( )
inline

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

References setTransModel().

Referenced by run().

◆ chi2()

double GIMLI::RInversion::chi2 ( ) const
inlinevirtual

Return last chi-squared data misfit

Implements GIMLI::InversionBase< double >.

References getPhiD().

Referenced by echoStatus(), and runChi1().

◆ constrainBlocky()

void GIMLI::RInversion::constrainBlocky ( )
inline

Apply blocky model constraints (see also setBlockyModel)

References GIMLI::getIRLSWeights(), and setCWeight().

Referenced by run().

◆ constraintsCount()

uint GIMLI::RInversion::constraintsCount ( ) const
inline

Return number of constraints

Referenced by oneStep().

◆ cWeight()

const Vec & GIMLI::RInversion::cWeight ( ) const
inlinevirtual

Return reference to the current constraints weight vector

Implements GIMLI::InversionBase< double >.

Referenced by setCWeight().

◆ data()

const Vec & GIMLI::RInversion::data ( ) const
inline

Get data vector

Referenced by invert(), RInversion(), RInversion(), RInversion(), and setData().

◆ dataCount()

uint GIMLI::RInversion::dataCount ( ) const
inline

Return number of data

◆ echoStatus() [1/2]

void GIMLI::RInversion::echoStatus ( ) const
inline

Shortcut for echoStatus(response_, model_).

References echoStatus().

Referenced by echoStatus(), linesearch(), and oneStep().

◆ echoStatus() [2/2]

void GIMLI::RInversion::echoStatus ( const Vec & response,
const Vec & model,
const std::string & xtra = "" ) const
inline

Echo PhiD/PhiM/Phi and Chi^2 for given model and response

References chi2(), getPhi(), getPhiD(), getPhiM(), model(), and response().

◆ error()

const Vec & GIMLI::RInversion::error ( ) const
inline

Return the used data error

◆ errorDefault_()

Vec GIMLI::RInversion::errorDefault_ ( )
inline

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

Referenced by checkError().

◆ fop()

ModellingBase * GIMLI::RInversion::fop ( )
inline

Return forward operator. Shortcut for forwardOperator()

References forwardOperator().

◆ forwardOperator()

ModellingBase * GIMLI::RInversion::forwardOperator ( )
inlinevirtual

Return forward operator.

Implements GIMLI::InversionBase< double >.

Referenced by fop().

◆ getChi2() [1/2]

double GIMLI::RInversion::getChi2 ( ) const
inline

Return the chi-squared data misfit DEPRECATED wrong nameing scheme

References getPhiD().

Referenced by runChi1().

◆ getChi2() [2/2]

double GIMLI::RInversion::getChi2 ( const Vec & response) const
inline

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

References getPhiD(), and response().

◆ getIRLS()

Vec GIMLI::RInversion::getIRLS ( ) const
inline

Return IRLS function of roughness vector

References GIMLI::getIRLSWeights().

◆ getPhi() [1/2]

double GIMLI::RInversion::getPhi ( ) const
inline

Shortcut for getPhi(model_, response_) necessary ? DEPRECATED wrong nameing scheme

References getPhiD(), and getPhiM().

Referenced by run().

◆ getPhi() [2/2]

double GIMLI::RInversion::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 getPhiD(), getPhiM(), model(), and response().

Referenced by echoStatus(), linesearch(), and linesearchQuad().

◆ getPhiD() [1/2]

double GIMLI::RInversion::getPhiD ( ) const
inline

Shortcut for getPhiD(response_) necessary ? DEPRECATED wrong nameing scheme

References getPhiD().

Referenced by getPhiD(), optLambda(), and run().

◆ getPhiD() [2/2]

double GIMLI::RInversion::getPhiD ( const Vec & response) const

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

References response().

Referenced by chi2(), echoStatus(), getChi2(), getChi2(), getPhi(), getPhi(), and linesearch().

◆ getPhiM() [1/2]

double GIMLI::RInversion::getPhiM ( ) const
inline

Shortcut for getPhiM(model_) necessary ? DEPRECATED wrong nameing scheme

References getPhiM().

Referenced by getPhiM(), optLambda(), and run().

◆ getPhiM() [2/2]

double GIMLI::RInversion::getPhiM ( const Vec & model) const

Return model objective function (squared model roughness)

References model(), and roughness().

Referenced by echoStatus(), getPhi(), and getPhi().

◆ init_()

void GIMLI::RInversion::init_ ( )
inlineprotected

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

References fixError_.

Referenced by RInversion(), RInversion(), RInversion(), RInversion(), and RInversion().

◆ invert()

const RVector & GIMLI::RInversion::invert ( const Vec & data)

Start the inversion with specific data.

References data(), reset(), run(), and setData().

◆ invSubStep()

Vec GIMLI::RInversion::invSubStep ( const Vec & rhs)
inline

Compute model update by solving one inverse sub-step

Parameters
rhsThe right-hand-side vector of the system of equation

!! h-variante

◆ isRunning()

bool GIMLI::RInversion::isRunning ( ) const
inlinevirtual

Return true if inversion is running

Implements GIMLI::InversionBase< double >.

◆ iter()

uint GIMLI::RInversion::iter ( ) const
inlinevirtual

Return curent iteration number

Implements GIMLI::InversionBase< double >.

Referenced by runChi1(), and setMaxCGLSIter().

◆ lambdaMinimum()

double GIMLI::RInversion::lambdaMinimum ( ) const
inline

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

◆ linesearch()

double GIMLI::RInversion::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 echoStatus(), getPhi(), getPhiD(), and linesearchQuad().

Referenced by oneStep(), and setLineSearch().

◆ linesearchQuad()

double GIMLI::RInversion::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 getPhi().

Referenced by linesearch().

◆ localRegularization()

bool GIMLI::RInversion::localRegularization ( ) const
inline

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

◆ model()

const ModelVector & GIMLI::RInversion::model ( ) const
inlinevirtual

Return a const reference to the current model vector

Implements GIMLI::InversionBase< double >.

Referenced by echoStatus(), getPhi(), getPhiM(), pureRoughness(), roughness(), runChi1(), setModel(), and setReferenceModel().

◆ modelCellResolution() [1/2]

Vec GIMLI::RInversion::modelCellResolution ( const RVector3 & pos)
inline

Compute cell resolution for closest cell to given position

References modelCellResolution().

◆ modelCellResolution() [2/2]

Vec GIMLI::RInversion::modelCellResolution ( int iModel)
inline

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

Referenced by modelCellResolution(), and modelResolutionMatrix().

◆ modelHistory()

const std::vector< RVector > & GIMLI::RInversion::modelHistory ( ) const
inline

Return the single models for each iteration. For debugging.

References modelHist_.

◆ modelResolutionMatrix()

RMatrix GIMLI::RInversion::modelResolutionMatrix ( )
inline

Compute whole resolution matrix by single cell resolutions

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

◆ mWeight()

const Vec & GIMLI::RInversion::mWeight ( ) const
inline

Return reference to the current model weight vector

◆ oneStep()

bool GIMLI::RInversion::oneStep ( )

!! h-variante

One iteration step. Return true if the step can be calculated successfully else false is returned.

full step possible;

normal line search parameter between 0.03 and 0.94

** temporary stuff

References checkJacobian(), constraintsCount(), echoStatus(), linesearch(), optLambda(), roughness(), and roughness().

Referenced by run().

◆ optLambda()

RVector GIMLI::RInversion::optLambda ( const Vec & deltaData,
const Vec & deltaModel0 )

Optimization of regularization parameter by L-curve

References getPhiD(), getPhiM(), roughness(), and roughness().

Referenced by oneStep().

◆ pureRoughness()

RVector GIMLI::RInversion::pureRoughness ( const RVector & model) const
inline

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

References model().

◆ relrms()

double GIMLI::RInversion::relrms ( ) const
inline

Return last relative RMS misfit

◆ reset()

void GIMLI::RInversion::reset ( )
inline

Resets this inversion to the given startmodel.

References setModel().

Referenced by invert(), and start().

◆ response()

const Vec & GIMLI::RInversion::response ( ) const
inline

Return a reference to the current response vector

Referenced by echoStatus(), getChi2(), getPhi(), getPhiD(), and setResponse().

◆ robustWeighting()

void GIMLI::RInversion::robustWeighting ( )
inline

Call robust date reweighting (see also setRobustData)

References checkError(), and GIMLI::getIRLSWeights().

Referenced by run().

◆ roughness() [1/2]

RVector GIMLI::RInversion::roughness ( ) const
inline

Shortcut for roughness for the current model vector

References roughness().

Referenced by getPhiM(), oneStep(), and optLambda().

◆ roughness() [2/2]

RVector GIMLI::RInversion::roughness ( const RVector & model) const
inline

Return (C * m * m_w) * c_w

References model().

Referenced by oneStep(), optLambda(), and roughness().

◆ run()

const RVector & GIMLI::RInversion::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

validate and rebuild the jacobian if necessary

Implements GIMLI::InversionBase< double >.

References checkConstraints(), checkError(), checkJacobian(), checkTransFunctions(), constrainBlocky(), getPhi(), getPhiD(), getPhiM(), modelHist_, oneStep(), robustWeighting(), and setModel().

Referenced by invert(), runChi1(), and start().

◆ runChi1()

Vec GIMLI::RInversion::runChi1 ( double acc = 0.01,
int maxiter = 50 )
inline

Specialized run function that tries to reach a datafit chi^2=1 by varying the regularization paramater lambda

References chi2(), getChi2(), iter(), model(), run(), setLambda(), and stopAtChi1().

◆ saveModelHistory()

void GIMLI::RInversion::saveModelHistory ( bool doSaveModelHistory)
inline

Set and get verbose behaviour

◆ setAbsoluteError() [1/2]

void GIMLI::RInversion::setAbsoluteError ( const Vec & abserr)
inline

Set the absolute data error to the vector abserr

References setRelativeError().

◆ setAbsoluteError() [2/2]

void GIMLI::RInversion::setAbsoluteError ( double abserr)
inline

Set absolute data error to the scalar value abserr

References setRelativeError().

◆ setBlockyModel()

void GIMLI::RInversion::setBlockyModel ( bool isBlocky)
inline

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

◆ setBroydenUpdate()

void GIMLI::RInversion::setBroydenUpdate ( bool broydenUpdate)
inline

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

◆ setCGLSTolerance()

void GIMLI::RInversion::setCGLSTolerance ( double tol)
inline

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

◆ setConstraintsH()

void GIMLI::RInversion::setConstraintsH ( const Vec & constraintsH)
inline

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

◆ setCWeight()

void GIMLI::RInversion::setCWeight ( const Vec & cWeight)
inline

Set the constraint weight (boundary control) vector

References cWeight().

Referenced by constrainBlocky().

◆ setData()

void GIMLI::RInversion::setData ( const Vec & data)
inlinevirtual

Set data vector

Implements GIMLI::InversionBase< double >.

References data().

Referenced by invert(), RInversion(), RInversion(), and RInversion().

◆ setDeltaPhiAbortPercent()

void GIMLI::RInversion::setDeltaPhiAbortPercent ( double dPhi)
inline

Set and get relative objective function decrease

◆ setDoSave()

void GIMLI::RInversion::setDoSave ( bool d)
inline

Set debug output

◆ setError()

void GIMLI::RInversion::setError ( const Vec & err,
bool isRelative = true )
inlinevirtual

◆ setForwardOperator()

void GIMLI::RInversion::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< double >.

Referenced by RInversion(), RInversion(), RInversion(), and RInversion().

◆ setLambda()

void GIMLI::RInversion::setLambda ( double lambda)
inlinevirtual

Set and get regularization parameter and its change over iteration

Implements GIMLI::InversionBase< double >.

Referenced by runChi1().

◆ setLambdaMinimum()

void GIMLI::RInversion::setLambdaMinimum ( double l)
inline

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

◆ setLineSearch()

void GIMLI::RInversion::setLineSearch ( bool linesearch)
inline

Set and get line search

References linesearch().

◆ setLocalRegularization()

void GIMLI::RInversion::setLocalRegularization ( bool localReg)
inline

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

Referenced by setMarquardtScheme().

◆ setMarquardtScheme()

void GIMLI::RInversion::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 setLocalRegularization(), and stopAtChi1().

◆ setMaxCGLSIter()

void GIMLI::RInversion::setMaxCGLSIter ( int iter)
inline

Set and get maximum iteration number for inverse sub step

References iter().

◆ setMaxIter()

void GIMLI::RInversion::setMaxIter ( int maxiter)
inlinevirtual

Set and get maximum iteration number

Implements GIMLI::InversionBase< double >.

◆ setModel()

void GIMLI::RInversion::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< double >.

References model().

Referenced by reset(), and run().

◆ setMWeight()

void GIMLI::RInversion::setMWeight ( const Vec & mweight)
inline

Set the model weight vector

◆ setOptimizeLambda()

void GIMLI::RInversion::setOptimizeLambda ( bool opt)
inline

Set and get whether lambda is being optimized by Lcurve

◆ setRecalcJacobian()

void GIMLI::RInversion::setRecalcJacobian ( bool recalc)
inline

Define and find out whether Jacobian is recalculated in each iteration

◆ setReferenceModel()

void GIMLI::RInversion::setReferenceModel ( const Vec & model)
inlinevirtual

Set reference model vector

Implements GIMLI::InversionBase< double >.

References model().

◆ setRelativeError() [1/2]

void GIMLI::RInversion::setRelativeError ( const Vec & e)
inline

Set the relative data error to the vector err.

References checkError().

Referenced by setAbsoluteError(), setAbsoluteError(), and setRelativeError().

◆ setRelativeError() [2/2]

void GIMLI::RInversion::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 fixError_, and setRelativeError().

◆ setResponse()

void GIMLI::RInversion::setResponse ( const Vec & response)
inline

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

References response().

◆ setRobustData()

void GIMLI::RInversion::setRobustData ( bool isRobust)
inline

Set and get robust data weighting by L1 reweighting scheme

◆ setTransData()

void GIMLI::RInversion::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< double >.

Referenced by RInversion(), and RInversion().

◆ setTransModel()

void GIMLI::RInversion::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< double >.

Referenced by checkTransFunctions(), and RInversion().

◆ setVerbose()

void GIMLI::RInversion::setVerbose ( bool verbose)
inline

Set verbose output

◆ start()

const RVector & GIMLI::RInversion::start ( )

Start the inversion procedure from starting model.

Start inversion from starting model.

References reset(), and run().

◆ stopAtChi1()

void GIMLI::RInversion::stopAtChi1 ( bool stopAtChi1)
inline

Define whether minimization stops at chi^2=1

References stopAtChi1().

Referenced by runChi1(), setMarquardtScheme(), and stopAtChi1().

Member Data Documentation

◆ fixError_

bool GIMLI::RInversion::fixError_
protected

Set this to zero if u want to use absolute errors == zero

Referenced by checkError(), init_(), and setRelativeError().

◆ modelHist_

std::vector< RVector > GIMLI::RInversion::modelHist_
protected

Hold old models, for debuging

Referenced by modelHistory(), and run().