Geophysical Inversion and Modelling Library  v1.3.1-2-g7599abf9
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
void findInterRegionInterfaces ()

Protected Member Functions

void copy_ (const RegionManager &rm)
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_
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.

References GIMLI::x().

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

◆ addRegion() [2/2]

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

Add an external region to the RegionManager.

◆ constraintCount()

Index GIMLI::RegionManager::constraintCount ( ) const

Return global amount of constraints

Referenced by constraintWeights().

◆ constraintWeights()

RVector GIMLI::RegionManager::constraintWeights ( )

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

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

◆ createModelControl()

RVector GIMLI::RegionManager::createModelControl ( )

Create and fill global model-weight vector

◆ createRegion_()

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

Fill interRegionInterfaceMap_

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

◆ createSingleRegion_()

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

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

References region(), and GIMLI::Region::resize().

◆ createStartModel()

RVector GIMLI::RegionManager::createStartModel ( )

Create starting model by iterating over all regions.

◆ createStartVector()

RVector GIMLI::RegionManager::createStartVector ( )

DEPRECATED use setStartModel

◆ fillConstraints()

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

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

** no regions: fill 0th-order constraints


◆ fillConstraintWeights()

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

Fill global constraints-weight vector. DEPRECATED

◆ fillModelControl()

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

Fill global model-weight vector

** no regions: fill 0th-order constraints

◆ fillStartModel()

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

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

References parameterCount().

◆ fillStartVector()

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

DEPRECATED use setStartModel

◆ interfaceConstraints()

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

Return read only access to the interface constraint weights map.

◆ interRegionConstraints()

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

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

◆ parameterCount()

Index GIMLI::RegionManager::parameterCount ( ) const

Return global amount of parameter

Referenced by fillStartModel().

◆ permuteParameterMarker()

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

Permute all parameter marker after successful filled the Regionmanager.

References GIMLI::Mesh::boundaries(), and GIMLI::Boundary::leftCell().

◆ 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::Mesh::clear().

Referenced by createSingleRegion_().

◆ regionIdxs()

IVector GIMLI::RegionManager::regionIdxs ( ) const

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 

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)

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

Referenced by GIMLI::HarmonicModelling::createJacobian().

◆ setZWeight()

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

Syntactic sugar: set zweight/constraintType to all regions.