The Conley-Morse Graphs Software
confinfo.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2///
3/// @file confinfo.h
4///
5/// Writing configuration settings to an output stream.
6/// This file contains the definition of a function which gathers
7/// various configuration parameters and outputs them to a stream
8/// in a nice text format.
9///
10/// @author Pawel Pilarczyk
11///
12/////////////////////////////////////////////////////////////////////////////
13
14// Copyright (C) 1997-2014 by Pawel Pilarczyk.
15//
16// This file is part of my research software package. This is free software:
17// you can redistribute it and/or modify it under the terms of the GNU
18// General Public License as published by the Free Software Foundation,
19// either version 3 of the License, or (at your option) any later version.
20//
21// This software is distributed in the hope that it will be useful,
22// but WITHOUT ANY WARRANTY; without even the implied warranty of
23// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24// GNU General Public License for more details.
25//
26// You should have received a copy of the GNU General Public License
27// along with this software; see the file "license.txt". If not,
28// please, see <https://www.gnu.org/licenses/>.
29
30// Started on April 10, 2008. Last revision: September 15, 2010.
31
32
33#ifndef _CMGRAPHS_CONFINFO_H_
34#define _CMGRAPHS_CONFINFO_H_
35
36
37// include some standard C++ header files
38#include <ostream>
39
40// include local header files
41#include "config.h"
42#include "typedefs.h"
43
44
45// --------------------------------------------------
46// ---------------- SHOW CONFIG INFO ----------------
47// --------------------------------------------------
48
49/// Writes the configuration information to the given output stream.
50/// Precedes each line with the prefix provided.
51/// If the array "maxIter" is given then includes the information
52/// on the chunks of the parameter space that will be sent to workers.
53inline void showConfigInfo (std::ostream &f, const char *prefix,
54 const parCoord *maxIter)
55{
56 if (!prefix)
57 prefix = "";
58
59 f << prefix << "=================================\n";
60 f << prefix << "Configuration of the computations\n";
61 f << prefix << "=================================\n";
62 f << prefix << "\n";
63
64 f << prefix << "THE PHASE SPACE:\n";
65 f << prefix << "dim = " << spaceDim << "\n";
66 f << prefix << "depth: from " << initialDepth << " to " <<
67 finalDepth << "\n";
68
69 f << prefix << "offset:";
70 for (int i = 0; i < spaceDim; ++ i)
71 f << (i ? ", " : " ") << spaceOffset [i];
72 f << "\n";
73
74 f << prefix << "width:";
75 for (int i = 0; i < spaceDim; ++ i)
76 f << (i ? " x " : " ") << spaceWidth [i];
77 f << "\n";
78
79 f << prefix << "size in cubes:";
80 for (int i = 0; i < spaceDim; ++ i)
81 f << (i ? " x " : " ") << (1 << finalDepth);
82 f << "\n";
83 f << prefix << "\n";
84
85 f << prefix << "THE PARAMETER SPACE:\n";
86 f << prefix << "dim = " << paramDim << "\n";
87
88 f << prefix << "subdivisions:";
89 for (int i = 0; i < paramDim; ++ i)
90 f << (i ? " x " : " ") << paramSubdiv [i];
91 f << "\n";
92
93 if (maxIter)
94 {
95 f << prefix << "no. of tasks:";
96 int nTasks = 1;
97 for (int i = 0; i < paramDim; ++ i)
98 {
99 f << (i ? " x " : " ") << maxIter [i];
100 nTasks *= maxIter [i];
101 }
102 f << " = " << nTasks << "\n";
103 }
104
105 f << prefix << "selected parameters (see below):";
106 for (int i = 0; i < paramDim; ++ i)
107 f << (i ? ", " : " ") << paramSelect [i];
108 f << "\n";
109
110 f << prefix << "total number of parameters: " <<
111 paramCount << "\n";
112
113 f << prefix << "ranges:";
114 for (int i = 0; i < paramCount; ++ i)
115 f << (i ? " x " : " ") << "[" << paramLeft [i] << "," <<
116 paramRight [i] << "]";
117 f << "\n";
118 f << prefix << "\n";
119
120 f << prefix << "LIMITATIONS:\n";
121 f << prefix << "max refine depth = " << refineDepth << "\n";
122 f << prefix << "max refine size 0 = " << maxRefineSize0 << "\n";
123 f << prefix << "max refine size 1 = " << maxRefineSize1 << "\n";
124 f << prefix << "max image diameter = " << maxImageDiameter << "\n";
125 f << prefix << "max image volume = " << maxImageVolume << "\n";
126 f << prefix << "max index pair size = " << maxIndexPairSize << "\n";
127 f << prefix << "\n";
128
129 f << prefix << "OTHER PARAMETERS:\n";
130 f << prefix << "max join size = " << maxJoinSize << "\n";
131 f << prefix << "max join connection = " << maxJoinConnection << "\n";
132 f << prefix << "max join distance = " << maxJoinDistance << "\n";
133 f << prefix << "compare Morse ordering = " <<
134 compareMorseOrdering << "\n";
135 f << prefix << "ignore isol. for cont. = " <<
137 f << prefix << "\n";
138
139 f << prefix << "COMPILATION-DEPENDENT SETTINGS:\n";
140 f << prefix << "sizeof (spcCoord) = " << sizeof (spcCoord) << "\n";
141 f << prefix << "sizeof (parCoord) = " << sizeof (parCoord) << "\n";
142 f << prefix << "sizeof (int_t) = " << sizeof (int_t) << "\n";
143 f << prefix << "sizeof (size_t) = " << sizeof (size_t) << "\n";
144 f << prefix << "sizeof (short) = " << sizeof (short) << "\n";
145 f << prefix << "sizeof (int) = " << sizeof (int) << "\n";
146 f << prefix << "sizeof (long) = " << sizeof (long) << "\n";
147 f << prefix << "sizeof (int *) = " << sizeof (int *) << "\n";
148 f << prefix << "DimBits = " << chomp::homology::DimBits << "\n";
149 f << prefix << "MaxBasDim = " << chomp::homology::MaxBasDim << "\n";
150 f << prefix << "max no. of cubes = " <<
151 chomp::homology::NumMask << "\n";
152 f << prefix << "\n";
153
154 f << prefix << "=================================\n";
155 return;
156} /* showConfigInfo */
157
158
159#endif // _CMGRAPHS_CONFINFO_H_
160
Choice of configuration settings.
void showConfigInfo(std::ostream &f, const char *prefix, const parCoord *maxIter)
Writes the configuration information to the given output stream.
Definition: confinfo.h:53
const SpaceOffsetType spaceOffset
An imitation of an array which returns the offset of the rectangular area in the phase space which co...
Definition: p_differ.h:108
const int paramSelect[paramDim]
The numbers of parameters to subdivide.
Definition: p_differ.h:74
const double paramRight[paramCount]
The right bounds on the parameters: b, h.
Definition: p_differ.h:88
const int refineDepth
The number of refinements that should be done if a Morse set with the trivial index is encountered or...
Definition: p_differ.h:139
const int paramDim
The dimension of the parameter space to iterate.
Definition: p_differ.h:67
const int maxRefineSize0
The maximal allowed size of a set of cubes in the phase space which can be refined at the initial sub...
Definition: p_differ.h:144
const int maxJoinConnection
The maximal size of a connecting orbit between two Morse sets which can be considered for joining.
Definition: p_differ.h:187
const int maxJoinSize
The maximal number of cubes in a trivial Morse set for which an attempt is made to join this set with...
Definition: p_differ.h:183
const int maxJoinDistance
The maximal allowed distance between two Morse sets which can be considered for joining.
Definition: p_differ.h:191
const int maxImageVolume
The maximal allowed volume of the cubical image of a single box.
Definition: p_differ.h:164
const int spaceDim
The dimension of the phase space.
Definition: p_differ.h:48
const bool compareMorseOrdering
Should the ordering between the Morse sets be taken into consideration while determining whether two ...
Definition: p_differ.h:201
const double paramLeft[paramCount]
The left bounds on the parameters: b > 1, h < (sqrt(b) - 1)^2.
Definition: p_differ.h:85
const int initialDepth
The initial depth of subdivisions in the phase space.
Definition: p_differ.h:55
const int maxImageDiameter
The maximal allowed diameter of the cubical image of a signle box.
Definition: p_differ.h:159
const bool ignoreIsolationForContinuation
Ignoring the isolation problem while matching Morse decompositions.
Definition: p_differ.h:208
const int paramCount
The number of all the parameters, both varying and fixed.
Definition: p_differ.h:82
const SpaceWidthType spaceWidth
An imitation of an array which returns the width of the rectangular area in the phase space which con...
Definition: p_differ.h:128
const int finalDepth
The final depth of subdivisions in the phase space.
Definition: p_differ.h:58
const int maxIndexPairSize
The maximal allowed size of the index pair.
Definition: p_differ.h:173
const int maxRefineSize1
The maximal allowed size of a set of cubes in the phase space which can be refined at the subsequent ...
Definition: p_differ.h:149
const short int paramSubdiv[paramDim]
The numbers of subintervals in each direction of the parameter space.
Definition: p_differ.h:71
Customizable data types for the Conley-Morse graphs computation program.
short int parCoord
The type of coordinates of cubes in the set of parameters.
Definition: typeparam.h:53
int spcCoord
The type of coordinates of cubes in the phase space.
Definition: typespace.h:50