map_radial_r_manip.C

00001 /*
00002  *  Member functions of the class Map_radial for various r manipulations
00003  *  of the Scalar's.
00004  */
00005 
00006 /*
00007  *   Copyright (c) 1999-2003 Eric Gourgoulhon
00008  *   Copyright (c) 2000-2001 Philippe Grandclement
00009  *   Copyright (c) 2001 Jerome Novak
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License as published by
00015  *   the Free Software Foundation; either version 2 of the License, or
00016  *   (at your option) any later version.
00017  *
00018  *   LORENE is distributed in the hope that it will be useful,
00019  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *   GNU General Public License for more details.
00022  *
00023  *   You should have received a copy of the GNU General Public License
00024  *   along with LORENE; if not, write to the Free Software
00025  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026  *
00027  */
00028 
00029 
00030 char map_radial_r_manip_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_radial_r_manip.C,v 1.11 2005/05/25 16:11:04 j_novak Exp $" ;
00031 
00032 /*
00033  * $Id: map_radial_r_manip.C,v 1.11 2005/05/25 16:11:04 j_novak Exp $
00034  * $Log: map_radial_r_manip.C,v $
00035  * Revision 1.11  2005/05/25 16:11:04  j_novak
00036  * Better handling of the case with no compactified domain.
00037  *
00038  * Revision 1.10  2004/10/11 15:09:03  j_novak
00039  * The radial manipulation functions take Scalar as arguments, instead of Cmp.
00040  * Added a conversion operator from Scalar to Cmp.
00041  * The Cmp radial manipulation function make conversion to Scalar, call to the
00042  * Map_radial version with a Scalar argument and back.
00043  *
00044  * Revision 1.9  2004/10/08 13:34:37  j_novak
00045  * Scalar::div_r() does not need to pass through Cmp version anymore.
00046  *
00047  * Revision 1.8  2004/01/28 10:35:52  j_novak
00048  * Added new methods mult_r() for Scalars. These do not change the dzpuis flag.
00049  *
00050  * Revision 1.7  2004/01/27 09:33:48  j_novak
00051  * New method Map_radial::div_r_zec
00052  *
00053  * Revision 1.6  2003/11/04 23:00:16  e_gourgoulhon
00054  * Method div_tant is now defined in file map_radial_th_manip.C.
00055  *
00056  * Revision 1.5  2003/10/27 09:02:19  j_novak
00057  * Corrected a bug in the case of null CED
00058  *
00059  * Revision 1.4  2003/10/17 15:07:29  j_novak
00060  * The order of operations in div_tant() has been changed.
00061  *
00062  * Revision 1.3  2003/10/15 10:41:49  e_gourgoulhon
00063  * Added new method div_tant.
00064  *
00065  * Revision 1.2  2002/08/13 08:02:45  j_novak
00066  * Handling of spherical vector/tensor components added in the classes
00067  * Mg3d and Tenseur. Minor corrections for the class Metconf.
00068  *
00069  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00070  * LORENE
00071  *
00072  * Revision 1.17  2001/10/29  15:34:35  novak
00073  * Ajout de Map_radial::div_r
00074  *
00075  * Revision 1.16  2000/08/31 14:19:26  eric
00076  * *** empty log message ***
00077  *
00078  * Revision 1.15  2000/08/31  13:04:05  eric
00079  * Ajout de la fonction mult_rsint.
00080  * Reecriture de div_rsint.
00081  *
00082  * Revision 1.14  2000/08/31  11:45:19  eric
00083  * Suppression de assert (!((ci_ext.check_dzpuis(0)))) dans
00084  *   Map_radial::mult_r
00085  *
00086  * Revision 1.13  2000/07/20  14:21:27  eric
00087  * Ajout de la fonction div_rsint.
00088  *
00089  * Revision 1.12  2000/05/22  15:12:27  phil
00090  * *** empty log message ***
00091  *
00092  * Revision 1.11  2000/05/22  14:55:47  phil
00093  * la fonction mult_r se contente de changer le dzpuis sans faire d'operation !
00094  * /.
00095  *
00096  * Revision 1.10  2000/05/22  14:39:28  phil
00097  * ajout de inc_dzpuis et dec_dzpuis
00098  *
00099  * Revision 1.9  2000/03/31  13:25:12  eric
00100  * *** empty log message ***
00101  *
00102  * Revision 1.8  2000/03/31  13:11:08  eric
00103  * Map_radial::mult_r : traitement ameliore dans la ZEC.
00104  *
00105  * Revision 1.7  1999/12/02  11:27:34  eric
00106  * *** empty log message ***
00107  *
00108  * Revision 1.6  1999/12/02  11:04:05  eric
00109  * Reorganisation complete de la routine mult_r.
00110  * Appel de Valeur::mult_x().
00111  *
00112  * Revision 1.5  1999/11/30  16:26:26  eric
00113  * *** empty log message ***
00114  *
00115  * Revision 1.4  1999/11/30  15:48:20  eric
00116  * *** empty log message ***
00117  *
00118  * Revision 1.3  1999/11/30  15:31:06  eric
00119  * *** empty log message ***
00120  *
00121  * Revision 1.2  1999/11/30  15:15:02  eric
00122  * *** empty log message ***
00123  *
00124  * Revision 1.1  1999/11/30  14:22:50  eric
00125  * Initial revision
00126  *
00127  *
00128  * $Header: /cvsroot/Lorene/C++/Source/Map/map_radial_r_manip.C,v 1.11 2005/05/25 16:11:04 j_novak Exp $
00129  *
00130  */
00131 
00132 #include "cmp.h"
00133 #include "tensor.h"
00134 
00135 
00136             //---------------------------//
00137             //      mult_r       //
00138             //---------------------------//
00139 
00140 void Map_radial::mult_r(Scalar& uu) const {
00141     
00142     // Verifications d'usage :
00143     assert(uu.get_etat() != ETATNONDEF) ;
00144     
00145     // Nothing to do if the Scalar is null :
00146     if (uu.get_etat() == ETATZERO) {
00147     return ; 
00148     }
00149 
00150     assert((uu.get_etat() == ETATQCQ)||(uu.get_etat() == ETATUN)) ;
00151         
00152     uu.set_etat_qcq() ;
00153 
00154     int nz = mg->get_nzone() ;
00155     int nzm1 = nz-1 ;
00156 
00157 
00158     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00159                         // -------------
00160     
00161     // Decomposition inner domains / external domain : 
00162     // ----------------------------------------------
00163     
00164     Scalar uu_ext = uu ; 
00165     uu_ext.annule(0, nzm1-1) ; 
00166 
00167     uu.annule_domain(nzm1) ; 
00168 
00169     // Inner domains: multiplication by r :
00170     // ----------------------------------
00171     //Confort :
00172     Valeur& val = uu.set_spectral_va() ; 
00173     assert(val.get_mg() == mg) ; 
00174 
00175     val = val.mult_x() ; // Multiplication by xi in the nucleus
00176                      // Identity in the shells
00177 
00178     Base_val sauve_base = val.base ; 
00179     val = val / xsr ;    // R/xi in the nucleus
00180                  // R in the shells
00181     val.base = sauve_base ; 
00182      
00183     // External domain
00184     // ---------------
00185     
00186     Valeur& val_ext = uu_ext.set_spectral_va() ; 
00187     val_ext.sxm1_zec() ; // division par (x-1) dans l'espace des coefs.
00188 
00189     sauve_base = val_ext.base ; 
00190     val_ext = xsr * val_ext ;
00191     val_ext.base = sauve_base ; 
00192     
00193     // Recombination
00194     // -------------
00195 
00196     uu = uu + uu_ext ; 
00197         
00198     }
00199     else{   // Case without ZEC
00200         //-----------------
00201     Valeur& val = uu.set_spectral_va() ; 
00202     val = val.mult_x() ;  // Multiplication by xi in the nucleus
00203                 // Identity in the shells
00204     
00205     Base_val sauve_base = val.base ; 
00206     val = val / xsr ;       // R/xi in the nucleus
00207                 // R in the shells 
00208     val.base = sauve_base ; 
00209     }
00210     
00211     
00212 }
00213 
00214 
00215 void Map_radial::mult_r(Cmp& ci) const {
00216     
00217     // Verifications d'usage :
00218     assert(ci.get_etat() != ETATNONDEF) ;
00219     
00220     // Nothing to do if the Cmp is null :
00221     if (ci.get_etat() == ETATZERO) {
00222     return ; 
00223     }
00224 
00225     assert(ci.get_etat() == ETATQCQ) ;
00226         
00227     int nz = mg->get_nzone() ;
00228     int nzm1 = nz-1 ;
00229 
00230 
00231     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00232                         // -------------
00233     
00234     // Decomposition inner domains / external domain : 
00235     // ----------------------------------------------
00236     
00237     Cmp ci_ext = ci ; 
00238     ci_ext.annule(0, nzm1-1) ; 
00239 
00240     ci.annule(nzm1) ; 
00241 
00242     // Inner domains: multiplication by r :
00243     // ----------------------------------
00244     //Confort :
00245     Valeur& val = ci.va ; 
00246     assert(val.get_mg() == mg) ; 
00247 
00248     val = val.mult_x() ; // Multiplication by xi in the nucleus
00249                      // Identity in the shells
00250 
00251     Base_val sauve_base = val.base ; 
00252     val = val / xsr ;    // R/xi in the nucleus
00253                  // R in the shells
00254     val.base = sauve_base ; 
00255      
00256     // External domain
00257     // ---------------
00258     
00259     // On change juste le dzpuis !
00260 
00261     //## assert (!((ci_ext.check_dzpuis(0)))) ;
00262     // On fait just dec_dzpuis ...
00263     ci_ext.set_dzpuis (ci.get_dzpuis()-1) ;
00264     
00265     // Recombination
00266     // -------------
00267 
00268     ci = ci + ci_ext ; 
00269         
00270     }
00271     else{   // Case without ZEC
00272         //-----------------
00273     Valeur& uu = ci.va ; 
00274     uu = uu.mult_x() ;  // Multiplication by xi in the nucleus
00275                 // Identity in the shells
00276     
00277     Base_val sauve_base = uu.base ; 
00278     uu = uu / xsr ;     // R/xi in the nucleus
00279                 // R in the shells 
00280     uu.base = sauve_base ; 
00281     }
00282     
00283     
00284 }
00285 
00286 
00287 
00288             //---------------------------//
00289             //      mult_r_zec       //
00290             //---------------------------//
00291 
00292 void Map_radial::mult_r_zec(Scalar& ci) const {
00293     
00294     // Verifications d'usage :
00295     assert(ci.get_etat() != ETATNONDEF) ;
00296     
00297     // Nothing to do if the Scalar is null :
00298     if (ci.get_etat() == ETATZERO) {
00299     return ; 
00300     }
00301 
00302     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00303     
00304     ci.set_etat_qcq() ;
00305 
00306     //Confort :
00307     Valeur& uu = ci.set_spectral_va() ; 
00308     assert(uu.get_mg() == mg) ; 
00309     
00310     int nz = mg->get_nzone() ;
00311     int nzm1 = nz-1 ;
00312 
00313 
00314     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00315                         // -------------
00316     
00317     // On stocke tout sauf la ZEC
00318 
00319     Valeur val = uu ;
00320     val.annule(nzm1) ;
00321    
00322     // On ne travaile que sur la ZEC :
00323 
00324     Valeur val_ext = uu ;
00325     val_ext.annule(0, nzm1-1) ; 
00326     
00327     val_ext.sxm1_zec() ; // division par (x-1) dans l'espace des coefs.
00328 
00329     Base_val sauve_base = val_ext.base ; 
00330     val_ext = xsr * val_ext ;
00331     val_ext.base = sauve_base ; 
00332     
00333     // Et on reconstruit le resultat ...
00334     uu = val + val_ext ; 
00335         
00336     }
00337     else{   // Case without ZEC
00338         //-----------------
00339 
00340     return ; 
00341 
00342     }
00343     
00344     
00345 }
00346 
00347             //---------------------------//
00348             //      mult_rsint       //
00349             //---------------------------//
00350 
00351 void Map_radial::mult_rsint(Scalar& ci) const {
00352     
00353     assert(ci.get_etat() != ETATNONDEF) ;
00354     
00355     if (ci.get_etat() == ETATZERO) {
00356     return ;            // Nothing to do if the Scalar is null 
00357     }
00358 
00359     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00360             
00361     ci.set_etat_qcq() ;
00362 
00363     Valeur& val = ci.set_spectral_va() ; 
00364     assert(val.get_mg() == mg) ; 
00365 
00366     int nz = mg->get_nzone() ;
00367     int nzm1 = nz-1 ;
00368 
00369     // 1/ Multiplication by sin(theta)
00370     // -------------------------------
00371     
00372     val = val.mult_st() ;   // Multiplication by sin(theta)
00373 
00374     // 2/ Multiplication by r
00375     // ----------------------    
00376 
00377     Scalar ci_ext(*this) ; 
00378 
00379     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00380                         // -------------
00381         // Decomposition inner domains / external domain : 
00382     // ----------------------------------------------
00383     
00384     ci_ext = ci ; 
00385     ci_ext.annule(0, nzm1-1) ; 
00386     ci.annule_domain(nzm1) ; 
00387 
00388     // External domain 
00389     // ---------------
00390     Valeur& val_ext = ci_ext.set_spectral_va() ; 
00391     assert(val_ext.get_mg() == mg) ; 
00392 
00393     val_ext.sxm1_zec() ;        // Division by (xi-1) 
00394         
00395     Base_val sauve_base = val_ext.base ; 
00396     val_ext = val_ext * xsr ;   // Multiplication by R(xi-1)
00397     val_ext.base = sauve_base ; 
00398     
00399     }
00400     else{   // Case without ZEC
00401         //-----------------
00402 
00403     ci_ext = 0 ; 
00404 
00405     }
00406 
00407     // Inner domains: 
00408     // -------------
00409     val = val.mult_x() ;  // Multiplication by xi in the nucleus
00410                   // Identity in the shells
00411 
00412     Base_val sauve_base = val.base ; 
00413     val = val / xsr ;     // Multiplication by R/xi in the nucleus
00414               //              R in the shells
00415     val.base = sauve_base ; 
00416      
00417     // Recombination
00418     // -------------
00419 
00420     ci = ci + ci_ext ;     
00421     
00422 }
00423 
00424 
00425 
00426             //---------------------------//
00427             //      div_rsint        //
00428             //---------------------------//
00429 
00430 void Map_radial::div_rsint(Scalar& ci) const {
00431     
00432     assert(ci.get_etat() != ETATNONDEF) ;
00433     
00434     if (ci.get_etat() == ETATZERO) {
00435     return ;           // Nothing to do if the Scalar is null 
00436     }
00437 
00438     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00439             
00440     ci.set_etat_qcq() ;
00441 
00442     Valeur& val = ci.set_spectral_va() ; 
00443     assert(val.get_mg() == mg) ; 
00444 
00445     int nz = mg->get_nzone() ;
00446     int nzm1 = nz-1 ;
00447 
00448     // 1/ Division by sin(theta)
00449     // -------------------------
00450     
00451     val = val.ssint() ;     // Division by sin(theta)
00452 
00453 
00454     // 2/ Division by r
00455     // ----------------    
00456 
00457     Scalar ci_ext(*this) ; 
00458 
00459     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00460                         // -------------
00461     
00462     // Decomposition inner domains / external domain : 
00463     // ----------------------------------------------
00464     
00465     ci_ext = ci ; 
00466     ci_ext.annule(0, nzm1-1) ; 
00467     ci.annule_domain(nzm1) ; 
00468 
00469     // External domain
00470     // ---------------
00471     Valeur& val_ext = ci_ext.set_spectral_va() ; 
00472     assert(val_ext.get_mg() == mg) ; 
00473 
00474     val_ext = val_ext.mult_x() ;    // Multiplication by (xi-1)
00475     
00476     Base_val sauve_base = val_ext.base ; 
00477     val_ext = val_ext / xsr ;   // Division by (xi-1)/R
00478     val_ext.base = sauve_base ; 
00479 
00480     }
00481     else{   // Case without ZEC
00482         //-----------------
00483 
00484     ci_ext = 0 ; 
00485 
00486     }
00487 
00488     // Inner domains: 
00489     // -------------
00490 
00491     val = val.sx() ;    // Division by xi in the nucleus
00492             // Identity in the shells
00493 
00494     Base_val sauve_base = val.base ; 
00495     val = val * xsr ;    // Multiplication by xi/R in the nucleus
00496              // Multiplication by 1/R  in the shells
00497     val.base = sauve_base ; 
00498 
00499     // Recombination
00500     // -------------
00501 
00502     ci = ci + ci_ext ;         
00503     
00504 }
00505 
00506             //---------------------------//
00507             //      div_r        //
00508             //---------------------------//
00509 
00510 void Map_radial::div_r(Scalar& ci) const {
00511     
00512     assert(ci.get_etat() != ETATNONDEF) ;
00513     
00514     if (ci.get_etat() == ETATZERO) {
00515     return ;           // Nothing to do if the Scalar is null 
00516     }
00517 
00518     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00519             
00520     ci.set_etat_qcq() ;
00521 
00522     Valeur& val = ci.set_spectral_va() ; 
00523     assert(val.get_mg() == mg) ; 
00524 
00525     int nz = mg->get_nzone() ;
00526     int nzm1 = nz-1 ;
00527 
00528     Scalar ci_ext(*this) ; 
00529 
00530     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00531                         // -------------
00532     
00533     // Decomposition inner domains / external domain : 
00534     // ----------------------------------------------
00535     
00536     ci_ext = ci ; 
00537     ci_ext.annule(0, nzm1-1) ; 
00538     ci.annule_domain(nzm1) ; 
00539 
00540     // External domain
00541     // ---------------
00542     Valeur& val_ext = ci_ext.set_spectral_va() ; 
00543     assert(val_ext.get_mg() == mg) ; 
00544 
00545     val_ext = val_ext.mult_x() ;    // Multiplication by (xi-1)
00546     
00547     Base_val sauve_base = val_ext.base ; 
00548     val_ext = val_ext / xsr ;   // Division by (xi-1)/R
00549     val_ext.base = sauve_base ; 
00550 
00551     }
00552     else{   // Case without ZEC
00553         //-----------------
00554 
00555     ci_ext = 0 ; 
00556 
00557     }
00558 
00559     // Inner domains: 
00560     // -------------
00561 
00562     val = val.sx() ;    // Division by xi in the nucleus
00563             // Identity in the shells
00564 
00565     Base_val sauve_base = val.base ; 
00566     val = val * xsr ;    // Multiplication by xi/R in the nucleus
00567              // Multiplication by 1/R  in the shells
00568     val.base = sauve_base ; 
00569 
00570     // Recombination
00571     // -------------
00572 
00573     ci = ci + ci_ext ;         
00574     
00575 }
00576 
00577             //---------------------------//
00578             //      div_r_zec        //
00579             //---------------------------//
00580 
00581 void Map_radial::div_r_zec(Scalar& uu) const {
00582     
00583     // Verifications d'usage :
00584     assert(uu.get_etat() != ETATNONDEF) ;
00585     
00586     // Nothing to do if the Scalar is null :
00587     if (uu.get_etat() == ETATZERO) {
00588     return ; 
00589     }
00590 
00591     assert((uu.get_etat() == ETATQCQ)||(uu.get_etat() == ETATUN)) ;
00592     
00593     uu.set_etat_qcq() ;
00594 
00595     //Confort :
00596     const Valeur& vu = uu.get_spectral_va() ; 
00597     assert(vu.get_mg() == mg) ; 
00598     
00599     int nz = mg->get_nzone() ;
00600     int nzm1 = nz-1 ;
00601 
00602     if (mg->get_type_r(nzm1) == UNSURR) {   // Case with ZEC
00603                         // -------------
00604         // On stocke tout sauf la ZEC
00605 
00606     Valeur val = vu ;
00607     val.annule(nzm1) ;
00608    
00609     // On ne travaile que sur la ZEC :
00610 
00611     Valeur val_ext = vu ;
00612     val_ext.annule(0, nzm1-1) ; 
00613     
00614     val_ext.mult_xm1_zec() ; // division par (x-1) dans l'espace des coefs.
00615 
00616     Base_val sauve_base = val_ext.base ; 
00617     val_ext = val_ext / xsr ;
00618     val_ext.base = sauve_base ; 
00619     
00620     // Et on reconstruit le resultat ...
00621     uu.set_spectral_va() = val + val_ext ; 
00622         
00623     }
00624     else{   // Case without ZEC
00625         //-----------------
00626 
00627     return ; 
00628 
00629     }
00630     
00631     
00632 }
00633 
00634 
00635             //---------------------------//
00636             //    dec_dzpuis         //
00637             //---------------------------//
00638             
00639 void Map_radial::dec_dzpuis(Scalar& ci) const {
00640 
00641     // Verifications d'usage :
00642     assert(ci.get_etat() != ETATNONDEF) ;
00643     
00644     int nz = mg->get_nzone() ;
00645     int nzm1 = nz-1 ;
00646 
00647     // Nothing to do if the Scalar is null or if there is no ZEC:
00648     if (ci.get_etat() == ETATZERO) {
00649       ci.set_dzpuis( ci.get_dzpuis() - 1 ) ; 
00650       return ; 
00651     }
00652 
00653     if (mg->get_type_r(nzm1) != UNSURR)
00654     return ;
00655 
00656     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00657     
00658     ci.set_etat_qcq() ;
00659 
00660     Valeur& uu = ci.set_spectral_va() ; 
00661     assert(uu.get_mg() == mg) ; 
00662     
00663     
00664     // Decomposition inner domains / external domain : 
00665     // ----------------------------------------------
00666     Valeur uu_ext = uu ; 
00667     uu_ext.annule(0, nzm1-1) ; 
00668 
00669     uu.annule(nzm1) ; 
00670     
00671     // Computation in the external domain (division by r)
00672     // ----------------------------------
00673     
00674     uu_ext.mult_xm1_zec() ;    // Multiplication by (xi-1) in the ZEC
00675 
00676     Base_val sauve_base = uu_ext.base ; 
00677     uu_ext = uu_ext / xsr ;     // u^2/(xi-1) in the ZEC
00678     uu_ext.base = sauve_base ; 
00679 
00680     // Final result:
00681     // ------------
00682     uu = uu + uu_ext ; 
00683  
00684     ci.set_dzpuis( ci.get_dzpuis() - 1 ) ; 
00685     
00686 }
00687 
00688             //---------------------------//
00689             //    inc_dzpuis         //
00690             //---------------------------//
00691             
00692 void Map_radial::inc_dzpuis(Scalar& ci) const {
00693 
00694     // Verifications d'usage :
00695     assert(ci.get_etat() != ETATNONDEF) ;
00696     
00697     int nz = mg->get_nzone() ;
00698     int nzm1 = nz-1 ;
00699 
00700     // Nothing to do if the Scalar is null or if there is no ZEC:
00701     if (ci.get_etat() == ETATZERO)  {
00702       ci.set_dzpuis( ci.get_dzpuis() + 1 ) ; 
00703       return ; 
00704     }
00705     if (mg->get_type_r(nzm1) != UNSURR) return ;
00706 
00707     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00708     
00709     ci.set_etat_qcq() ;
00710 
00711     Valeur& uu = ci.set_spectral_va() ; 
00712     assert(uu.get_mg() == mg) ; 
00713     
00714     
00715     // Decomposition inner domains / external domain : 
00716     // ----------------------------------------------
00717     Valeur uu_ext = uu ; 
00718     uu_ext.annule(0, nzm1-1) ;
00719      
00720     uu.annule(nzm1) ; 
00721     
00722     // Computation in the external domain (multiplication by r)
00723     // ----------------------------------
00724     
00725     uu_ext.sxm1_zec() ;    // Division by (xi-1) in the ZEC
00726 
00727     Base_val sauve_base = uu_ext.base ; 
00728     uu_ext = uu_ext * xsr ;     // (xi-1)/u in the ZEC
00729     uu_ext.base = sauve_base ; 
00730 
00731     // Final result:
00732     // ------------
00733     uu = uu + uu_ext ; 
00734  
00735     ci.set_dzpuis( ci.get_dzpuis() + 1 ) ; 
00736 
00737 }
00738 
00739 
00740             //---------------------------//
00741             //    dec2_dzpuis        //
00742             //---------------------------//
00743             
00744 void Map_radial::dec2_dzpuis(Scalar& ci) const {
00745 
00746     // Verifications d'usage :
00747     assert(ci.get_etat() != ETATNONDEF) ;
00748     
00749     int nz = mg->get_nzone() ;
00750     int nzm1 = nz-1 ;
00751 
00752     // Nothing to do if the Scalar is null or if there is no ZEC:
00753     if (ci.get_etat() == ETATZERO) {
00754       ci.set_dzpuis( ci.get_dzpuis() - 2 ) ; 
00755       return ; 
00756     }
00757     if  (mg->get_type_r(nzm1) != UNSURR) return ;
00758 
00759     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00760     
00761     ci.set_etat_qcq() ;
00762 
00763     Valeur& uu = ci.set_spectral_va() ; 
00764     assert(uu.get_mg() == mg) ; 
00765     
00766     
00767     // Decomposition inner domains / external domain : 
00768     // ----------------------------------------------
00769     Valeur uu_ext = uu ; 
00770     uu_ext.annule(0, nzm1-1) ; 
00771 
00772     uu.annule(nzm1) ; 
00773     
00774     // Computation in the external domain (division by r^2)
00775     // ----------------------------------
00776     
00777     uu_ext.mult2_xm1_zec() ;    // Multiplication by (xi-1)^2 in the ZEC
00778 
00779     Base_val sauve_base = uu_ext.base ; 
00780     uu_ext = uu_ext / (xsr*xsr) ;       // u^2/(xi-1)^2 in the ZEC
00781     uu_ext.base = sauve_base ; 
00782 
00783     // Final result:
00784     // ------------
00785     uu = uu + uu_ext ; 
00786  
00787     ci.set_dzpuis( ci.get_dzpuis() - 2 ) ; 
00788     
00789 }
00790 
00791             //---------------------------//
00792             //    inc2_dzpuis        //
00793             //---------------------------//
00794             
00795 void Map_radial::inc2_dzpuis(Scalar& ci) const {
00796 
00797     // Verifications d'usage :
00798     assert(ci.get_etat() != ETATNONDEF) ;
00799     
00800     int nz = mg->get_nzone() ;
00801     int nzm1 = nz-1 ;
00802 
00803     // Nothing to do if the Scalar is null or if there is no ZEC:
00804     if (ci.get_etat() == ETATZERO) {
00805       ci.set_dzpuis( ci.get_dzpuis() + 2 ) ; 
00806       return ; 
00807     }
00808     if  (mg->get_type_r(nzm1) != UNSURR) return ;
00809 
00810     assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
00811     
00812     ci.set_etat_qcq() ;
00813 
00814     Valeur& uu = ci.set_spectral_va() ; 
00815     assert(uu.get_mg() == mg) ; 
00816     
00817     
00818     // Decomposition inner domains / external domain : 
00819     // ----------------------------------------------
00820     Valeur uu_ext = uu ; 
00821     uu_ext.annule(0, nzm1-1) ;
00822      
00823     uu.annule(nzm1) ; 
00824     
00825     // Computation in the external domain (multiplication by r^2)
00826     // ----------------------------------
00827     
00828     uu_ext.sxm1_zec() ;    // Division by (xi-1) in the ZEC
00829     uu_ext.sxm1_zec() ;    // Division by (xi-1) in the ZEC
00830 
00831     Base_val sauve_base = uu_ext.base ; 
00832     uu_ext = uu_ext * (xsr*xsr) ;       // (xi-1)^2/u^2 in the ZEC
00833     uu_ext.base = sauve_base ; 
00834 
00835     // Final result:
00836     // ------------
00837     uu = uu + uu_ext ; 
00838  
00839     ci.set_dzpuis( ci.get_dzpuis() + 2 ) ; 
00840 
00841 }
00842 

Generated on Tue Feb 7 01:35:18 2012 for LORENE by  doxygen 1.4.6