Geophysical Inversion and Modelling Library  v1.5.2-5-g042d7f36
GIMLI::DCMultiElectrodeModelling Class Reference
+ Inheritance diagram for GIMLI::DCMultiElectrodeModelling:
+ Collaboration diagram for GIMLI::DCMultiElectrodeModelling:

Public Member Functions

 DCMultiElectrodeModelling (bool verbose=false)
 
 DCMultiElectrodeModelling (Mesh &mesh, bool verbose=false)
 
 DCMultiElectrodeModelling (DataContainerERT &dataContainer, bool verbose=false)
 
 DCMultiElectrodeModelling (Mesh &mesh, DataContainerERT &dataContainer, bool verbose=false)
 
void assembleStiffnessMatrixDCFEMByPass (RSparseMatrix &S)
 
void assembleStiffnessMatrixDCFEMByPass (CSparseMatrix &S)
 
virtual void createJacobian (const RVector &model)
 
virtual void createConstraints ()
 
DataContainerERTdataContainer () const
 
virtual RVector createDefaultStartModel ()
 
void mapERTModel (const CVector &model, Complex background)
 
void mapERTModel (const RVector &model, double background)
 
virtual RVector response (const RVector &model)
 
RVector response (const RVector &model, double background)
 
void createCurrentPattern (std::vector< ElectrodeShape * > &eA, std::vector< ElectrodeShape * > &eB, bool reciprocity)
 
virtual void calculate (DataMap &dMap)
 
virtual void calculate (DataContainerERT &data, bool reciprocity=false)
 
virtual void calculate (const std::vector< ElectrodeShape * > &eA, const std::vector< ElectrodeShape * > &eB)
 
virtual void calculateK (const std::vector< ElectrodeShape * > &eA, const std::vector< ElectrodeShape * > &eB, RMatrix &solutionK, int kIdx)
 
virtual void calculateK (const std::vector< ElectrodeShape * > &eA, const std::vector< ElectrodeShape * > &eB, CMatrix &solutionK, int kIdx)
 
template<class ValueType >
void calculateKAnalyt (const std::vector< ElectrodeShape * > &eA, const std::vector< ElectrodeShape * > &eB, Matrix< ValueType > &solutionK, double k, int kIdx) const
 
void setTopography (bool topography)
 
bool topography () const
 
bool neumann () const
 
void setComplex (bool c)
 
bool complex () const
 
void setDipoleCurrentPattern (bool dipole)
 
bool dipoleCurrentPattern () const
 
void setAnalytical (bool ana)
 
bool analytical () const
 
void collectSubPotentials (RMatrix &subSolutions)
 
const std::map< Index, Index > & currentPatternIdxMap () const
 
void setBypassMapFile (const std::string &fileName)
 
void setkValues (const RVector &v)
 
const RVectorkValues () const
 
void setWeights (const RVector &v)
 
const RVectorweights () const
 
const std::vector< ElectrodeShape * > & electrodes () const
 
void setContactImpedances (const RVector &zi)
 
virtual RVector calcGeometricFactor (const DataContainerERT &data, Index nModel=0)
 
virtual void preCalculate (const std::vector< ElectrodeShape * > &eA, const std::vector< ElectrodeShape * > &eB)
 
void setSingValue (bool s=true)
 
bool isSetSingValue () const
 
void setSolver (SolverWrapper *solver)
 
- Public Member Functions inherited from GIMLI::ModellingBase
 ModellingBase (bool verbose=false)
 
 ModellingBase (DataContainer &dataContainer, bool verbose=false)
 
 ModellingBase (const Mesh &mesh, bool verbose=false)
 
 ModellingBase (const Mesh &mesh, DataContainer &dataContainer, bool verbose=false)
 
void setVerbose (bool verbose)
 
bool verbose () const
 
virtual RVector response_mt (const RVector &model, Index i=0) const
 
RVector operator() (const RVector &model)
 
void setData (DataContainer &data)
 
DataContainerdata () const
 
virtual RVector startModel ()
 
virtual void setStartModel (const RVector &startModel)
 
void setMesh (const Mesh &mesh, bool ignoreRegionManager=false)
 
Meshmesh ()
 
void createRefinedForwardMesh (bool refine=true, bool pRefine=false)
 
void deleteMesh ()
 
virtual void setJacobian (MatrixBase *J)
 
virtual void createJacobian (const RVector &model, const RVector &resp)
 
virtual void createJacobian_mt (const RVector &model, const RVector &resp)
 
virtual void initJacobian ()
 
MatrixBasejacobian ()
 
MatrixBasejacobian () const
 
