Geophysical Inversion and Modelling Library  jenkins-pyGIMLi_release-295-SUCCESS-1-geb9a2204
GIMLI::RegionManager Class Reference
+ Collaboration diagram for GIMLI::RegionManager:

Public Member Functions

 RegionManager (bool verbose=true)
 
RegionManageroperator= (const RegionManager &rm)
 
void setVerbose (bool verbose)
 
bool verbose () const
 
void clear ()
 
void setMesh (const Mesh &mesh, bool holdRegionInfos=false)
 
const Meshmesh () const
 
MeshpMesh ()
 
RegionaddRegion (SIndex marker)
 
RegionaddRegion (SIndex marker, const Mesh &mesh)
 
RegionaddRegion (SIndex marker, const Mesh &mesh, SIndex cellMarker)
 
const std::map< SIndex, Region *> & regions () const
 
std::map< SIndex, Region *> * regions ()
 
Index regionCount () const
 
IVector regionIdxs () const
 
Regionregion (SIndex marker)
 
bool regionExists (SIndex marker)
 
void loadMap (const std::string &fname)
 
void saveMap (const std::string &fname)
 
void setParameterCount (Index count)
 
Index parameterCount () const
 
Index constraintCount () const
 
Index interRegionConstraintsCount () const
 
RVector createStartModel ()
 
void fillStartModel (RVector &vec)
 
void fillStartVector (RVector &vec)
 
RVector createStartVector ()
 
RVector createModelControl ()
 
void fillModelControl (RVector &vec)
 
RVector constraintWeights ()
 
void fillConstraintWeights (RVector &vec)
 
void fillConstraints (RSparseMapMatrix &C)
 
void setZWeight (double z)
 
void setConstraintType (Index type)
 
void fillBoundarySize (RVector &vec)
 
const MeshparaDomain () const
 
MeshparaDomain ()
 
std::vector< RVector3boundaryNorm () const
 
void permuteParameterMarker (const IVector &p)
 
void createParaDomain_ ()
 
void recountParaMarker_ ()
 
TransCumulative< RVector > * transModel ()
 
void setLocalTransFlag (bool flag)
 
bool haveLocalTrans () const
 
void setInterRegionConstraint (SIndex a, SIndex b, double weight)
 
const std::map< std::pair< SIndex, SIndex >, double > interRegionConstraints () const
 
void setInterfaceConstraint (SIndex marker, double weight)
 
const std::map< SIndex, double > interfaceConstraints () const
 

Protected Member Functions

void copy_ (const RegionManager &rm)
 
void findInterRegionInterfaces_ ()
 
RegioncreateRegion_ (SIndex marker, const Mesh &mesh, SIndex cellMarker)
 
RegioncreateSingleRegion_ (SIndex marker, const std::vector< Cell * > &cells)
 
IVector allRegionMarker_ (bool excludeBoundary=false) const
 

Protected Attributes

bool verbose_
 
bool isPermuted_
 
Index parameterCount_
 
Meshmesh_
 
MeshparaDomain_
 
std::map< SIndex, Region *> regionMap_
 
std::map< std::pair< SIndex, SIndex >, std::list< Boundary *> > interRegionInterfaceMap_
 
std::map< std::pair< SIndex, SIndex >, double > interRegionConstraints_
 
std::map< SIndex, double > interfaceConstraints_
 
RVector _cWeights
 
double interRegionConstraintZWeights_
 
TransCumulative< RVectorlocalTrans_
 
bool haveLocalTrans_
 
bool localTransHaveChanges_
 

Member Function Documentation

◆ addRegion() [1/2]

Region * GIMLI::RegionManager::addRegion ( SIndex  marker)

Add an new single region.

Referenced by GIMLI::TTModellingWithOffset::TTModellingWithOffset().

◆ addRegion() [2/2]

Region * GIMLI::RegionManager::addRegion ( SIndex  marker,
const Mesh mesh,
SIndex  cellMarker 
)

◆ constraintCount()

Index GIMLI::RegionManager::constraintCount ( ) const

Return global amount of constraints

References GIMLI::x().

Referenced by GIMLI::RInversion::run().

◆ constraintWeights()

RVector GIMLI::RegionManager::constraintWeights ( )

Return constraint weights. They are created together with the constraints matrix

Referenced by GIMLI::RInversion::checkConstraints().

◆ createModelControl()

RVector GIMLI::RegionManager::createModelControl ( )

Create and fill global model-weight vector

◆ createRegion_()

Region * GIMLI::RegionManager::createRegion_ ( SIndex  marker,
const Mesh mesh,
SIndex  cellMarker 
)
protected

Internal method to create a region. The method is called from setMesh()

