| 1 | /* |
| 2 | * Definition of Lorene classes Ope_elementary |
| 3 | * |
| 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * Copyright (c) 2003 Philippe Grandclement |
| 8 | * |
| 9 | * This file is part of LORENE. |
| 10 | * |
| 11 | * LORENE is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 |
| 13 | * as published by the Free Software Foundation. |
| 14 | * |
| 15 | * LORENE is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with LORENE; if not, write to the Free Software |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 23 | * |
| 24 | */ |
| 25 | |
| 26 | #ifndef __OPE_ELEMENTARY_H_ |
| 27 | #define __OPE_ELEMENTARY_H_ |
| 28 | |
| 29 | /* |
| 30 | * $Id: ope_elementary.h,v 1.12 2014/10/13 08:52:36 j_novak Exp $ |
| 31 | * $Log: ope_elementary.h,v $ |
| 32 | * Revision 1.12 2014/10/13 08:52:36 j_novak |
| 33 | * Lorene classes and functions now belong to the namespace Lorene. |
| 34 | * |
| 35 | * Revision 1.11 2007/05/06 10:48:08 p_grandclement |
| 36 | * Modification of a few operators for the vorton project |
| 37 | * |
| 38 | * Revision 1.10 2007/04/24 09:04:11 p_grandclement |
| 39 | * Addition of an operator for the vortons |
| 40 | * |
| 41 | * Revision 1.9 2004/12/23 16:30:14 j_novak |
| 42 | * New files and class for the solution of the rr component of the tensor Poisson |
| 43 | * equation. |
| 44 | * |
| 45 | * Revision 1.8 2004/08/24 09:14:40 p_grandclement |
| 46 | * Addition of some new operators, like Poisson in 2d... It now requieres the |
| 47 | * GSL library to work. |
| 48 | * |
| 49 | * Also, the way a variable change is stored by a Param_elliptic is changed and |
| 50 | * no longer uses Change_var but rather 2 Scalars. The codes using that feature |
| 51 | * will requiere some modification. (It should concern only the ones about monopoles) |
| 52 | * |
| 53 | * Revision 1.7 2004/06/22 08:49:57 p_grandclement |
| 54 | * Addition of everything needed for using the logarithmic mapping |
| 55 | * |
| 56 | * Revision 1.6 2004/06/14 15:07:10 j_novak |
| 57 | * New methods for the construction of the elliptic operator appearing in |
| 58 | * the vector Poisson equation (acting on eta). |
| 59 | * |
| 60 | * Revision 1.5 2004/05/10 15:28:21 j_novak |
| 61 | * First version of functions for the solution of the r-component of the |
| 62 | * vector Poisson equation. |
| 63 | * |
| 64 | * Revision 1.4 2004/03/23 14:54:45 j_novak |
| 65 | * More documentation |
| 66 | * |
| 67 | * Revision 1.3 2004/03/09 09:15:11 p_grandclement |
| 68 | * Correction pour le raccord... |
| 69 | * |
| 70 | * Revision 1.2 2004/03/05 09:18:48 p_grandclement |
| 71 | * Addition of operator sec_order_r2 |
| 72 | * |
| 73 | * Revision 1.1 2003/12/11 14:57:00 p_grandclement |
| 74 | * I had forgotten the .h (sorry folks...) |
| 75 | * |
| 76 | * Revision 1.2 2001/12/11 06:44:41 e_gourgoulhon |
| 77 | * |
| 78 | * $Header: /cvsroot/Lorene/C++/Include/ope_elementary.h,v 1.12 2014/10/13 08:52:36 j_novak Exp $ |
| 79 | * |
| 80 | */ |
| 81 | |
| 82 | #include "matrice.h" |
| 83 | |
| 84 | namespace Lorene { |
| 85 | /** |
| 86 | * Basic class for elementary elliptic operators. |
| 87 | * |
| 88 | * Such objects describe a type of elliptic operator, in a given domain and |
| 89 | * for a given spherical harmonics. |
| 90 | * They are called by the general elliptic solver. \c Ope_elementary |
| 91 | * objects |
| 92 | * know how to compute the approriate particular solution for a given source |
| 93 | * and the associated homogeneous ones. |
| 94 | * |
| 95 | * The class \c Ope_elementary is an abstract one: |
| 96 | * it cannot be instanciated. |
| 97 | * Specific implementation of coordinate mappings will be performed by derived |
| 98 | * classes of \c Ope_elementary . \ingroup (ellip) |
| 99 | * |
| 100 | **/ |
| 101 | |
| 102 | class Ope_elementary { |
| 103 | |
| 104 | protected: |
| 105 | |
| 106 | int nr ; ///< Number of radial points |
| 107 | int base_r ; ///< Radial basis of decomposition |
| 108 | double alpha ; ///< Parameter \f$\alpha\f$ of the associated mapping. |
| 109 | double beta ; ///< Parameter \f$\beta\f$ of the associated mapping. |
| 110 | |
| 111 | /** |
| 112 | * Pointer on the matrix representation of the operator. |
| 113 | **/ |
| 114 | mutable Matrice* ope_mat ; |
| 115 | /** |
| 116 | * Pointer on the banded-matrix of the operator. |
| 117 | **/ |
| 118 | mutable Matrice* ope_cl ; |
| 119 | /** |
| 120 | * Pointer on the non-degenerated matrix of the operator. |
| 121 | **/ |
| 122 | mutable Matrice* non_dege ; |
| 123 | |
| 124 | /** |
| 125 | * Value of the first homogeneous solution at the outer boundary. |
| 126 | **/ |
| 127 | mutable double s_one_plus ; |
| 128 | /** |
| 129 | * Value of the first homogeneous solution at the inner boundary. |
| 130 | **/ |
| 131 | mutable double s_one_minus ; |
| 132 | /** |
| 133 | * Value of the derivative of the |
| 134 | * first homogeneous solution at the outer boundary. |
| 135 | **/ |
| 136 | mutable double ds_one_plus ; |
| 137 | /** |
| 138 | * Value of the derivative of the |
| 139 | * first homogeneous solution at the inner boundary. |
| 140 | **/ |
| 141 | mutable double ds_one_minus ; |
| 142 | |
| 143 | /** |
| 144 | * Value of the second homogeneous solution at the outer boundary. |
| 145 | **/ |
| 146 | mutable double s_two_plus ; |
| 147 | /** |
| 148 | * Value of the second homogeneous solution at the inner boundary. |
| 149 | **/ |
| 150 | mutable double s_two_minus ; |
| 151 | /** |
| 152 | * Value of the derivative of the |
| 153 | * second homogeneous solution at the outer boundary. |
| 154 | **/ |
| 155 | mutable double ds_two_plus ; |
| 156 | /** |
| 157 | * Value of the derivative of the |
| 158 | * second homogeneous solution at the inner boundary. |
| 159 | **/ |
| 160 | mutable double ds_two_minus ; |
| 161 | |
| 162 | /** |
| 163 | * Value of the particular solution at the inner boundary. |
| 164 | **/ |
| 165 | mutable double sp_minus ; |
| 166 | /** |
| 167 | * Value of the particular solution at the outer boundary. |
| 168 | **/ |
| 169 | mutable double sp_plus ; |
| 170 | /** |
| 171 | * Value of the derivative of the particular solution at the inner boundary. |
| 172 | **/ |
| 173 | mutable double dsp_minus ; |
| 174 | /** |
| 175 | * Value of the derivative of the particular solution at the outer boundary. |
| 176 | **/ |
| 177 | mutable double dsp_plus ; |
| 178 | |
| 179 | // Constructors destructor |
| 180 | protected: |
| 181 | /** |
| 182 | * Standard constructor, protected because the class is an abstract one. |
| 183 | * |
| 184 | * @param nbr [input] number of radial points. |
| 185 | * @param baser [input] radial basis of decomposition. |
| 186 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 187 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 188 | **/ |
| 189 | explicit Ope_elementary (int nbr , int baser , double alf, double eta) ; |
| 190 | Ope_elementary (const Ope_elementary&) ; ///< Constructor by copy |
| 191 | |
| 192 | public: |
| 193 | virtual ~Ope_elementary() ; ///< Destructor |
| 194 | |
| 195 | public: |
| 196 | /** |
| 197 | * Returns the value of the first homogeneous solution at the inner |
| 198 | * boundary. |
| 199 | **/ |
| 200 | double val_sh_one_minus() const {return s_one_minus ;} ; |
| 201 | /** |
| 202 | * Returns the value of the first homogeneous solution at the outer |
| 203 | * boundary. |
| 204 | **/ |
| 205 | double val_sh_one_plus() const {return s_one_plus ;} ; |
| 206 | /** |
| 207 | * Returns the value of the derivative of the |
| 208 | * first homogeneous solution at the inner |
| 209 | * boundary. |
| 210 | **/ |
| 211 | double der_sh_one_minus() const {return ds_one_minus ;} ; |
| 212 | /** |
| 213 | * Returns the value of the derivative of the |
| 214 | * first homogeneous solution at the outer |
| 215 | * boundary. |
| 216 | **/ |
| 217 | double der_sh_one_plus() const {return ds_one_plus ;} ; |
| 218 | |
| 219 | /** |
| 220 | * Returns the value of the second homogeneous solution at the inner |
| 221 | * boundary. |
| 222 | **/ |
| 223 | double val_sh_two_minus() const {return s_two_minus ;} ; |
| 224 | /** |
| 225 | * Returns the value of the second homogeneous solution at the outer |
| 226 | * boundary. |
| 227 | **/ |
| 228 | double val_sh_two_plus() const {return s_two_plus ;} ; |
| 229 | /** |
| 230 | * Returns the value of the derivative of the |
| 231 | * second homogeneous solution at the inner |
| 232 | * boundary. |
| 233 | **/ |
| 234 | double der_sh_two_minus() const {return ds_two_minus ;} ; |
| 235 | /** |
| 236 | * Returns the value of the derivative of the |
| 237 | * second homogeneous solution at the outer |
| 238 | * boundary. |
| 239 | **/ |
| 240 | double der_sh_two_plus() const {return ds_two_plus ;} ; |
| 241 | |
| 242 | /** |
| 243 | * Returns the value of the particular solution at the inner boundary. |
| 244 | **/ |
| 245 | double val_sp_minus() const {return sp_minus ;} ; |
| 246 | /** |
| 247 | * Returns the value of the particular solution at the outer boundary. |
| 248 | **/ |
| 249 | double val_sp_plus() const {return sp_plus ;} ; |
| 250 | /** |
| 251 | * Returns the value of the derivative |
| 252 | * particular solution at the inner boundary. |
| 253 | **/ |
| 254 | double der_sp_minus() const {return dsp_minus ;} ; |
| 255 | /** |
| 256 | * Returns the value of the derivative |
| 257 | * particular solution at the outer boundary. |
| 258 | **/ |
| 259 | double der_sp_plus() const {return dsp_plus ;} ; |
| 260 | |
| 261 | /// Returns \c alpha . |
| 262 | double get_alpha() const {return alpha ;} ; |
| 263 | |
| 264 | /// Returns \c beta}. |
| 265 | double get_beta() const {return beta ;} ; |
| 266 | |
| 267 | /// Returns \c base_r}. |
| 268 | int get_base_r() const {return base_r ;} ; |
| 269 | |
| 270 | /// Returns the matrix representation. |
| 271 | Matrice get_ope_mat() { |
| 272 | if (ope_mat ==0x0) |
| 273 | do_ope_mat() ; |
| 274 | return *ope_mat ; |
| 275 | } |
| 276 | |
| 277 | /// Returns the banded matrix representation. |
| 278 | Matrice get_ope_cl() { |
| 279 | if (ope_cl ==0x0) |
| 280 | do_ope_cl() ; |
| 281 | return *ope_cl ; |
| 282 | } |
| 283 | |
| 284 | /// Returns the non degenerate matrix representation. |
| 285 | Matrice get_non_dege() { |
| 286 | if (non_dege ==0x0) |
| 287 | do_non_dege() ; |
| 288 | return *non_dege ; |
| 289 | } |
| 290 | private: |
| 291 | /** |
| 292 | * Computes the matrix of the operator. |
| 293 | **/ |
| 294 | virtual void do_ope_mat() const = 0 ; |
| 295 | /** |
| 296 | * Computes the banded-matrix of the operator. |
| 297 | **/ |
| 298 | virtual void do_ope_cl() const = 0 ; |
| 299 | /** |
| 300 | * Computes the non-degenerated matrix of the operator. |
| 301 | **/ |
| 302 | virtual void do_non_dege() const = 0 ; |
| 303 | |
| 304 | public: |
| 305 | /** |
| 306 | * Computes the particular solution, given the source \c so . |
| 307 | **/ |
| 308 | virtual Tbl get_solp(const Tbl& so) const = 0 ; |
| 309 | /** |
| 310 | * Computes the homogeneous solutions(s). |
| 311 | **/ |
| 312 | virtual Tbl get_solh() const = 0 ; |
| 313 | /** |
| 314 | * Increases the quatum number \e l by one unit. |
| 315 | **/ |
| 316 | virtual void inc_l_quant() = 0 ; |
| 317 | } ; |
| 318 | |
| 319 | /** |
| 320 | * Class for the operator of the Poisson equation (i.e. the Laplacian !). |
| 321 | * |
| 322 | * It is implemented in every type of domains. |
| 323 | **/ |
| 324 | |
| 325 | class Ope_poisson : public Ope_elementary { |
| 326 | |
| 327 | protected: |
| 328 | int l_quant ; ///< quantum number |
| 329 | int dzpuis ; ///< the associated dzpuis, if in the compactified domain. |
| 330 | |
| 331 | public: |
| 332 | /** |
| 333 | * Standard constructor. |
| 334 | * |
| 335 | * @param nbr [input] number of radial points. |
| 336 | * @param baser [input] radial basis of decomposition. |
| 337 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 338 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 339 | * @param lq [input] quantum number \e l . |
| 340 | * @param dz [input] dzpuis of the source. |
| 341 | **/ |
| 342 | Ope_poisson (int nbr, int baser, double alf, double bet, int lq, int dz) ; |
| 343 | Ope_poisson (const Ope_poisson&) ; ///< Constructor by copy |
| 344 | virtual ~Ope_poisson() ; ///< Destructor |
| 345 | |
| 346 | /// Returns the associated dzpuis, if in the compactified domain. |
| 347 | int get_dzpuis() {return dzpuis ;} ; |
| 348 | |
| 349 | /// Returns the quantum number \e l |
| 350 | int get_lquant() {return l_quant;} ; |
| 351 | |
| 352 | private: |
| 353 | /** |
| 354 | * Computes the matrix of the operator. |
| 355 | **/ |
| 356 | virtual void do_ope_mat() const ; |
| 357 | /** |
| 358 | * Computes the banded-matrix of the operator. |
| 359 | **/ |
| 360 | virtual void do_ope_cl() const ; |
| 361 | /** |
| 362 | * Computes the non-degenerated matrix of the operator. |
| 363 | **/ |
| 364 | virtual void do_non_dege() const ; |
| 365 | |
| 366 | public: |
| 367 | /** |
| 368 | * Computes the particular solution, given the source \c so . |
| 369 | **/ |
| 370 | virtual Tbl get_solp(const Tbl& so) const ; |
| 371 | /** |
| 372 | * Computes the homogeneous solutions(s). |
| 373 | **/ |
| 374 | virtual Tbl get_solh() const ; |
| 375 | /** |
| 376 | * Increases the quatum number \e l by one unit. |
| 377 | **/ |
| 378 | virtual void inc_l_quant() ; |
| 379 | /** |
| 380 | * Decreases the quatum number \e l by one unit. |
| 381 | **/ |
| 382 | virtual void dec_l_quant() ; |
| 383 | } ; |
| 384 | |
| 385 | /** |
| 386 | * Class for the Helmholtz operator \f$\Delta - m^2\f$ (\f$m > 0\f$). |
| 387 | * |
| 388 | * It is implemented only in the shells and in the compactified domain. |
| 389 | **/ |
| 390 | class Ope_helmholtz_minus : public Ope_elementary { |
| 391 | |
| 392 | protected: |
| 393 | int lq ; ///< The quantum number \e l |
| 394 | double masse ; ///< The mass parameter \e m . |
| 395 | |
| 396 | public: |
| 397 | /** |
| 398 | * Standard constructor. |
| 399 | * |
| 400 | * @param nbr [input] number of radial points. |
| 401 | * @param baser [input] radial basis of decomposition. |
| 402 | * @param lq [input] the quatum number \e l. |
| 403 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 404 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 405 | * @param mas [input] mass parameter \e m . |
| 406 | **/ |
| 407 | Ope_helmholtz_minus (int nbr, int baser, int lq, double alf, double bet, |
| 408 | double mas) ; |
| 409 | Ope_helmholtz_minus (const Ope_helmholtz_minus&) ; ///< Constructor by copy |
| 410 | virtual ~Ope_helmholtz_minus() ; ///< Destructor |
| 411 | |
| 412 | private: |
| 413 | /** |
| 414 | * Computes the matrix of the operator. |
| 415 | **/ |
| 416 | virtual void do_ope_mat() const ; |
| 417 | /** |
| 418 | * Computes the banded-matrix of the operator. |
| 419 | **/ |
| 420 | virtual void do_ope_cl() const ; |
| 421 | /** |
| 422 | * Computes the non-degenerated matrix of the operator. |
| 423 | **/ |
| 424 | virtual void do_non_dege() const ; |
| 425 | |
| 426 | public: |
| 427 | /** |
| 428 | * Computes the particular solution, given the source \c so . |
| 429 | **/ |
| 430 | virtual Tbl get_solp(const Tbl& so) const ; |
| 431 | /** |
| 432 | * Computes the homogeneous solutions(s). |
| 433 | **/ |
| 434 | virtual Tbl get_solh() const ; |
| 435 | /** |
| 436 | * Increases the quatum number \e l by one unit (CURRENTLY NOT IMPLEMENTED) |
| 437 | **/ |
| 438 | virtual void inc_l_quant() ; |
| 439 | } ; |
| 440 | |
| 441 | /** |
| 442 | * Class for the Helmholtz operator \f$\Delta + m^2\f$ (\e m > 0). |
| 443 | * |
| 444 | * It is implemented only in the shells. |
| 445 | **/ |
| 446 | class Ope_helmholtz_plus : public Ope_elementary { |
| 447 | |
| 448 | protected: |
| 449 | int lq ; ///< The quantum number \e l |
| 450 | double masse ; ///< The mass parameter \e m . |
| 451 | |
| 452 | public: |
| 453 | /** |
| 454 | * Standard constructor. |
| 455 | * |
| 456 | * @param nbr [input] number of radial points. |
| 457 | * @param baser [input] radial basis of decomposition. |
| 458 | * @param lq [input] the quatum number \e l. |
| 459 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 460 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 461 | * @param mas [input] mass parameter \e m . |
| 462 | **/ |
| 463 | Ope_helmholtz_plus (int nbr, int baser, int lq, double alf, double bet, |
| 464 | double mas) ; |
| 465 | Ope_helmholtz_plus (const Ope_helmholtz_plus&) ; ///< Constructor by copy |
| 466 | virtual ~Ope_helmholtz_plus() ; ///< Destructor |
| 467 | |
| 468 | private: |
| 469 | /** |
| 470 | * Computes the matrix of the operator. |
| 471 | **/ |
| 472 | virtual void do_ope_mat() const ; |
| 473 | /** |
| 474 | * Computes the banded-matrix of the operator. |
| 475 | **/ |
| 476 | virtual void do_ope_cl() const ; |
| 477 | /** |
| 478 | * Computes the non-degenerated matrix of the operator. |
| 479 | **/ |
| 480 | virtual void do_non_dege() const ; |
| 481 | |
| 482 | public: |
| 483 | /** |
| 484 | * Computes the particular solution, given the source \c so . |
| 485 | **/ |
| 486 | virtual Tbl get_solp(const Tbl& so) const ; |
| 487 | /** |
| 488 | * Computes the homogeneous solutions(s). |
| 489 | **/ |
| 490 | virtual Tbl get_solh() const ; |
| 491 | /** |
| 492 | * Increases the quatum number \e l by one unit (CURRENTLY NOT IMPLEMENTED) |
| 493 | **/ |
| 494 | virtual void inc_l_quant() ; |
| 495 | } ; |
| 496 | |
| 497 | /** |
| 498 | * Class for operator of the type |
| 499 | * \f$ a r^2 \partial^2 / \partial r^2 + b r \partial / \partial r + c\f$. |
| 500 | * |
| 501 | * It is implemented only in the shells. |
| 502 | **/ |
| 503 | class Ope_sec_order_r2 : public Ope_elementary { |
| 504 | |
| 505 | protected: |
| 506 | |
| 507 | double a_param ; ///< The parameter \e a . |
| 508 | double b_param ; ///< The parameter \e b . |
| 509 | double c_param ; ///< The parameter \e c . |
| 510 | |
| 511 | public: |
| 512 | /** |
| 513 | * Standard constructor. |
| 514 | * |
| 515 | * @param nbr [input] number of radial points. |
| 516 | * @param baser [input] radial basis of decomposition. |
| 517 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 518 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 519 | * @param a [input] parameter \e a . |
| 520 | * @param b [input] parameter \e b . |
| 521 | * @param c [input] parameter \e c . |
| 522 | **/ |
| 523 | |
| 524 | Ope_sec_order_r2 (int nbr, int baser, double alf, double bet, |
| 525 | double a, double b, double c) ; |
| 526 | |
| 527 | Ope_sec_order_r2 (const Ope_sec_order_r2&) ; ///< Constructor by copy |
| 528 | virtual ~Ope_sec_order_r2() ; ///< Destructor |
| 529 | |
| 530 | private: |
| 531 | /** |
| 532 | * Computes the matrix of the operator. |
| 533 | **/ |
| 534 | virtual void do_ope_mat() const ; |
| 535 | /** |
| 536 | * Computes the banded-matrix of the operator. |
| 537 | **/ |
| 538 | virtual void do_ope_cl() const ; |
| 539 | /** |
| 540 | * Computes the non-degenerated matrix of the operator. |
| 541 | **/ |
| 542 | virtual void do_non_dege() const ; |
| 543 | |
| 544 | public: |
| 545 | /** |
| 546 | * Computes the particular solution, given the source \c so . |
| 547 | **/ |
| 548 | virtual Tbl get_solp(const Tbl& so) const ; |
| 549 | /** |
| 550 | * Computes the homogeneous solutions(s). |
| 551 | **/ |
| 552 | virtual Tbl get_solh() const ; |
| 553 | /** |
| 554 | * Increases the quatum number \e l by one unit (CURRENTLY NOT IMPLEMENTED) |
| 555 | **/ |
| 556 | virtual void inc_l_quant() ; |
| 557 | } ; |
| 558 | |
| 559 | /** |
| 560 | * Class for operator of the type |
| 561 | * \f$ a \partial^2 / \partial r^2 + b \partial / \partial r + c\f$. |
| 562 | * |
| 563 | * It is implemented only in the shells. |
| 564 | **/ |
| 565 | class Ope_sec_order : public Ope_elementary { |
| 566 | |
| 567 | protected: |
| 568 | |
| 569 | double a_param ; ///< The parameter \f$a\f$. |
| 570 | double b_param ; ///< The parameter \f$b\f$. |
| 571 | double c_param ; ///< The parameter \f$c\f$. |
| 572 | |
| 573 | public: |
| 574 | /** |
| 575 | * Standard constructor. |
| 576 | * |
| 577 | * @param nbr [input] number of radial points. |
| 578 | * @param baser [input] radial basis of decomposition. |
| 579 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 580 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 581 | * @param a [input] parameter \f$a\f$ . |
| 582 | * @param b [input] parameter \f$b\f$ . |
| 583 | * @param c [input] parameter \f$c\f$ . |
| 584 | **/ |
| 585 | |
| 586 | Ope_sec_order (int nbr, int baser, double alf, double bet, |
| 587 | double a, double b, double c) ; |
| 588 | |
| 589 | Ope_sec_order (const Ope_sec_order&) ; ///< Constructor by copy |
| 590 | virtual ~Ope_sec_order() ; ///< Destructor |
| 591 | |
| 592 | private: |
| 593 | /** |
| 594 | * Computes the matrix of the operator. |
| 595 | **/ |
| 596 | virtual void do_ope_mat() const ; |
| 597 | /** |
| 598 | * Computes the banded-matrix of the operator. |
| 599 | **/ |
| 600 | virtual void do_ope_cl() const ; |
| 601 | /** |
| 602 | * Computes the non-degenerated matrix of the operator. |
| 603 | **/ |
| 604 | virtual void do_non_dege() const ; |
| 605 | |
| 606 | public: |
| 607 | |
| 608 | /** |
| 609 | * Computes the particular solution, given the source \c so . |
| 610 | **/ |
| 611 | virtual Tbl get_solp(const Tbl& so) const ; |
| 612 | /** |
| 613 | * Computes the homogeneous solutions(s). |
| 614 | **/ |
| 615 | virtual Tbl get_solh() const ; |
| 616 | /** |
| 617 | * Increases the quatum number \f$l\f$ by one unit (CURRENTLY NOT IMPLEMENTED) |
| 618 | **/ |
| 619 | virtual void inc_l_quant() ; |
| 620 | } ; |
| 621 | |
| 622 | /** |
| 623 | * Class for the operator of the \e r component of the vector |
| 624 | * Poisson equation. The operator reads \f$\Delta + \frac{2}{r} |
| 625 | *\frac{\partial}{\partial r} |
| 626 | * + \frac{2}{r^2} \f$ in all domains, for \f$ l \not= 0 \f$; and to |
| 627 | * \f$\frac{\partial^2}{\partial r^2} + \frac{2}{r} \frac{\partial} |
| 628 | * {\partial r} - \frac{2}{r^2} \f$ |
| 629 | * in all domains otherwise. |
| 630 | * |
| 631 | * It is implemented in every type of domain. |
| 632 | **/ |
| 633 | class Ope_pois_vect_r : public Ope_poisson { |
| 634 | |
| 635 | public: |
| 636 | /** |
| 637 | * Standard constructor. |
| 638 | * |
| 639 | * @param nbr [input] number of radial points. |
| 640 | * @param baser [input] radial basis of decomposition. |
| 641 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 642 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 643 | * @param lq [input] quantum number \e l . |
| 644 | * @param dz [input] dzpuis of the source. |
| 645 | **/ |
| 646 | Ope_pois_vect_r (int nbr, int baser, double alf, double bet, int lq, int dz) ; |
| 647 | Ope_pois_vect_r (const Ope_pois_vect_r&) ; ///< Constructor by copy |
| 648 | virtual ~Ope_pois_vect_r() ; ///< Destructor |
| 649 | |
| 650 | private: |
| 651 | /** |
| 652 | * Computes the matrix of the operator. |
| 653 | **/ |
| 654 | virtual void do_ope_mat() const ; |
| 655 | /** |
| 656 | * Computes the banded-matrix of the operator. |
| 657 | **/ |
| 658 | virtual void do_ope_cl() const ; |
| 659 | /** |
| 660 | * Computes the non-degenerated matrix of the operator. |
| 661 | **/ |
| 662 | virtual void do_non_dege() const ; |
| 663 | |
| 664 | public: |
| 665 | /** |
| 666 | * Computes the homogeneous solutions(s). |
| 667 | **/ |
| 668 | virtual Tbl get_solh() const ; |
| 669 | } ; |
| 670 | |
| 671 | /** |
| 672 | * Class for the operator of the \e rr component of the divergence-free |
| 673 | * tensor Poisson equation. The operator reads \f$\Delta + \frac{4}{r} |
| 674 | *\frac{\partial}{\partial r} |
| 675 | * + \frac{6}{r^2} \f$ in all domains, for \f$l \geq 2\f$. |
| 676 | * |
| 677 | * It is implemented in every type of domain. |
| 678 | **/ |
| 679 | class Ope_pois_tens_rr : public Ope_poisson { |
| 680 | |
| 681 | public: |
| 682 | /** |
| 683 | * Standard constructor. |
| 684 | * |
| 685 | * @param nbr [input] number of radial points. |
| 686 | * @param baser [input] radial basis of decomposition. |
| 687 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 688 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 689 | * @param lq [input] quantum number \e l . |
| 690 | * @param dz [input] dzpuis of the source. |
| 691 | **/ |
| 692 | Ope_pois_tens_rr (int nbr, int baser, double alf, double bet, int lq, int dz) ; |
| 693 | Ope_pois_tens_rr (const Ope_pois_tens_rr&) ; ///< Constructor by copy |
| 694 | virtual ~Ope_pois_tens_rr() ; ///< Destructor |
| 695 | |
| 696 | private: |
| 697 | /** |
| 698 | * Computes the matrix of the operator. |
| 699 | **/ |
| 700 | virtual void do_ope_mat() const ; |
| 701 | /** |
| 702 | * Computes the banded-matrix of the operator. |
| 703 | **/ |
| 704 | virtual void do_ope_cl() const ; |
| 705 | /** |
| 706 | * Computes the non-degenerated matrix of the operator. |
| 707 | **/ |
| 708 | virtual void do_non_dege() const ; |
| 709 | |
| 710 | public: |
| 711 | /** |
| 712 | * Computes the homogeneous solutions(s). |
| 713 | **/ |
| 714 | virtual Tbl get_solh() const ; |
| 715 | } ; |
| 716 | |
| 717 | /** |
| 718 | * Class for the operator of the Poisson equation in 2D. |
| 719 | * |
| 720 | * It is implemented in every type of domains. |
| 721 | **/ |
| 722 | |
| 723 | class Ope_poisson_2d : public Ope_elementary { |
| 724 | |
| 725 | protected: |
| 726 | int l_quant ; ///< quantum number |
| 727 | int dzpuis ; ///< the associated dzpuis, if in the compactified domain. |
| 728 | |
| 729 | public: |
| 730 | /** |
| 731 | * Standard constructor. |
| 732 | * |
| 733 | * @param nbr [input] number of radial points. |
| 734 | * @param baser [input] radial basis of decomposition. |
| 735 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 736 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 737 | * @param lq [input] quantum number \e l . |
| 738 | * @param dz [input] dzpuis of the source. |
| 739 | **/ |
| 740 | Ope_poisson_2d (int nbr, int baser, double alf, double bet, int lq, int dz) ; |
| 741 | Ope_poisson_2d (const Ope_poisson_2d&) ; ///< Constructor by copy |
| 742 | virtual ~Ope_poisson_2d() ; ///< Destructor |
| 743 | |
| 744 | /// Returns the associated dzpuis, if in the compactified domain. |
| 745 | int get_dzpuis() {return dzpuis ;} ; |
| 746 | |
| 747 | /// Returns the quantum number \e l |
| 748 | int get_lquant() {return l_quant;} ; |
| 749 | |
| 750 | private: |
| 751 | /** |
| 752 | * Computes the matrix of the operator. |
| 753 | **/ |
| 754 | virtual void do_ope_mat() const ; |
| 755 | /** |
| 756 | * Computes the banded-matrix of the operator. |
| 757 | **/ |
| 758 | virtual void do_ope_cl() const ; |
| 759 | /** |
| 760 | * Computes the non-degenerated matrix of the operator. |
| 761 | **/ |
| 762 | virtual void do_non_dege() const ; |
| 763 | |
| 764 | public: |
| 765 | /** |
| 766 | * Computes the particular solution, given the source \c so . |
| 767 | **/ |
| 768 | virtual Tbl get_solp(const Tbl& so) const ; |
| 769 | /** |
| 770 | * Computes the homogeneous solutions(s). |
| 771 | **/ |
| 772 | virtual Tbl get_solh() const ; |
| 773 | /** |
| 774 | * Increases the quatum number \e l by one unit. |
| 775 | **/ |
| 776 | virtual void inc_l_quant() ; |
| 777 | /** |
| 778 | * Decreases the quatum number \e l by one unit. |
| 779 | **/ |
| 780 | virtual void dec_l_quant() ; |
| 781 | |
| 782 | } ; |
| 783 | |
| 784 | /** |
| 785 | * Class for the operator of the Helmholtz equation in 2D. |
| 786 | * |
| 787 | **/ |
| 788 | |
| 789 | class Ope_helmholtz_minus_2d : public Ope_elementary { |
| 790 | |
| 791 | protected: |
| 792 | int l_quant ; ///< quantum number |
| 793 | double masse ; ///< The mass term. |
| 794 | int dzpuis ; ///< the associated dzpuis, if in the compactified domain. |
| 795 | |
| 796 | public: |
| 797 | /** |
| 798 | * Standard constructor. |
| 799 | * |
| 800 | * @param nbr [input] number of radial points. |
| 801 | * @param baser [input] radial basis of decomposition. |
| 802 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 803 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 804 | * @param lq [input] quantum number \e l . |
| 805 | * @param masse [input] mass term. |
| 806 | * @param dz [input] dzpuis of the source. |
| 807 | **/ |
| 808 | Ope_helmholtz_minus_2d (int nbr, int baser, double alf, double bet, int lq, double masse, int dz) ; |
| 809 | Ope_helmholtz_minus_2d (const Ope_helmholtz_minus_2d&) ; ///< Constructor by copy |
| 810 | virtual ~Ope_helmholtz_minus_2d() ; ///< Destructor |
| 811 | |
| 812 | /// Returns the associated dzpuis, if in the compactified domain. |
| 813 | int get_dzpuis() {return dzpuis ;} ; |
| 814 | |
| 815 | /// Returns the quantum number \e l |
| 816 | int get_lquant() {return l_quant;} ; |
| 817 | |
| 818 | /// Returns the mass term |
| 819 | double get_masse() {return masse;} ; |
| 820 | |
| 821 | private: |
| 822 | /** |
| 823 | * Computes the matrix of the operator. |
| 824 | **/ |
| 825 | virtual void do_ope_mat() const ; |
| 826 | /** |
| 827 | * Computes the banded-matrix of the operator. |
| 828 | **/ |
| 829 | virtual void do_ope_cl() const ; |
| 830 | /** |
| 831 | * Computes the non-degenerated matrix of the operator. |
| 832 | **/ |
| 833 | virtual void do_non_dege() const ; |
| 834 | |
| 835 | public: |
| 836 | /** |
| 837 | * Computes the particular solution, given the source \c so . |
| 838 | **/ |
| 839 | virtual Tbl get_solp(const Tbl& so) const ; |
| 840 | /** |
| 841 | * Computes the homogeneous solutions(s). |
| 842 | **/ |
| 843 | virtual Tbl get_solh() const ; |
| 844 | /** |
| 845 | * Increases the quatum number \e l by one unit. |
| 846 | **/ |
| 847 | virtual void inc_l_quant() ; |
| 848 | /** |
| 849 | * Decreases the quatum number \e l by one unit. |
| 850 | **/ |
| 851 | virtual void dec_l_quant() ; |
| 852 | } ; |
| 853 | |
| 854 | /** |
| 855 | * Class for the operator of the Poisson equation in pseudo 1d. |
| 856 | * |
| 857 | **/ |
| 858 | |
| 859 | class Ope_poisson_pseudo_1d : public Ope_elementary { |
| 860 | |
| 861 | protected: |
| 862 | int l_quant ; ///< quantum number |
| 863 | |
| 864 | public: |
| 865 | /** |
| 866 | * Standard constructor. |
| 867 | * |
| 868 | * @param nbr [input] number of radial points. |
| 869 | * @param baser [input] radial basis of decomposition. |
| 870 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 871 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 872 | * @param lq [input] quantum number \e l . |
| 873 | **/ |
| 874 | Ope_poisson_pseudo_1d (int nbr, int baser, double alf, double bet, int lq) ; |
| 875 | Ope_poisson_pseudo_1d (const Ope_poisson_pseudo_1d&) ; ///< Constructor by copy |
| 876 | virtual ~Ope_poisson_pseudo_1d() ; ///< Destructor |
| 877 | |
| 878 | /// Returns the quantum number \e l |
| 879 | int get_lquant() {return l_quant;} ; |
| 880 | |
| 881 | private: |
| 882 | /** |
| 883 | * Computes the matrix of the operator. |
| 884 | **/ |
| 885 | virtual void do_ope_mat() const ; |
| 886 | /** |
| 887 | * Computes the banded-matrix of the operator. |
| 888 | **/ |
| 889 | virtual void do_ope_cl() const ; |
| 890 | /** |
| 891 | * Computes the non-degenerated matrix of the operator. |
| 892 | **/ |
| 893 | virtual void do_non_dege() const ; |
| 894 | |
| 895 | public: |
| 896 | /** |
| 897 | * Computes the particular solution, given the source \c so . |
| 898 | **/ |
| 899 | virtual Tbl get_solp(const Tbl& so) const ; |
| 900 | /** |
| 901 | * Computes the homogeneous solutions(s). |
| 902 | **/ |
| 903 | virtual Tbl get_solh() const ; |
| 904 | /** |
| 905 | * Increases the quatum number \e l by one unit. |
| 906 | **/ |
| 907 | virtual void inc_l_quant() ; |
| 908 | /** |
| 909 | * Decreases the quatum number \e l by one unit. |
| 910 | **/ |
| 911 | virtual void dec_l_quant() ; |
| 912 | |
| 913 | } ; |
| 914 | |
| 915 | |
| 916 | /** |
| 917 | * Class for the operator of the modified Helmholtz equation in pseudo-1d. |
| 918 | * |
| 919 | * It is implemented only in the external domain |
| 920 | **/ |
| 921 | |
| 922 | class Ope_helmholtz_minus_pseudo_1d : public Ope_elementary { |
| 923 | |
| 924 | protected: |
| 925 | int l_quant ; ///< quantum number |
| 926 | double masse ; ///< The mass term. |
| 927 | int dzpuis ; ///< the associated dzpuis, if in the compactified domain. |
| 928 | |
| 929 | public: |
| 930 | /** |
| 931 | * Standard constructor. |
| 932 | * |
| 933 | * @param nbr [input] number of radial points. |
| 934 | * @param baser [input] radial basis of decomposition. |
| 935 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 936 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 937 | * @param lq [input] quantum number \e l . |
| 938 | * @param masse [input] mass term. |
| 939 | * @param dz [input] dzpuis of the source. |
| 940 | **/ |
| 941 | Ope_helmholtz_minus_pseudo_1d (int nbr, int baser, double alf, double bet, |
| 942 | int lq, double masse, int dz) ; |
| 943 | Ope_helmholtz_minus_pseudo_1d (const Ope_helmholtz_minus_pseudo_1d&) ; ///< Constructor by copy |
| 944 | virtual ~Ope_helmholtz_minus_pseudo_1d() ; ///< Destructor |
| 945 | |
| 946 | /// Returns the associated dzpuis, if in the compactified domain. |
| 947 | int get_dzpuis() {return dzpuis ;} ; |
| 948 | |
| 949 | /// Returns the quantum number \e l |
| 950 | int get_lquant() {return l_quant;} ; |
| 951 | |
| 952 | /// Returns the mass term |
| 953 | double get_masse() {return masse;} ; |
| 954 | |
| 955 | private: |
| 956 | /** |
| 957 | * Computes the matrix of the operator. |
| 958 | **/ |
| 959 | virtual void do_ope_mat() const ; |
| 960 | /** |
| 961 | * Computes the banded-matrix of the operator. |
| 962 | **/ |
| 963 | virtual void do_ope_cl() const ; |
| 964 | /** |
| 965 | * Computes the non-degenerated matrix of the operator. |
| 966 | **/ |
| 967 | virtual void do_non_dege() const ; |
| 968 | |
| 969 | public: |
| 970 | /** |
| 971 | * Computes the particular solution, given the source \c so . |
| 972 | **/ |
| 973 | virtual Tbl get_solp(const Tbl& so) const ; |
| 974 | /** |
| 975 | * Computes the homogeneous solutions(s). |
| 976 | **/ |
| 977 | virtual Tbl get_solh() const ; |
| 978 | /** |
| 979 | * Increases the quatum number \e l by one unit. |
| 980 | **/ |
| 981 | virtual void inc_l_quant() ; |
| 982 | /** |
| 983 | * Decreases the quatum number \e l by one unit. |
| 984 | **/ |
| 985 | virtual void dec_l_quant() ; |
| 986 | } ; |
| 987 | |
| 988 | /** |
| 989 | * Class for the operator appearing for the vortons |
| 990 | * |
| 991 | * It is implemented in the shells and the compactified domain |
| 992 | **/ |
| 993 | |
| 994 | class Ope_vorton : public Ope_elementary { |
| 995 | |
| 996 | protected: |
| 997 | int l_quant ; ///< quantum number |
| 998 | int dzpuis ; ///< the associated dzpuis, if in the compactified domain. |
| 999 | |
| 1000 | public: |
| 1001 | /** |
| 1002 | * Standard constructor. |
| 1003 | * |
| 1004 | * @param nbr [input] number of radial points. |
| 1005 | * @param baser [input] radial basis of decomposition. |
| 1006 | * @param alf [input] parameter \f$\alpha\f$ of the mapping. |
| 1007 | * @param bet [input] parameter \f$\beta\f$ of the mapping. |
| 1008 | * @param lq [input] quantum number \e l . |
| 1009 | * @param dz [input] dzpuis of the source. |
| 1010 | **/ |
| 1011 | Ope_vorton (int nbr, int baser, double alf, double bet, int lq, int dz) ; |
| 1012 | Ope_vorton (const Ope_vorton&) ; ///< Constructor by copy |
| 1013 | virtual ~Ope_vorton() ; ///< Destructor |
| 1014 | |
| 1015 | /// Returns the associated dzpuis, if in the compactified domain. |
| 1016 | int get_dzpuis() {return dzpuis ;} ; |
| 1017 | |
| 1018 | /// Returns the quantum number \e l |
| 1019 | int get_lquant() {return l_quant;} ; |
| 1020 | |
| 1021 | private: |
| 1022 | /** |
| 1023 | * Computes the matrix of the operator. |
| 1024 | **/ |
| 1025 | virtual void do_ope_mat() const ; |
| 1026 | /** |
| 1027 | * Computes the banded-matrix of the operator. |
| 1028 | **/ |
| 1029 | virtual void do_ope_cl() const ; |
| 1030 | /** |
| 1031 | * Computes the non-degenerated matrix of the operator. |
| 1032 | **/ |
| 1033 | virtual void do_non_dege() const ; |
| 1034 | |
| 1035 | public: |
| 1036 | /** |
| 1037 | * Computes the particular solution, given the source \c so . |
| 1038 | **/ |
| 1039 | virtual Tbl get_solp(const Tbl& so) const ; |
| 1040 | /** |
| 1041 | * Computes the homogeneous solutions(s). |
| 1042 | **/ |
| 1043 | virtual Tbl get_solh() const ; |
| 1044 | /** |
| 1045 | * Increases the quatum number \e l by one unit. |
| 1046 | **/ |
| 1047 | virtual void inc_l_quant() ; |
| 1048 | /** |
| 1049 | * Decreases the quatum number \e l by one unit. |
| 1050 | **/ |
| 1051 | virtual void dec_l_quant() ; |
| 1052 | } ; |
| 1053 | |
| 1054 | } |
| 1055 | #endif |
| 1056 |