Geophysical Inversion and Modeling Library  v1.0.12-3-g179296b4
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, const Mesh &mesh)
 
const std::map< SIndex, Region *> & regions () const
 
std::map< SIndex, Region *> * regions ()
 
Index regionCount () const
 
Regionregion (SIndex marker)
 
bool regionExists (SIndex marker)
 
void setInterRegionConstraint (SIndex a, SIndex b, double c)
 
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 createConstraintsWeight ()
 
void fillConstraintsWeight (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 createParaDomain_ ()
 
void recountParaMarker_ ()
 
TransCumulative< RVector > * transModel ()
 
void setLocalTransFlag (bool flag)
 
bool haveLocalTrans () const
 

Protected Member Functions

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

Protected Attributes

bool verbose_
 
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 > interfaceConstraint_
 
double interRegionConstraintsZWeight_
 
TransCumulative< RVectorlocalTrans_
 
bool haveLocalTrans_
 
bool localTransHaveChanges_
 

Member Function Documentation

◆ addRegion()

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

◆ constraintCount()

Index GIMLI::RegionManager::constraintCount ( ) const

Return global amount of constraints

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

◆ createConstraintsWeight()

RVector GIMLI::RegionManager::createConstraintsWeight ( )

Create and fill global constraints-weight vector

◆ createModelControl()

RVector GIMLI::RegionManager::createModelControl ( )

Create and fill global model-weight vector

◆ createRegion_()

Region * GIMLI::RegionManager::createRegion_ ( SIndex  marker,
const Mesh mesh 
)
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

References GIMLI::SparseMapMatrix< ValueType, IndexType >::clear(), GIMLI::Region::parameterCount(), GIMLI::Region::startParameter(), and GIMLI::toStr().

◆ fillConstraintsWeight()

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

Fill global constraints-weight vector

** no regions: fill 0th-order constraints

** fill constraints weights from individual regions

** fill constraints weights from inter regions constrains

z-component

rather linear for bigger angles

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

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

◆ fillModelControl()

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

Fill global model-weight vector

** no regions: fill 0th-order constraints

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

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

◆ fillStartModel()

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

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

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

◆ fillStartVector()

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

DEPRECATED use setStartModel

◆ findInterRegionInterfaces_()

void GIMLI::RegionManager::findInterRegionInterfaces_ ( )
protected

Fill interRegionInterfaceMap_

References GIMLI::Boundary::leftCell().

◆ 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

◆ 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(), GIMLI::toStr(), and GIMLI::unique().

◆ saveMap()

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

save region parameters to region control file

◆ 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.