References GIMLI::Region::resize().

◆ createSingleRegion_()

Region * GIMLI::RegionManager::createSingleRegion_ ( SIndex  marker,
const std::vector< Cell * > &  cells 
)
protected

Internal method to create a single parameter region. The method is called from setMesh()

References GIMLI::Region::resize().

◆ createStartModel()

RVector GIMLI::RegionManager::createStartModel ( )

Create starting model by iterating over all regions.

Referenced by GIMLI::ModellingBase::startModel().

◆ createStartVector()

RVector GIMLI::RegionManager::createStartVector ( )
inline

DEPRECATED use setStartModel

References GIMLI::z().

◆ fillConstraints()

void GIMLI::RegionManager::fillConstraints ( RSparseMapMatrix C)

Fill global constraints-matrix no regions: fill with 0th-order constraints

** no regions: fill 0th-order constraints

z-component

References GIMLI::SparseMapMatrix< ValueType, IndexType >::clear(), GIMLI::Region::isSingle(), GIMLI::Boundary::leftCell(), GIMLI::Boundary::norm(), GIMLI::Region::startParameter(), and GIMLI::x().

◆ fillConstraintWeights()

void GIMLI::RegionManager::fillConstraintWeights ( RVector vec)

Fill global constraints-weight vector. DEPRECATED

References GIMLI::Vector< ValueType >::resize(), and GIMLI::x().

◆ fillModelControl()

void GIMLI::RegionManager::fillModelControl ( RVector vec)

Fill global model-weight vector

** no regions: fill 0th-order constraints

References GIMLI::Vector< ValueType >::resize(), and GIMLI::x().

Referenced by GIMLI::RInversion::checkConstraints().

◆ fillStartModel()

void GIMLI::RegionManager::fillStartModel ( RVector vec)

Fill vec with starting model values by iterating over all regions.

References GIMLI::Vector< ValueType >::resize(), and GIMLI::x().

◆ fillStartVector()

void GIMLI::RegionManager::fillStartVector ( RVector vec)
inline

DEPRECATED use setStartModel

◆ findInterRegionInterfaces_()

void GIMLI::RegionManager::findInterRegionInterfaces_ ( )
protected

Fill interRegionInterfaceMap_

References GIMLI::Vector< ValueType >::clear(), and GIMLI::Boundary::leftCell().

◆ interfaceConstraints()

const std::map< SIndex, double > GIMLI::RegionManager::interfaceConstraints ( ) const
inline

Return read only access to the interface constraint weights map.

◆ interRegionConstraints()

const std::map< std::pair< SIndex, SIndex >, double > GIMLI::RegionManager::interRegionConstraints ( ) const
inline

Retrun inter region constraint weights for all connecting regions.

◆ loadMap()

void GIMLI::RegionManager::loadMap ( const std::string &  fname)

load region parameters from region control file

References GIMLI::Region::boundaries(), and GIMLI::x().

◆ parameterCount()

Index GIMLI::RegionManager::parameterCount ( ) const

Return global amount of parameter

References GIMLI::x().

◆ permuteParameterMarker()

void GIMLI::RegionManager::permuteParameterMarker ( const IVector p)

Permute all parameter marker after successful filled the Regionmanager.

References GIMLI::x().

◆ region()

Region * GIMLI::RegionManager::region ( SIndex  marker)

Returns a ptr to the region with the given marker. If no region exist an exception is thrown.

References GIMLI::Stopwatch::duration(), and GIMLI::unique().

◆ regionIdxs()

IVector GIMLI::RegionManager::regionIdxs ( ) const
inline

Return all region Indieces.

◆ saveMap()

void GIMLI::RegionManager::saveMap ( const std::string &  fname)

save region parameters to region control file

References GIMLI::x().

◆ setInterfaceConstraint()

void GIMLI::RegionManager::setInterfaceConstraint ( SIndex  marker,
double  weight 
)
inline

Set interface constraints weight for boundaries with a given marker.

◆ setInterRegionConstraint()

void GIMLI::RegionManager::setInterRegionConstraint ( SIndex  a,
SIndex  b,
double  weight 
)

Set inter region constraint weights between region a and b.

◆ setParameterCount()

void GIMLI::RegionManager::setParameterCount ( Index  count)
inline

Set the amount of parameter, will be override if regions are defined

Referenced by GIMLI::HarmonicModelling::createJacobian(), GIMLI::HarmonicModelling::HarmonicModelling(), and GIMLI::ModellingBase::startModel().

◆ setZWeight()

void GIMLI::RegionManager::setZWeight ( double  z)

Syntactic sugar: set zweight/constraintType to all regions.

References GIMLI::x().