The Conley-Morse Graphs Software
|
Computation of Morse decompositions. More...
#include <algorithm>
#include <new>
#include <iostream>
#include <iomanip>
#include <ios>
#include <string>
#include <fstream>
#include <sstream>
#include <cstdio>
#include "chomp/system/textfile.h"
#include "chomp/cubes/pointset.h"
#include "chomp/struct/digraph.h"
#include "chomp/struct/multitab.h"
#include "chomp/struct/hashsets.h"
#include "chomp/system/timeused.h"
#include "config.h"
#include "typedefs.h"
#include "conindex.h"
#include "morsedec.h"
#include "typedyns.h"
#include "indcache.h"
#include "invpart.h"
#include "utils.h"
#include "spacewrap.h"
#include "procmdec.h"
#include "morsecache.h"
#include "eigenval.h"
#include "dotgraph.h"
#include "datatext.h"
Go to the source code of this file.
Classes | |
class | TConnTable |
A simple class for storing connections in an array that uses the "multitable" class. More... | |
class | TConnMorse |
A simple class for storing connections in an array that uses the "multitable" class. More... | |
Functions | |
void | setDummyIndex (theMorseDecompositionType &morseDec, int n, int nonzero=-1) |
This small auxiliary procedure sets a dummy Conley index to the given Morse set. More... | |
int | computeConleyIndex (theMorseDecompositionType &morseDec, int n, const double *offset, const double *width, int subdivDepth, const theMapType &theMap, const theCubMapType &theCubMap0, const theCubMapType &theCubMap1, int &subdivNonemptyInv, int &noIsolation, int &attractor) |
Verifies that the provided Morse set can be used as a basis for a Conley index pair and computes the Conley index. More... | |
template<class typeCubes > | |
void | chainRecurrentSet (const typeCubes &X, typeCubes &result, const chomp::homology::diGraph<> &g) |
Computes the chain recurrent set of X. More... | |
template<class typeCubes , class typeMorseDec > | |
void | invMorseDec (const typeCubes &X, const chomp::homology::diGraph<> &g, typeMorseDec &morseDec, const double *offset, const double *width, int subdivDepth, const theMapType &theMap, const theCubMapType &theCubMap0, const theCubMapType &theCubMap1, int_t skipIndices, const std::string &cacheFileName, bool &morseDecComputed, std::vector< int > &wrongIndices, std::vector< int > &skippedIndices, std::vector< int > &attractors, bool connOrbits, const double *leftMapParam, const double *rightMapParam, int paramCount, chomp::homology::timeused &timeSubdiv) |
Computes a Conley-Morse decomposition of ChainRecSet (X). More... | |
theMorseDecompositionType * | computeMorseDecomposition (theMapType &theMap, const theCubMapType theCubMap0, const theCubMapType theCubMap1, const double *offset, const double *width, int_t skipIndices, const std::string &cacheFileName, const std::string &pictureFileName, const std::string &cubesFilePrefix, const std::string &morseDecFileName, const std::string &graphFileName, const std::string &procFilePrefix, const std::string &mapOptFileName, bool &morseDecComputed, std::vector< int > &wrongIndices, std::vector< int > &skippedIndices, std::vector< int > &attractors, bool connOrbits, const double *leftMapParam, const double *rightMapParam, int paramCount) |
Computes the Morse decomposition using all the pre- and postprocessing. More... | |
Computation of Morse decompositions.
This file contains the definition of a function for the computation of a Morse decomposition for a given map, as well as several auxiliary procedures necessary to compute this Morse decomposition in an efficient way by restricting the phase space to the invariant part computed with respect to a coarser grid. The computed Morse decomposition is processed further in order to eliminate spurious Morse sets wherever possible.
Definition in file compmdec.h.
void chainRecurrentSet | ( | const typeCubes & | X, |
typeCubes & | result, | ||
const chomp::homology::diGraph<> & | g | ||
) |
Computes the chain recurrent set of X.
Note: The resulting set may be taken the same as X if one wants to replace the set with its chain recurrent set.
Definition at line 379 of file compmdec.h.
Referenced by computeMorseDecomposition().
|
inline |
Verifies that the provided Morse set can be used as a basis for a Conley index pair and computes the Conley index.
If this verification fails then subdivides the Morse set and repeats the procedure restricted to the invariant part of the set. Returns 0 if succeeds or -1 in the case of failure. Makes a note of having reached the subdivision limit or having come across empty invariant part in the provided variable which is set to 1 in the former case and 0 in the latter (otherwise it is not modified). If a problem with isolation is encountered then sets "noIsolation" to 1. If the index pair is computed then sets the value of the variable which remembers if this is an attractor (empty exit set) or not.
Definition at line 210 of file compmdec.h.
References custom::difference::ignoreIsolationForConleyIndex, invariantPart(), custom::difference::maxImageDiameter, custom::difference::maxImageVolume, custom::difference::maxRefineSize0, custom::difference::maxRefineSize1, custom::difference::refineDepth, setDummyIndex(), and subdivideCubes().
Referenced by invMorseDec().
|
inline |
Computes the Morse decomposition using all the pre- and postprocessing.
The target Morse decomposition object must be already initialized with the right map which is to be used to compute the Conley indices of the Morse sets. If a file name prefix is nonempty then an attempt is being made to read cached Morse decomposition information from a file.
Definition at line 996 of file compmdec.h.
References chainRecurrentSet(), checkIsolation(), computeMapGraph(), CONFIG_ENHANCEINV, data2text(), double2string(), enhanceCubes(), fileExists(), custom::difference::finalDepth, custom::difference::initialDepth, invariantPart(), invMorseDec(), loadMorseDecCache(), custom::difference::maxImageDiameter, custom::difference::maxImageVolume, moveSomeToFront(), custom::difference::paramCount, custom::procMorseDecExit::processMorseDec(), resetRounding(), saveMorseDecCache(), custom::difference::spaceDim, subdivideCubes(), text2data(), and writeDotGraph().
Referenced by Worker::Process(), and runSingleComp().
void invMorseDec | ( | const typeCubes & | X, |
const chomp::homology::diGraph<> & | g, | ||
typeMorseDec & | morseDec, | ||
const double * | offset, | ||
const double * | width, | ||
int | subdivDepth, | ||
const theMapType & | theMap, | ||
const theCubMapType & | theCubMap0, | ||
const theCubMapType & | theCubMap1, | ||
int_t | skipIndices, | ||
const std::string & | cacheFileName, | ||
bool & | morseDecComputed, | ||
std::vector< int > & | wrongIndices, | ||
std::vector< int > & | skippedIndices, | ||
std::vector< int > & | attractors, | ||
bool | connOrbits, | ||
const double * | leftMapParam, | ||
const double * | rightMapParam, | ||
int | paramCount, | ||
chomp::homology::timeused & | timeSubdiv | ||
) |
Computes a Conley-Morse decomposition of ChainRecSet (X).
The combinatorial cubical multivalued map F is encoded in the directed graph provided. The Morse decomposition structure must be initially empty. The arguments "offset", "width", "subdivDepth" and "theMap" are only necessary for the purpose of refining trivial Morse sets. The global constants "refineDepth", "maxRefineSize0" and "maxRefineSize1" determine, respectively, the maximal allowed refinement depth, and the maximal size of a cubical set which is refined if necessary. Further simplification of the computed Morse decomposition is done by joining Morse sets (see the description in "morsedec.h" for details). If requested, the Conley indices of Morse sets which have at least the given number of boxes are not computed (they are set to be trivial). If a file name prefix is nonempty then an attempt is being made to read cached Morse decomposition information from a file.
Definition at line 440 of file compmdec.h.
References checkEmptyInv(), checkIsolation(), computeConleyIndex(), cubesVolume(), fileExists(), custom::difference::finalDepth, custom::difference::maxJoinConnection, custom::difference::maxJoinDistance, custom::difference::maxJoinSize, custom::difference::maxRefineSize0, custom::difference::paramCount, custom::noKnownIndices::setConleyIndex(), setDummyIndex(), and showRealCoords().
Referenced by computeMorseDecomposition().
|
inline |
This small auxiliary procedure sets a dummy Conley index to the given Morse set.
The Conley index is set to be trivial, unless it is requested that a number of a Betti number is provided to be set to 1.
Definition at line 186 of file compmdec.h.
References custom::difference::spaceDim.
Referenced by computeConleyIndex(), and invMorseDec().