| 1 | /* |
| 2 | * Lorene's macros |
| 3 | * |
| 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * Copyright (c) 1999-2000 Jean-Alain Marck |
| 8 | * Copyright (c) 1999-2001 Eric Gourgoulhon |
| 9 | * Copyright (c) 2000-2003 Jerome Novak |
| 10 | * |
| 11 | * This file is part of LORENE. |
| 12 | * |
| 13 | * LORENE is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation; either version 2 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * LORENE is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License |
| 24 | * along with LORENE; if not, write to the Free Software |
| 25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 | * |
| 27 | */ |
| 28 | |
| 29 | |
| 30 | #ifndef __TYPE_PARITE_H_ |
| 31 | #define __TYPE_PARITE_H_ |
| 32 | |
| 33 | /* |
| 34 | * Constantes utilisees dans les types de grilles et les parites |
| 35 | */ |
| 36 | |
| 37 | /* |
| 38 | * $Id: type_parite.h,v 1.14 2013/06/05 15:00:26 j_novak Exp $ |
| 39 | * $Log: type_parite.h,v $ |
| 40 | * Revision 1.14 2013/06/05 15:00:26 j_novak |
| 41 | * Suppression of all classes derived from Grille3d. Now Grille3d is no |
| 42 | * longer an abstract class. r-samplings are only one of RARE, FIN or |
| 43 | * UNSURR (FINJAC has been removed). Instead, Mg3d possesses a new member |
| 44 | * colloc_r[nzone] defining the type of collocation points (spectral |
| 45 | * bases) in each domain. |
| 46 | * |
| 47 | * Revision 1.13 2013/01/11 08:20:10 j_novak |
| 48 | * New radial spectral bases with Legendre polynomials (R_LEG, R_LEGP, R_LEGI). |
| 49 | * |
| 50 | * Revision 1.12 2012/01/17 15:06:54 j_penner |
| 51 | * Added a definition for MAX_BASE_2 for the phi coordinate and possible higher dimensions |
| 52 | * |
| 53 | * Revision 1.11 2012/01/17 10:12:54 j_penner |
| 54 | * modified phi mask MSQ_P to index using only one hex value |
| 55 | * |
| 56 | * Revision 1.10 2009/10/23 12:55:46 j_novak |
| 57 | * New base T_LEG_MI |
| 58 | * |
| 59 | * Revision 1.9 2009/10/08 16:19:32 j_novak |
| 60 | * Addition of new bases T_COS and T_SIN. |
| 61 | * |
| 62 | * Revision 1.8 2008/10/17 10:48:28 j_novak |
| 63 | * Increase of the macro MAX_DAL |
| 64 | * |
| 65 | * Revision 1.7 2007/12/11 15:28:05 jl_cornou |
| 66 | * Jacobi(0,2) polynomials partially implemented |
| 67 | * |
| 68 | * Revision 1.6 2004/11/04 15:40:14 e_gourgoulhon |
| 69 | * Added definition of symbol T_LEG. |
| 70 | * |
| 71 | * Revision 1.5 2004/08/24 09:14:40 p_grandclement |
| 72 | * Addition of some new operators, like Poisson in 2d... It now requieres the |
| 73 | * GSL library to work. |
| 74 | * |
| 75 | * Also, the way a variable change is stored by a Param_elliptic is changed and |
| 76 | * no longer uses Change_var but rather 2 Scalars. The codes using that feature |
| 77 | * will requiere some modification. (It should concern only the ones about monopoles) |
| 78 | * |
| 79 | * Revision 1.4 2004/03/22 13:12:43 j_novak |
| 80 | * Modification of comments to use doxygen instead of doc++ |
| 81 | * |
| 82 | * Revision 1.3 2003/09/16 08:53:05 j_novak |
| 83 | * Addition of the T_LEG_II base (odd in theta, only for odd m) and the |
| 84 | * transformation functions from and to T_SIN_P. |
| 85 | * |
| 86 | * Revision 1.2 2002/03/07 15:41:12 n_chamel |
| 87 | * New class for dealing with Cartesian grids |
| 88 | * Added the sampling type UNIFORM in type_parite.h |
| 89 | * |
| 90 | * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon |
| 91 | * LORENE |
| 92 | * |
| 93 | * Revision 2.3 2000/12/04 13:09:55 novak |
| 94 | * Added constants for the dalembertian |
| 95 | * |
| 96 | * Revision 2.2 2000/09/28 08:55:52 eric |
| 97 | * Ajout de T_LEG_IP et T_LEG_PI. |
| 98 | * |
| 99 | * Revision 2.1 1999/10/01 15:22:13 eric |
| 100 | * Vire les jacobiennes. |
| 101 | * |
| 102 | * Revision 2.0 1999/02/15 10:41:51 hyc |
| 103 | * *** empty log message *** |
| 104 | * |
| 105 | * $Header: /cvsroot/Lorene/C++/Include/type_parite.h,v 1.14 2013/06/05 15:00:26 j_novak Exp $ |
| 106 | * |
| 107 | */ |
| 108 | /** |
| 109 | * \defgroup def_mac LORENE's macros. |
| 110 | * |
| 111 | * @{ |
| 112 | */ |
| 113 | |
| 114 | /* Etat des tbl et autres */ |
| 115 | /* ---------------------- */ |
| 116 | #define ETATZERO 0 |
| 117 | #define ETATUN 1 |
| 118 | #define ETATQCQ 2 |
| 119 | #define ETATNONDEF 3 |
| 120 | |
| 121 | /* Uniform sampling on a Cartesian grid */ |
| 122 | #define UNIFORM 3 |
| 123 | |
| 124 | /* Echantillonage fin en r */ |
| 125 | /* ----------------------- */ |
| 126 | #define RARE 1 |
| 127 | #define FIN 0 |
| 128 | #define UNSURR 2 |
| 129 | |
| 130 | /* Symetries en theta */ |
| 131 | /* ------------------ */ |
| 132 | #define SYM 1 |
| 133 | #define NONSYM 0 |
| 134 | |
| 135 | /* Types de bases en r */ |
| 136 | /* ------------------- */ |
| 137 | #define BASE_CHEB 0 |
| 138 | #define BASE_LEG 1 |
| 139 | #define BASE_JAC02 2 |
| 140 | |
| 141 | /* Les bases de developement */ |
| 142 | /* ------------------------- */ |
| 143 | /// Nombre max. de bases differentes |
| 144 | #define MAX_BASE 32 |
| 145 | /// Smaller maximum bases used for phi (and higher dimensions for now) |
| 146 | #define MAX_BASE_2 16 |
| 147 | |
| 148 | /* Divers (masques, nulls,...) */ |
| 149 | /// base inconnue |
| 150 | #define NONDEF 0x00000000 |
| 151 | /// Extraction de l'info sur R |
| 152 | #define MSQ_R 0x000000ff |
| 153 | /// Extraction de l'info sur Theta |
| 154 | #define MSQ_T 0x0000ff00 |
| 155 | /// Extraction de l'info sur Phi |
| 156 | #define MSQ_P 0x000f0000//0x00ff0000 <- was this |
| 157 | /// Translation en R, used for a bitwise shift (in hex) |
| 158 | #define TRA_R 0 |
| 159 | /// Translation en Theta, used for a bitwise shift (in hex) |
| 160 | #define TRA_T 8 |
| 161 | /// Translation en Phi, used for a bitwise shift (in hex) |
| 162 | #define TRA_P 16 |
| 163 | |
| 164 | /* R */ |
| 165 | /// base de Chebychev ordinaire (fin) |
| 166 | #define R_CHEB 0x00000001 |
| 167 | /// base de Cheb. paire (rare) seulement |
| 168 | #define R_CHEBP 0x00000002 |
| 169 | /// base de Cheb. impaire (rare) seulement |
| 170 | #define R_CHEBI 0x00000003 |
| 171 | /// Cheb. pair-impair suivant l pair pour l=0 |
| 172 | #define R_CHEBPI_P 0x00000004 |
| 173 | /// Cheb. pair-impair suivant l impair pour l=0 |
| 174 | #define R_CHEBPI_I 0x00000005 |
| 175 | /// Cheb. pair-impair suivant m, pair pour m=0 |
| 176 | #define R_CHEBPIM_P 0x00000006 |
| 177 | /// Cheb. pair-impair suivant m, impair pour m=0 |
| 178 | #define R_CHEBPIM_I 0x00000007 |
| 179 | /// base de Chebychev ordinaire (fin), dev. en 1/r |
| 180 | #define R_CHEBU 0x00000008 |
| 181 | /// base de Legendre ordinaire (fin) |
| 182 | #define R_LEG 0x00000009 |
| 183 | /// base de Legendre paire (rare) seulement |
| 184 | #define R_LEGP 0x0000000a |
| 185 | /// base de Legendre impaire (rare) seulement |
| 186 | #define R_LEGI 0x0000000b |
| 187 | /// base de Jacobi(0,2) ordinaire (finjac) |
| 188 | #define R_JACO02 0x0000000c |
| 189 | |
| 190 | /* Theta */ |
| 191 | /// dev. cos-sin alternes, cos pour m=0 |
| 192 | #define T_COSSIN_C 0x00000100 |
| 193 | /// dev. cos-sin alternes, sin pour m=0 |
| 194 | #define T_COSSIN_S 0x00000200 |
| 195 | /// dev. cos seulement |
| 196 | #define T_COS 0x00000300 |
| 197 | /// dev. sin seulement |
| 198 | #define T_SIN 0x00000400 |
| 199 | /// dev. cos seulement, harmoniques paires |
| 200 | #define T_COS_P 0x00000500 |
| 201 | /// dev. sin seulement, harmoniques paires |
| 202 | #define T_SIN_P 0x00000600 |
| 203 | /// dev. cos seulement, harmoniques impaires |
| 204 | #define T_COS_I 0x00000700 |
| 205 | /// dev. sin seulement, harmoniques impaires |
| 206 | #define T_SIN_I 0x00000800 |
| 207 | /// cos pair-sin impair alternes, cos pour m=0 |
| 208 | #define T_COSSIN_CP 0x00000900 |
| 209 | /// sin pair-cos impair alternes, sin pour m=0 |
| 210 | #define T_COSSIN_SP 0x00000a00 |
| 211 | /// cos impair-sin pair alternes, cos pour m=0 |
| 212 | #define T_COSSIN_CI 0x00000b00 |
| 213 | /// sin impair-cos pair alternes, sin pour m=0 |
| 214 | #define T_COSSIN_SI 0x00000c00 |
| 215 | /// fct. de Legendre associees paires |
| 216 | #define T_LEG_P 0x00000d00 |
| 217 | /// fct. de Legendre associees paires avec m pair |
| 218 | #define T_LEG_PP 0x00000e00 |
| 219 | /// fct. de Legendre associees impaires |
| 220 | #define T_LEG_I 0x00000f00 |
| 221 | /// fct. de Legendre associees impaires avec m pair |
| 222 | #define T_LEG_IP 0x00001000 |
| 223 | /// fct. de Legendre associees paires avec m impair |
| 224 | #define T_LEG_PI 0x00001100 |
| 225 | /// fct. de Legendre associees impaires avec m impair |
| 226 | #define T_LEG_II 0x00001200 |
| 227 | /// CL of even cosines |
| 228 | #define T_CL_COS_P 0x00001300 |
| 229 | /// CL of even sines |
| 230 | #define T_CL_SIN_P 0x00001400 |
| 231 | /// CL of odd cosines |
| 232 | #define T_CL_COS_I 0x00001500 |
| 233 | /// CL of odd sines. |
| 234 | #define T_CL_SIN_I 0x00001600 |
| 235 | /// fct. de Legendre associees |
| 236 | #define T_LEG 0x00001700 |
| 237 | /// fct. de Legendre associees avec m pair |
| 238 | #define T_LEG_MP 0x00001800 |
| 239 | /// fct. de Legendre associees avec m impair |
| 240 | #define T_LEG_MI 0x00001900 |
| 241 | |
| 242 | |
| 243 | /* Phi */ |
| 244 | /// dev. standart |
| 245 | #define P_COSSIN 0x00010000 |
| 246 | /// dev. sur Phi = 2*phi, freq. paires |
| 247 | #define P_COSSIN_P 0x00020000 |
| 248 | /// dev. sur Phi = 2*phi, freq. impaires |
| 249 | #define P_COSSIN_I 0x00030000 |
| 250 | /// dev. cos seulement |
| 251 | #define P_COS 0x00040000 |
| 252 | /// dev. sin seulement |
| 253 | #define P_SIN 0x00050000 |
| 254 | |
| 255 | |
| 256 | /************/ |
| 257 | /* Type EOS */ |
| 258 | /************/ |
| 259 | /// eos polytropique |
| 260 | #define POLYTROPE 0x000000001 |
| 261 | /// eos incompressible |
| 262 | #define INCOMP 0x000000002 |
| 263 | /// eos polytropique (cas newtonien) |
| 264 | #define POLYTROPE_NEWT 0x000000003 |
| 265 | /// eos incompressible (cas newtonien) |
| 266 | #define INCOMP_NEWT 0x000000004 |
| 267 | |
| 268 | /*******************************/ |
| 269 | /* Type operateur dalembertien */ |
| 270 | /* (uniquement pour le noyau */ |
| 271 | /* pour l'instant) */ |
| 272 | /*******************************/ |
| 273 | /// Nombre max d'operateurs (pour l'instant) |
| 274 | #define MAX_DAL 32 |
| 275 | /// Operateur du premier ordre, \f$\delta < \delta_{crit}\f$ |
| 276 | #define ORDRE1_SMALL 0x000000001 |
| 277 | /// Operateur du premier ordre \f$\delta > \delta_{crit}\f$ |
| 278 | #define ORDRE1_LARGE 0x000000002 |
| 279 | /// Operateur du deuxieme ordre degenere \f$\delta < \delta_{crit}\f$ |
| 280 | #define O2DEGE_SMALL 0x000000003 |
| 281 | /// Operateur du deuxieme ordre degenere \f$\delta > \delta_{crit}\f$ |
| 282 | #define O2DEGE_LARGE 0x000000004 |
| 283 | /// Operateur du deuxieme ordre non degenere \f$\delta < \delta_{crit}\f$ |
| 284 | #define O2NOND_SMALL 0x000000005 |
| 285 | /// Operateur du deuxieme ordre non degenere \f$\delta > \delta_{crit}\f$ |
| 286 | #define O2NOND_LARGE 0x000000006 |
| 287 | /**@} */ |
| 288 | #endif |