parpop0p.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////
00002 ///
00003 /// @file parpop0p.h
00004 ///
00005 /// Parameters for a sample Leslie population model in R^2
00006 /// with fixed parameters.
00007 /// This is a configuration file mainly for the program "cmsingle.cpp"
00008 /// which defines the ranges of parameters to run a single computation.
00009 ///
00010 /// @author Pawel Pilarczyk
00011 ///
00012 /////////////////////////////////////////////////////////////////////////////
00013 
00014 // Copyright (C) 1997-2008 by Pawel Pilarczyk.
00015 //
00016 // This file is part of my research software package.  This is free software;
00017 // you can redistribute it and/or modify it under the terms of the GNU
00018 // General Public License as published by the Free Software Foundation;
00019 // either version 2 of the License, or (at your option) any later version.
00020 //
00021 // This software is distributed in the hope that it will be useful,
00022 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00024 // GNU General Public License for more details.
00025 //
00026 // You should have received a copy of the GNU General Public License along
00027 // with this software; see the file "license.txt".  If not, write to the
00028 // Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00029 // MA 02111-1307, USA.
00030 
00031 // Started on February 9, 2008. Last revision: April 8, 2008.
00032 
00033 
00034 #ifndef _CMGRAPHS_PARPOP0P_H_
00035 #define _CMGRAPHS_PARPOP0P_H_
00036 
00037 
00038 namespace custom {
00039 
00040 /// Parameters for sample computations for the 2-dimensional Leslie
00041 /// population model with 2 varying parameters.
00042 namespace pop0p {
00043 
00044 
00045 // --------------------------------------------------
00046 // --------- the phase space configuration ----------
00047 // --------------------------------------------------
00048 
00049 /// The dimension of the phase space.
00050 const int spaceDim = 2;
00051 
00052 /// The initial depth of subdivisions in the phase space.
00053 const int initialDepth = 6;
00054 
00055 /// The final depth of subdivisions in the phase space.
00056 const int finalDepth = 12;
00057 
00058 
00059 // --------------------------------------------------
00060 // ------------ the parameter selection -------------
00061 // --------------------------------------------------
00062 
00063 /// The dimension of the parameter space to iterate. Only those parameters
00064 /// which are varying are taken into consideration here.
00065 const int paramDim = 1;
00066 
00067 /// The numbers of subintervals in each direction of the parameter space.
00068 /// The type of these numbers must match "parCoord" in "typedefs.h".
00069 const short int paramSubdiv [paramDim] = {1};
00070 
00071 /// The numbers of parameters to subdivide.
00072 const int paramSelect [paramDim] = {0};
00073 
00074 
00075 // --------------------------------------------------
00076 // ---------- the parameter space settings ----------
00077 // --------------------------------------------------
00078 
00079 /// The number of all the parameters, both varying and fixed.
00080 const int paramCount = 2 * spaceDim;
00081 
00082 /// The left bounds on the parameters.
00083 const double paramLeft [paramCount] = {10.2, 11.5, 0.7, 0.1};
00084 
00085 /// The right bounds on the parameters.
00086 const double paramRight [paramCount] = {10.3, 11.6, 0.7, 0.1};
00087 
00088 
00089 // --------------------------------------------------
00090 // -------------- the phase space size --------------
00091 // --------------------------------------------------
00092 
00093 /// An imitation of an array which returns the offset of the rectangular area
00094 /// in the phase space which contains the invariant sets of interest.
00095 struct SpaceOffsetType
00096 {
00097         /// Returns the space offset in the requested direction.
00098         double operator [] (int n) const
00099         {
00100                 return -0.001;
00101         }
00102 }; /* struct SpaceOffsetType */
00103 
00104 /// An imitation of an array which returns the offset of the rectangular area
00105 /// in the phase space which contains the invariant sets of interest.
00106 const SpaceOffsetType spaceOffset = SpaceOffsetType ();
00107 
00108 /// An imitation of an array which returns the width of the rectangular area
00109 /// in the phase space which contains the invariant sets of interest.
00110 struct SpaceWidthType
00111 {
00112         /// The constructor which computes the space width in each direction.
00113         SpaceWidthType ()
00114         {
00115                 double e = 2.7182818284590453;
00116                 double addError = 1.00000000000001;
00117                 double sumTheta = 0;
00118                 for (int i = 0; i < spaceDim; ++ i)
00119                 {
00120                         sumTheta += paramRight [i];
00121                         sumTheta *= addError;
00122                 }
00123                 double t = paramLeft [2 * spaceDim - 1] * e * addError;
00124                 double r = (sumTheta / t) * addError;
00125                 width [0] = (r - spaceOffset [0]) * addError;
00126                 for (int i = 1; i < spaceDim; ++ i)
00127                 {
00128                         r = (r * paramRight [spaceDim + i - 1]) * addError;
00129                         width [i] = (r - spaceOffset [i]) * addError;
00130                 }
00131                 return;
00132         }
00133 
00134         /// Returns the precomputed value of the space width
00135         /// in the requested direction.
00136         double operator [] (int n) const
00137         {
00138                 if ((n < 0) || (n >= spaceDim))
00139                         throw "Incorrect phase space width requested.";
00140                 return width [n];
00141         }
00142 
00143 private:
00144         double width [spaceDim];
00145 
00146 }; /* struct SpaceWidthType */
00147 
00148 /// An imitation of an array which returns the width of the rectangular area
00149 /// in the phase space which contains the invariant sets of interest.
00150 const SpaceWidthType spaceWidth = SpaceWidthType ();
00151 
00152 
00153 // --------------------------------------------------
00154 // --------------- joining Morse sets ---------------
00155 // --------------------------------------------------
00156 
00157 /// The maximal number of cubes in a trivial Morse set for which an attempt
00158 /// is made to join this set with another near-by Morse set.
00159 /// Set to zero to suppress joining.
00160 const int maxJoinSize = 0;
00161 
00162 /// The maximal size of a connecting orbit between two Morse sets
00163 /// which can be considered for joining.
00164 const int maxJoinConnection = 1000;
00165 
00166 /// The maximal allowed distance between two Morse sets which can be
00167 /// considered for joining.
00168 const int maxJoinDistance = 100;
00169 
00170 
00171 // --------------------------------------------------
00172 // ----------------- other settings -----------------
00173 // --------------------------------------------------
00174 
00175 /// Should the ordering between the Morse sets be taken into consideration
00176 /// while determining whether two Morse decompositions
00177 /// computed for adjacent parameter boxes are in the same class?
00178 const bool compareMorseOrdering = true;
00179 
00180 /// Ignoring the isolation problem while matching Morse decompositions.
00181 /// If this constant is set to "true" then Morse sets are matched
00182 /// with each other indepent of whether the Conley index could be computed
00183 /// for them or not. Otherwise, 'correct' and 'wrong' Morse sets
00184 /// are matched with their counterparts in the same category only.
00185 const bool ignoreIsolationForContinuation = true;
00186 
00187 /// Ignoring the isolation problem while computing the Conley index.
00188 /// If the constant is set to "true" then the index pair constructed on the
00189 /// basis of a combinatorial Morse set with respect to the dynamics
00190 /// restricted to the rectangular area of interest is also restricted
00191 /// to that area by means of projecting the any boxes which stick out
00192 /// of the region onto a single layer of boxes around the boundary.
00193 const bool ignoreIsolationForConleyIndex = false;
00194 
00195 
00196 } // namespace pop0p
00197 } // namespace custom
00198 
00199 
00200 #endif // _CMGRAPHS_PARPOP0P_H_
00201 

Generated on Sun Mar 28 17:47:57 2010 for The Conley-Morse Graphs Software by  doxygen 1.5.3