virtual RMatrixjacobianRef () const
 
virtual RMatrixjacobianRef ()
 
virtual void clearJacobian ()
 
RVector createMappedModel (const RVector &model, double background=-9e99) const
 
void setRegionManager (RegionManager *reg)
 
const RegionManagerregionManager () const
 
RegionManagerregionManager ()
 
RegionManagerregionManagerRef ()
 
bool verbose ()
 
Regionregion (int marker)
 
RVector createStartModel ()
 
RVector createStartVector ()
 
void initRegionManager ()
 
void setThreadCount (Index nThreads)
 
Index threadCount ()
 
void setMultiThreadJacobian (Index nThreads)
 
Index multiThreadJacobian () const
 

Protected Member Functions

template<class ValueType >
void calculateK_ (const std::vector< ElectrodeShape * > &eA, const std::vector< ElectrodeShape * > &eB, Matrix< ValueType > &solutionK, int kIdx)
 
template<class ValueType >
void assembleStiffnessMatrixDCFEMByPass_ (SparseMatrix< ValueType > &S)
 
template<class ValueType >
DataMap response_ (const Vector< ValueType > &model, ValueType background)
 
template<class ValueType >
Matrix< ValueType > * prepareJacobianT_ (const Vector< ValueType > &model)
 
RMatrixprepareJacobian_ (const RVector &model)
 
CMatrixprepareJacobian_ (const CVector &model)
 
void createJacobian_ (const RVector &model, const RMatrix &u, RMatrix *J)
 
void createJacobian_ (const CVector &model, const CMatrix &u, CMatrix *J)
 
virtual void deleteMeshDependency_ ()
 
virtual void updateMeshDependency_ ()
 
virtual void updateDataDependency_ ()
 
virtual void searchElectrodes_ ()
 
- Protected Member Functions inherited from GIMLI::ModellingBase
void setMesh_ (const Mesh &mesh, bool update=true)
 

Protected Attributes

MatrixBasesubSolutions_
 
bool complex_
 
bool JIsRMatrix_
 
bool JIsCMatrix_
 
bool analytical_
 
bool topography_
 
bool neumannDomain_
 
bool subpotOwner_
 
bool lastIsReferenz_
 
bool setSingValue_
 
std::string byPassFile_
 
RVector kValues_
 
RVector weights_
 
double surfaceZ_
 
IndexArray calibrationSourceIdx_
 
IndexArray bypassNodeIdx_
 
std::vector< ElectrodeShape * > electrodes_
 
ElectrodeShapeelectrodeRef_
 
std::vector< ElectrodeShape * > passiveCEM_
 
RVector3 sourceCenterPos_
 
bool buildCompleteElectrodeModel_
 
bool dipoleCurrentPattern_
 
std::map< Index, Index > currentPatternIdxMap_
 
RMatrix potentialsCEM_
 
RVector vContactImpedance_
 
DataMapprimDataMap_
 
SolverWrappersolver_
 
- Protected Attributes inherited from GIMLI::ModellingBase
Meshmesh_
 
DataContainerdataContainer_
 
MatrixBasejacobian_
 
bool ownJacobian_
 
MatrixBaseconstraints_
 
bool ownConstraints_
 
RMatrix solutions_
 
RVector startModel_
 
bool verbose_
 
bool regionManagerInUse_
 
bool ownRegionManager_
 
Index nThreads_
 
Index nThreadsJacobian_
 

Member Function Documentation

◆ assembleStiffnessMatrixDCFEMByPass()

void GIMLI::DCMultiElectrodeModelling::assembleStiffnessMatrixDCFEMByPass ( RSparseMatrix S)

Assemble bypasses into the system matrix, i.e., defined shorting circuits that my be useful in some cases, e.g., long electrodes. You can provide a file 'bypass.map' in your your working path.
This can be overwritten by setting a alternative name for the bypass maps. setBypassMapFile.
Nodes with a marker leq than -10000 will be recognized and combined into a single bypass electrode with bypass resistance 1e-6 Ohm between the first and all other nodes.
You can provide a file electrodeBypassResistances.map in the working path to specify the bypass resistance in Ohm for all bypass nodes. e.g, -10000 resistance -10001 resistance

◆ calculate()

void GIMLI::DCMultiElectrodeModelling::calculate ( DataMap dMap)
virtual

◆ complex()

bool GIMLI::DCMultiElectrodeModelling::complex ( ) const
inline

Return true if the valuetype is complex.

◆ createDefaultStartModel()

RVector GIMLI::DCMultiElectrodeModelling::createDefaultStartModel ( )
virtual

