The Conley-Morse Graphs Software
p_pop2p.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2///
3/// @file p_pop2p.h
4///
5/// Parameters for a sample Leslie population model in R^2
6/// with 2 varying parameters.
7/// This is a configuration file for the program "cmgraphs.cpp"
8/// which defines the ranges of parameters to scan
9/// and the details of the phase space.
10///
11/// @author Pawel Pilarczyk
12///
13/////////////////////////////////////////////////////////////////////////////
14
15// Copyright (C) 1997-2014 by Pawel Pilarczyk.
16//
17// This file is part of my research software package. This is free software:
18// you can redistribute it and/or modify it under the terms of the GNU
19// General Public License as published by the Free Software Foundation,
20// either version 3 of the License, or (at your option) any later version.
21//
22// This software is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with this software; see the file "license.txt". If not,
29// please, see <https://www.gnu.org/licenses/>.
30
31// Started on February 9, 2008. Last revision: March 7, 2008.
32
33
34#ifndef _CMGRAPHS_P_H_
35#define _CMGRAPHS_P_H_
36
37
38namespace custom {
39
40/// Parameters for sample computations for the 2-dimensional Leslie
41/// population model with 2 varying parameters.
42namespace pop2p {
43
44
45// --------------------------------------------------
46// --------- the phase space configuration ----------
47// --------------------------------------------------
48
49/// The dimension of the phase space.
50const int spaceDim = 2;
51
52/// Is space wrapping (a.k.a. periodic boundary conditions)
53/// in effect in the given directions?
54const bool spaceWrapping [spaceDim] = {false, false};
55
56/// The initial depth of subdivisions in the phase space.
57const int initialDepth = 6;
58
59/// The final depth of subdivisions in the phase space.
60const int finalDepth = 12;
61
62
63// --------------------------------------------------
64// ------------ the parameter selection -------------
65// --------------------------------------------------
66
67/// The dimension of the parameter space to iterate. Only those parameters
68/// which are varying are taken into consideration here.
69const int paramDim = 2;
70
71/// The numbers of subintervals in each direction of the parameter space.
72/// The type of these numbers must match "parCoord" in "typedefs.h".
73const short int paramSubdiv [paramDim] = {50, 50};
74
75/// The numbers of parameters to subdivide.
76const int paramSelect [paramDim] = {0, 1};
77
78
79// --------------------------------------------------
80// ---------- the parameter space settings ----------
81// --------------------------------------------------
82
83/// The number of all the parameters, both varying and fixed.
84const int paramCount = 2 * spaceDim;
85
86/// The left bounds on the parameters.
87const double paramLeft [paramCount] = {8, 3, 0.7, 0.1};
88
89/// The right bounds on the parameters.
90const double paramRight [paramCount] = {37, 50, 0.7, 0.1};
91
92
93// --------------------------------------------------
94// -------------- the phase space size --------------
95// --------------------------------------------------
96
97/// An imitation of an array which returns the offset of the rectangular area
98/// in the phase space which contains the invariant sets of interest.
100{
101 /// Returns the space offset in the requested direction.
102 double operator [] (int n) const
103 {
104 return -0.001;
105 }
106}; /* struct SpaceOffsetType */
107
108/// An imitation of an array which returns the offset of the rectangular area
109/// in the phase space which contains the invariant sets of interest.
111
112/// An imitation of an array which returns the width of the rectangular area
113/// in the phase space which contains the invariant sets of interest.
115{
116 /// The constructor which computes the space width in each direction.
118 {
119 double e = 2.7182818284590453;
120 double addError = 1.00000000000001;
121 double sumTheta = 0;
122 for (int i = 0; i < spaceDim; ++ i)
123 {
124 sumTheta += paramRight [i];
125 sumTheta *= addError;
126 }
127 double t = paramLeft [2 * spaceDim - 1] * e * addError;
128 double r = (sumTheta / t) * addError;
129 width [0] = (r - spaceOffset [0]) * addError;
130 for (int i = 1; i < spaceDim; ++ i)
131 {
132 r = (r * paramRight [spaceDim + i - 1]) * addError;
133 width [i] = (r - spaceOffset [i]) * addError;
134 }
135 return;
136 }
137
138 /// Returns the precomputed value of the space width
139 /// in the requested direction.
140 double operator [] (int n) const
141 {
142 if ((n < 0) || (n >= spaceDim))
143 throw "Incorrect phase space width requested.";
144 return width [n];
145 }
146
147private:
148 double width [spaceDim];
149
150}; /* struct SpaceWidthType */
151
152/// An imitation of an array which returns the width of the rectangular area
153/// in the phase space which contains the invariant sets of interest.
155
156
157// --------------------------------------------------
158// ------------------ refinements -------------------
159// --------------------------------------------------
160
161/// The number of refinements that should be done if a Morse set
162/// with the trivial index is encountered or if the image of a Morse set
163/// sticks out of the rectangular region to which the computations
164/// are restricted. Set to zero for no refinements.
165const int refineDepth = 3;
166
167/// The maximal allowed size of a set of cubes in the phase space
168/// which can be refined at the initial subdivision level.
169/// Set to zero to suppress any refinements.
170const int maxRefineSize0 = 200000;
171
172/// The maximal allowed size of a set of cubes in the phase space
173/// which can be refined at the subsequent subdivision levels.
174/// Set to zero to suppress any refinements.
175const int maxRefineSize1 = 20000;
176
177
178// --------------------------------------------------
179// ------------------- map images -------------------
180// --------------------------------------------------
181
182/// The maximal allowed diameter of the cubical image of a signle box.
183/// This limit is set up in order to prevent a blow-up of the program
184/// in the memory because of accumulating huge images of boxes.
185const int maxImageDiameter = 2000;
186
187/// The maximal allowed volume of the cubical image of a single box.
188/// This limit is set up in order to prevent a blow-up of the program
189/// in the memory because of accumulating huge images of boxes.
190const int maxImageVolume = 4000;
191
192
193// --------------------------------------------------
194// -------------- max index pair size ---------------
195// --------------------------------------------------
196
197/// The maximal allowed size of the index pair. This size is measured
198/// as the total number of cubes in the index pair and its forward image.
199const int maxIndexPairSize = 1200000;
200
201
202// --------------------------------------------------
203// --------------- joining Morse sets ---------------
204// --------------------------------------------------
205
206/// The maximal number of cubes in a trivial Morse set for which an attempt
207/// is made to join this set with another near-by Morse set.
208/// Set to zero to suppress joining.
209const int maxJoinSize = 0;
210
211/// The maximal size of a connecting orbit between two Morse sets
212/// which can be considered for joining.
213const int maxJoinConnection = 1000;
214
215/// The maximal allowed distance between two Morse sets which can be
216/// considered for joining. Note: It doesn't work with space wrapping.
217const int maxJoinDistance = 100;
218
219
220// --------------------------------------------------
221// ----------------- other settings -----------------
222// --------------------------------------------------
223
224/// Should the ordering between the Morse sets be taken into consideration
225/// while determining whether two Morse decompositions
226/// computed for adjacent parameter boxes are in the same class?
227const bool compareMorseOrdering = true;
228
229/// Ignoring the isolation problem while matching Morse decompositions.
230/// If this constant is set to "true" then Morse sets are matched
231/// with each other indepent of whether the Conley index could be computed
232/// for them or not. Otherwise, 'correct' and 'wrong' Morse sets
233/// are matched with their counterparts in the same category only.
235
236/// Ignoring the isolation problem while computing the Conley index.
237/// If the constant is set to "true" then the index pair constructed on the
238/// basis of a combinatorial Morse set with respect to the dynamics
239/// restricted to the rectangular area of interest is also restricted
240/// to that area by means of projecting all the boxes that stick out
241/// of the region onto a single layer of boxes around the boundary.
243
244
245} // namespace pop2p
246} // namespace custom
247
248
249#endif // _CMGRAPHS_P_H_
250
const int maxJoinDistance
The maximal allowed distance between two Morse sets which can be considered for joining.
Definition: p_pop2p.h:217
const int maxJoinConnection
The maximal size of a connecting orbit between two Morse sets which can be considered for joining.
Definition: p_pop2p.h:213
const int paramDim
The dimension of the parameter space to iterate.
Definition: p_pop2p.h:69
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_pop2p.h:170
const bool spaceWrapping[spaceDim]
Is space wrapping (a.k.a.
Definition: p_pop2p.h:54
const SpaceOffsetType spaceOffset
An imitation of an array which returns the offset of the rectangular area in the phase space which co...
Definition: p_pop2p.h:110
const bool compareMorseOrdering
Should the ordering between the Morse sets be taken into consideration while determining whether two ...
Definition: p_pop2p.h:227
const short int paramSubdiv[paramDim]
The numbers of subintervals in each direction of the parameter space.
Definition: p_pop2p.h:73
const int maxImageDiameter
The maximal allowed diameter of the cubical image of a signle box.
Definition: p_pop2p.h:185
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_pop2p.h:175
const int spaceDim
The dimension of the phase space.
Definition: p_pop2p.h:50
const int paramSelect[paramDim]
The numbers of parameters to subdivide.
Definition: p_pop2p.h:76
const bool ignoreIsolationForConleyIndex
Ignoring the isolation problem while computing the Conley index.
Definition: p_pop2p.h:242
const int finalDepth
The final depth of subdivisions in the phase space.
Definition: p_pop2p.h:60
const double paramRight[paramCount]
The right bounds on the parameters.
Definition: p_pop2p.h:90
const int refineDepth
The number of refinements that should be done if a Morse set with the trivial index is encountered or...
Definition: p_pop2p.h:165
const bool ignoreIsolationForContinuation
Ignoring the isolation problem while matching Morse decompositions.
Definition: p_pop2p.h:234
const int maxImageVolume
The maximal allowed volume of the cubical image of a single box.
Definition: p_pop2p.h:190
const int paramCount
The number of all the parameters, both varying and fixed.
Definition: p_pop2p.h:84
const int initialDepth
The initial depth of subdivisions in the phase space.
Definition: p_pop2p.h:57
const int maxIndexPairSize
The maximal allowed size of the index pair.
Definition: p_pop2p.h:199
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_pop2p.h:209
const double paramLeft[paramCount]
The left bounds on the parameters.
Definition: p_pop2p.h:87
const SpaceWidthType spaceWidth
An imitation of an array which returns the width of the rectangular area in the phase space which con...
Definition: p_pop2p.h:154
Customizable settings that are supposed to be modified and/or chosen by the user of the software.
An imitation of an array which returns the offset of the rectangular area in the phase space which co...
Definition: p_pop2p.h:100
double operator[](int n) const
Returns the space offset in the requested direction.
Definition: p_pop2p.h:102
An imitation of an array which returns the width of the rectangular area in the phase space which con...
Definition: p_pop2p.h:115
double width[spaceDim]
Definition: p_pop2p.h:148
SpaceWidthType()
The constructor which computes the space width in each direction.
Definition: p_pop2p.h:117
double operator[](int n) const
Returns the precomputed value of the space width in the requested direction.
Definition: p_pop2p.h:140