Geophysical Inversion and Modelling Library
v1.5.2-5-g042d7f36
|
Public Member Functions | |
RegionManager (bool verbose=true) | |
RegionManager & | operator= (const RegionManager &rm) |
void | setVerbose (bool verbose) |
bool | verbose () const |
void | clear () |
void | setMesh (const Mesh &mesh, bool holdRegionInfos=false) |
const Mesh & | mesh () const |
Mesh * | pMesh () |
Region * | addRegion (SIndex marker) |
Region * | addRegion (SIndex marker, const Mesh &mesh) |
Region * | addRegion (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 |
Region * | region (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 Mesh & | paraDomain () const |
Mesh & | paraDomain () |
std::vector< RVector3 > | boundaryNorm () 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) |
Region * | createRegion_ (SIndex marker, const Mesh &mesh, SIndex cellMarker) |
Region * | createSingleRegion_ (SIndex marker, const std::vector< Cell * > &cells) |
IVector | allRegionMarker_ (bool excludeBoundary=false) const |
Protected Attributes | |
bool | verbose_ |
bool | isPermuted_ |
Index | parameterCount_ |
Mesh * | mesh_ |
Mesh * | paraDomain_ |
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< RVector > | localTrans_ |
bool | haveLocalTrans_ |
bool | localTransHaveChanges_ |
Region * GIMLI::RegionManager::addRegion | ( | SIndex | marker | ) |
Add an new single region.
References createSingleRegion_(), and region().
Referenced by GIMLI::TTModellingWithOffset::TTModellingWithOffset().
Add an external region to the RegionManager.
References createRegion_(), and region().
Index GIMLI::RegionManager::constraintCount | ( | ) | const |
Return global amount of constraints
References GIMLI::x().
Referenced by fillConstraints(), and GIMLI::RInversion::run().
RVector GIMLI::RegionManager::constraintWeights | ( | ) |
Return constraint weights. They are created together with the constraints matrix
Referenced by GIMLI::RInversion::checkConstraints().
RVector GIMLI::RegionManager::createModelControl | ( | ) |
Create and fill global model-weight vector
References fillModelControl(), and parameterCount().
|
protected |
Fill interRegionInterfaceMap_
Internal method to create a region. The method is called from setMesh()
References region(), and GIMLI::Region::resize().
Referenced by addRegion().
|
protected |
Internal method to create a single parameter region. The method is called from setMesh()
References region(), and GIMLI::Region::resize().
Referenced by addRegion().
RVector GIMLI::RegionManager::createStartModel | ( | ) |
Create starting model by iterating over all regions.
References fillStartModel(), and parameterCount().
|
inline |
DEPRECATED use setStartModel
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(), constraintCount(), GIMLI::Region::isBackground(), GIMLI::Region::isSingle(), GIMLI::Boundary::leftCell(), GIMLI::Boundary::norm(), parameterCount(), GIMLI::Vector< ValueType >::resize(), GIMLI::Region::startParameter(), and GIMLI::x().
void GIMLI::RegionManager::fillConstraintWeights | ( | RVector & | vec | ) |
Fill global constraints-weight vector. DEPRECATED
void GIMLI::RegionManager::fillModelControl | ( | RVector & | vec | ) |
Fill global model-weight vector
** no regions: fill 0th-order constraints
References parameterCount(), GIMLI::Vector< ValueType >::resize(), and GIMLI::x().
Referenced by GIMLI::RInversion::checkConstraints(), and createModelControl().
void GIMLI::RegionManager::fillStartModel | ( | RVector & | vec | ) |
Fill vec with starting model values by iterating over all regions.
References parameterCount(), GIMLI::Vector< ValueType >::resize(), and GIMLI::x().
Referenced by createStartModel().
|
inline |
DEPRECATED use setStartModel
|
inline |
Return read only access to the interface constraint weights map.
|
inline |
Retrun inter region constraint weights for all connecting regions.
void GIMLI::RegionManager::loadMap | ( | const std::string & | fname | ) |
load region parameters from region control file
References GIMLI::Region::boundaries(), GIMLI::lower(), region(), setInterfaceConstraint(), setInterRegionConstraint(), and GIMLI::x().
Index GIMLI::RegionManager::parameterCount | ( | ) | const |
Return global amount of parameter
References GIMLI::x().
Referenced by createModelControl(), createStartModel(), fillConstraints(), fillModelControl(), and fillStartModel().
void GIMLI::RegionManager::permuteParameterMarker | ( | const IVector & | p | ) |
Permute all parameter marker after successful filled the Regionmanager.
References GIMLI::x().
Region * GIMLI::RegionManager::region | ( | SIndex | marker | ) |
Returns a ptr to the region with the given marker. If no region exist an exception is thrown.
Referenced by addRegion(), createRegion_(), createSingleRegion_(), loadMap(), and setInterRegionConstraint().
|
inline |
Return all region Indieces.
void GIMLI::RegionManager::saveMap | ( | const std::string & | fname | ) |
save region parameters to region control file
|
inline |
Set interface constraints weight for boundaries with a given marker.
Referenced by loadMap().
void GIMLI::RegionManager::setInterRegionConstraint | ( | SIndex | a, |
SIndex | b, | ||
double | weight | ||
) |
Set inter region constraint weights between region a and b.
References GIMLI::Region::isBackground(), and region().
Referenced by loadMap().
|
inline |
Set the amount of parameter, will be override if regions are defined
Referenced by GIMLI::HarmonicModelling::HarmonicModelling().
void GIMLI::RegionManager::setZWeight | ( | double | z | ) |
Syntactic sugar: set zweight/constraintType to all regions.
References GIMLI::x(), and GIMLI::z().