Essential for abstract class ModellingBase, This method will run by startModel() if no startmodel vector is predefined.

Reimplemented from GIMLI::ModellingBase.

References GIMLI::Vector< ValueType >::fill().

◆ createJacobian()

void GIMLI::DCMultiElectrodeModelling::createJacobian ( const RVector model)
virtual

Create and fill the Jacobian matrix with a given model vector.

Reimplemented from GIMLI::ModellingBase.

◆ currentPatternIdxMap()

const std::map< Index, Index >& GIMLI::DCMultiElectrodeModelling::currentPatternIdxMap ( ) const
inline

Return dipole current pattern map. corresponds to < CurrentPattern,Idx of Potentialmatrix >

◆ dipoleCurrentPattern()

bool GIMLI::DCMultiElectrodeModelling::dipoleCurrentPattern ( ) const
inline

Return if dipole current pattern is used.

◆ isSetSingValue()

bool GIMLI::DCMultiElectrodeModelling::isSetSingValue ( ) const
inline

Return true if singular value estimation is switched on.

◆ mapERTModel() [1/2]

void GIMLI::DCMultiElectrodeModelling::mapERTModel ( const CVector model,
Complex  background 
)

Map resistivity model to the cell attributes for further calculation. Default is resistivity=model[cell.marker()]. Empty cells will set to background or prolongated for background==-9e99. If model size equals the mesh().cellCount() then the values are just copied. i.e., resistivity=model[cell.id()].

References GIMLI::setComplexResistivities().

◆ mapERTModel() [2/2]

void GIMLI::DCMultiElectrodeModelling::mapERTModel ( const RVector model,
double  background 
)

Map resistivity model to the cell attributes for further calculation. Default is resistivity=model[cell.marker()]. Empty cells will set to background or prolongated for background==-9e99. If model size equals the mesh().cellCount() then the values are just copied. i.e., resistivity=model[cell.id()].

◆ prepareJacobianT_()

template<class ValueType >
Matrix< ValueType > * GIMLI::DCMultiElectrodeModelling::prepareJacobianT_ ( const Vector< ValueType > &  model)
protected

We have to scale subSolutions_ for the analytical solution to match the model

References GIMLI::Matrix< ValueType >::rows().

◆ response() [1/2]

virtual RVector GIMLI::DCMultiElectrodeModelling::response ( const RVector model)
inlinevirtual

Calculate response for a given resistivity model. Either cell based or marker based. See mapERTModel

Reimplemented from GIMLI::ModellingBase.

References response().

Referenced by response().

◆ response() [2/2]

RVector GIMLI::DCMultiElectrodeModelling::response ( const RVector model,
double  background 
)

Calculate response for a given resistivity model. Either cell based or marker based. See mapERTModel

References GIMLI::DataMap::data(), GIMLI::prepExportPotentialData(), and GIMLI::Vector< ValueType >::save().

◆ searchElectrodes_()

void GIMLI::DCMultiElectrodeModelling::searchElectrodes_ ( )
protectedvirtual

!** match the known electrode to list of electrodes from the datacontainer

!** For 2d-problems we have to check if xy or xz coordinates are given !** only xy is valid so it is necessary to swap the coordinates

References GIMLI::y(), and GIMLI::z().

◆ setAnalytical()

void GIMLI::DCMultiElectrodeModelling::setAnalytical ( bool  ana)
inline

Force analytical calculation.

◆ setBypassMapFile()

void GIMLI::DCMultiElectrodeModelling::setBypassMapFile ( const std::string &  fileName)
inline

Provide a file with a list of pairs:
electrodeID electrodeID resistance
or
nodeMarker resistance
that are short circuited.

◆ setComplex()

void GIMLI::DCMultiElectrodeModelling::setComplex ( bool  c)

Force complex resistivity calculation if it not set in prior to the mesh.

◆ setDipoleCurrentPattern()

void GIMLI::DCMultiElectrodeModelling::setDipoleCurrentPattern ( bool  dipole)
inline

Use dipole-current pattern instead of default pol-current pattern. The needed current pattern are collected from the data container. Note, that is different to calculate with reference electrode since this can be also handled as pol-current pattern while data collection. If use dipole-current the reciprocity data collection is disabled.

◆ setSingValue()

void GIMLI::DCMultiElectrodeModelling::setSingValue ( bool  s = true)
inline

Estimate singular value for the calulated potential if the source electrode position lies on an node.

◆ setSolver()

void GIMLI::DCMultiElectrodeModelling::setSolver ( SolverWrapper solver)
inline

Set a custom solver if you don't want the default Choldmod or UMFPACK.