connection_fspher.C

00001 /*
00002  *  Methods of class Connection_fspher.
00003  *
00004  *  (see file connection.h for documentation)
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2003-2004 Eric Gourgoulhon & 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 version 2
00015  *   as published by the Free Software Foundation.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 char connection_fspher_C[] = "$Header: /cvsroot/Lorene/C++/Source/Connection/connection_fspher.C,v 1.22 2005/05/25 16:11:03 j_novak Exp $" ;
00029 
00030 /*
00031  * $Id: connection_fspher.C,v 1.22 2005/05/25 16:11:03 j_novak Exp $
00032  * $Log: connection_fspher.C,v $
00033  * Revision 1.22  2005/05/25 16:11:03  j_novak
00034  * Better handling of the case with no compactified domain.
00035  *
00036  * Revision 1.21  2004/01/29 15:21:21  e_gourgoulhon
00037  * Method p_divergence: changed treatment of dzpuis.
00038  * Methods p_derive_cov and p_divergence: add warning if all the input component
00039  *  do not have the same dzpuis.
00040  *
00041  * Revision 1.20  2004/01/28 13:25:40  j_novak
00042  * The ced_mult_r arguments have been suppressed from the Scalar::*dsd* methods.
00043  * In the div/mult _r_dzpuis, there is no more default value.
00044  *
00045  * Revision 1.19  2004/01/27 15:10:02  j_novak
00046  * New methods Scalar::div_r_dzpuis(int) and Scalar_mult_r_dzpuis(int)
00047  * which replace div_r_inc*. Tried to clean the dzpuis handling.
00048  * WARNING: no testing at this point!!
00049  *
00050  * Revision 1.18  2004/01/23 07:57:06  e_gourgoulhon
00051  * Slight change in some comment.
00052  *
00053  * Revision 1.17  2004/01/22 16:14:22  e_gourgoulhon
00054  * Method p_derive_cov: reorganization of the dzpuis treatment.
00055  * Added the case of input dzpuis = 2.
00056  *
00057  * Revision 1.16  2004/01/04 21:00:50  e_gourgoulhon
00058  * Better handling of tensor symmetries in methods p_derive_cov() and
00059  * p_divergence() (thanks to the new class Tensor_sym).
00060  *
00061  * Revision 1.15  2004/01/01 11:24:04  e_gourgoulhon
00062  * Full reorganization of method p_derive_cov: the main loop is now
00063  * on the indices of the *output* tensor (to take into account
00064  * symmetries in the input and output tensors).
00065  *
00066  * Revision 1.14  2003/12/27 14:59:52  e_gourgoulhon
00067  * -- Method derive_cov() suppressed.
00068  * -- Change of the position of the derivation index from the first one
00069  *    to the last one in methods p_derive_cov() and p_divergence().
00070  *
00071  * Revision 1.13  2003/11/03 13:37:58  j_novak
00072  * Still dzpuis...
00073  *
00074  * Revision 1.12  2003/11/03 11:14:18  j_novak
00075  * Treatment of the case dzpuis = 4.
00076  *
00077  * Revision 1.11  2003/11/03 10:58:30  j_novak
00078  * Treatment of the general case for divergence.
00079  *
00080  * Revision 1.10  2003/10/22 13:08:03  j_novak
00081  * Better handling of dzpuis flags
00082  *
00083  * Revision 1.9  2003/10/16 15:26:48  e_gourgoulhon
00084  * Name of method Scalar::div_r_ced() changed to Scalar::div_r_inc2().
00085  *
00086  * Revision 1.8  2003/10/16 14:21:36  j_novak
00087  * The calculation of the divergence of a Tensor is now possible.
00088  *
00089  * Revision 1.7  2003/10/15 10:46:18  e_gourgoulhon
00090  * Introduced call to the new method Scalar::div_tant to perform
00091  * division by tan(theta) in derive_cov.
00092  *
00093  * Revision 1.6  2003/10/11 16:45:43  e_gourgoulhon
00094  * Suppressed the call to Itbl::set_etat_qcq() after
00095  * the construction of the Itbl's.
00096  *
00097  * Revision 1.5  2003/10/11 14:39:50  e_gourgoulhon
00098  * Suppressed declaration of unusued arguments in some methods.
00099  *
00100  * Revision 1.4  2003/10/06 13:58:47  j_novak
00101  * The memory management has been improved.
00102  * Implementation of the covariant derivative with respect to the exact Tensor
00103  * type.
00104  *
00105  * Revision 1.3  2003/10/05 21:09:23  e_gourgoulhon
00106  * Method derive_cov: multiplication by r^2 in the CED.
00107  *
00108  * Revision 1.2  2003/10/01 21:49:45  e_gourgoulhon
00109  * First version of derive_cov --- not tested yet.
00110  *
00111  * Revision 1.1  2003/10/01 15:42:49  e_gourgoulhon
00112  * still ongoing...
00113  *
00114  *
00115  *
00116  * $Header: /cvsroot/Lorene/C++/Source/Connection/connection_fspher.C,v 1.22 2005/05/25 16:11:03 j_novak Exp $
00117  *
00118  */
00119 
00120 // C++ headers
00121 #include "headcpp.h"
00122 
00123 // C headers
00124 #include <stdlib.h>
00125 
00126 // Lorene headers
00127 #include "connection.h"
00128 
00129         //------------------------------//
00130         //          Constructors        //
00131         //------------------------------//
00132 
00133 // Contructor from a spherical flat-metric-orthonormal basis
00134 
00135 Connection_fspher::Connection_fspher(const Map& mpi, const Base_vect_spher& bi) 
00136   : Connection_flat(mpi, bi) {
00137 
00138 }       
00139 
00140 // Copy constructor
00141 Connection_fspher::Connection_fspher(const Connection_fspher& ci) 
00142   : Connection_flat(ci) {
00143 
00144 }       
00145 
00146     
00147         //----------------------------//
00148         //          Destructor        //
00149         //----------------------------//
00150 
00151 Connection_fspher::~Connection_fspher(){
00152     
00153 }
00154 
00155 
00156         //--------------------------------//
00157         //      Mutators / assignment     //
00158         //--------------------------------//
00159 
00160 
00161 void Connection_fspher::operator=(const Connection_fspher& ) {
00162     
00163   cout << "Connection_fspher::operator= : not implemented yet !" << endl ; 
00164   abort() ; 
00165 
00166 }   
00167 
00168 
00169         //-----------------------------//
00170         //    Computational methods    //
00171         //-----------------------------//
00172 
00173 // Covariant derivative, returning a pointer.
00174 //-------------------------------------------
00175 
00176 Tensor* Connection_fspher::p_derive_cov(const Tensor& uu) const {
00177 
00178     // Notations: suffix 0 in name <=> input tensor
00179     //            suffix 1 in name <=> output tensor
00180 
00181     int valence0 = uu.get_valence() ; 
00182     int valence1 = valence0 + 1 ; 
00183     int valence1m1 = valence1 - 1 ; // same as valence0, but introduced for 
00184                                     // the sake of clarity
00185     int ncomp0 = uu.get_n_comp() ;
00186     
00187     // Protections
00188     // -----------
00189     if (valence0 >= 1) {
00190         assert(uu.get_triad() == triad) ; 
00191     }
00192 
00193     // Creation of the result (pointer)
00194     // --------------------------------
00195     Tensor* resu ;
00196 
00197     // If uu is a Scalar, the result is a vector
00198     if (valence0 == 0) 
00199         resu = new Vector(*mp, COV, triad) ;
00200     else {
00201 
00202         // Type of indices of the result :
00203         Itbl tipe(valence1) ; 
00204         const Itbl& tipeuu = uu.get_index_type() ;  
00205         for (int id = 0; id<valence0; id++) {
00206             tipe.set(id) = tipeuu(id) ;   // First indices = same as uu
00207         }
00208         tipe.set(valence1m1) = COV ;  // last index is the derivation index
00209 
00210         // if uu is a Tensor_sym, the result is also a Tensor_sym:
00211         const Tensor* puu = &uu ; 
00212         const Tensor_sym* puus = dynamic_cast<const Tensor_sym*>(puu) ; 
00213         if ( puus != 0x0 ) {    // the input tensor is symmetric
00214             resu = new Tensor_sym(*mp, valence1, tipe, *triad,
00215                                   puus->sym_index1(), puus->sym_index2()) ;
00216         }
00217         else {  
00218             resu = new Tensor(*mp, valence1, tipe, *triad) ;  // no symmetry  
00219         }
00220 
00221     }
00222 
00223     int ncomp1 = resu->get_n_comp() ; 
00224     
00225     Itbl ind1(valence1) ; // working Itbl to store the indices of resu
00226     Itbl ind0(valence0) ; // working Itbl to store the indices of uu
00227     Itbl ind(valence0) ;  // working Itbl to store the indices of uu
00228     
00229     Scalar tmp(*mp) ;   // working scalar
00230 
00231     // Determination of the dzpuis parameter of the result  --> dz_resu
00232     // ---------------------------------------------------
00233     int dz_in = 0 ;
00234     for (int ic=0; ic<ncomp0; ic++) {
00235         int dzp = uu(uu.indices(ic)).get_dzpuis() ; 
00236         assert(dzp >= 0) ; 
00237         if (dzp > dz_in) dz_in = dzp ; 
00238     }
00239         
00240 #ifndef NDEBUG
00241     // Check : do all components have the same dzpuis ?
00242     for (int ic=0; ic<ncomp0; ic++) {
00243         if ( !(uu(uu.indices(ic)).check_dzpuis(dz_in)) ) {
00244             cout << "######## WARNING #######\n" ; 
00245             cout << "  Connection_fspher::p_derive_cov : the tensor components \n"
00246             << "    do not have all the same dzpuis ! : \n" 
00247             << "    ic, dzpuis(ic), dz_in : " << ic << "  " 
00248             <<  uu(uu.indices(ic)).get_dzpuis() << "  " << dz_in << endl ; 
00249         } 
00250     }
00251 #endif
00252         
00253     int dz_resu = (dz_in == 0) ? 2 : dz_in + 1 ;
00254     int nzm1 = mp->get_mg()->get_nzone() - 1 ;
00255     if (mp->get_mg()->get_type_r(nzm1) != UNSURR) dz_resu = 0 ; 
00256 
00257     // Loop on all the components of the output tensor
00258     // -----------------------------------------------
00259     for (int ic=0; ic<ncomp1; ic++) {
00260     
00261         // indices corresponding to the component no. ic in the output tensor
00262         ind1 = resu->indices(ic) ; 
00263     
00264         // Component no. ic:
00265         Scalar& cresu = resu->set(ind1) ; 
00266         
00267         // Indices of the input tensor
00268         for (int id = 0; id < valence0; id++) {
00269             ind0.set(id) = ind1(id) ; 
00270         }
00271          
00272         // Value of last index (derivation index)
00273         int k = ind1(valence1m1) ; 
00274         
00275         switch (k) {
00276         
00277         case 1 : {  // Derivation index = r
00278                     //---------------------
00279     
00280             cresu = (uu(ind0)).dsdr() ;     // d/dr
00281         
00282             // all the connection coefficients Gamma^i_{jk} are zero for k=1
00283             break ; 
00284         }
00285 
00286         case 2 : {  // Derivation index = theta
00287                     //-------------------------
00288             
00289             cresu = (uu(ind0)).srdsdt() ;  // 1/r d/dtheta 
00290         
00291             // Loop on all the indices of uu
00292             for (int id=0; id<valence0; id++) {
00293         
00294                 switch ( ind0(id) ) {
00295                 
00296                 case 1 : {  // Gamma^r_{l theta} V^l 
00297                             // or -Gamma^l_{r theta} V_l 
00298                 ind = ind0 ; 
00299                 ind.set(id) = 2 ;   // l = theta
00300 
00301                 // Division by r :
00302                 tmp = uu(ind) ; 
00303             tmp.div_r_dzpuis(dz_resu) ;
00304 
00305                 cresu -= tmp ; 
00306                 break ; 
00307                 }
00308                 
00309                 case 2 : {  // Gamma^theta_{l theta} V^l 
00310                             // or -Gamma^l_{theta theta} V_l
00311                 ind = ind0 ; 
00312                 ind.set(id) = 1 ;   // l = r
00313                 tmp = uu(ind) ; 
00314             tmp.div_r_dzpuis(dz_resu) ;
00315 
00316                 cresu += tmp ; 
00317                 break ; 
00318                 }
00319                 
00320                 case 3 : {  // Gamma^phi_{l theta} V^l 
00321                             // or -Gamma^l_{phi theta} V_l
00322             break ; 
00323                 }
00324                 
00325                 default : {
00326                 cerr << "Connection_fspher::p_derive_cov : index problem ! "
00327                << endl ; 
00328                 abort() ;  
00329                 }
00330                 }
00331 
00332             }
00333             break ; 
00334         }
00335 
00336 
00337         case 3 : {  // Derivation index = phi
00338                     //-----------------------
00339                     
00340             cresu = (uu(ind0)).srstdsdp() ;  // 1/(r sin(theta)) d/dphi     
00341         
00342             // Loop on all the indices of uu
00343             for (int id=0; id<valence0; id++) {
00344         
00345                 switch ( ind0(id) ) {
00346                 
00347                 case 1 : {  // Gamma^r_{l phi} V^l 
00348                             // or -Gamma^l_{r phi} V_l 
00349                 ind = ind0 ; 
00350                 ind.set(id) = 3 ;   // l = phi
00351                 tmp = uu(ind) ; 
00352             tmp.div_r_dzpuis(dz_resu) ;
00353 
00354                 cresu -= tmp ; 
00355                 break ; 
00356                 }
00357                 
00358                 case 2 : {  // Gamma^theta_{l phi} V^l 
00359                             // or -Gamma^l_{theta phi} V_l
00360                 ind = ind0 ; 
00361                 ind.set(id) = 3 ;   // l = phi
00362                 tmp = uu(ind) ; 
00363             tmp.div_r_dzpuis(dz_resu) ;
00364 
00365                 tmp.div_tant() ;    // division by tan(theta)
00366                     
00367                 cresu -= tmp ; 
00368                 break ; 
00369                 }
00370                 
00371                 case 3 : {  // Gamma^phi_{l phi} V^l 
00372                             // or -Gamma^l_{phi phi} V_l
00373                         
00374                 ind = ind0 ; 
00375                 ind.set(id) = 1 ;   // l = r
00376                 tmp = uu(ind) ; 
00377             tmp.div_r_dzpuis(dz_resu) ;
00378 
00379                 cresu += tmp ; 
00380 
00381                 ind.set(id) = 2 ;   // l = theta
00382                 tmp = uu(ind) ; 
00383             tmp.div_r_dzpuis(dz_resu) ;
00384 
00385                 tmp.div_tant() ;    // division by tan(theta)
00386 
00387                 cresu += tmp ; 
00388                 break ; 
00389                 }
00390                 
00391                 default : {
00392                 cerr << "Connection_fspher::p_derive_cov : index problem ! "
00393                 << endl ; 
00394                 abort() ;  
00395                 }
00396                 }
00397 
00398             }
00399             
00400             break ; 
00401         }
00402 
00403         default : {
00404         cerr << "Connection_fspher::p_derive_cov : index problem ! \n" ;
00405         abort() ;  
00406         }
00407 
00408         } // End of switch on the derivation index
00409 
00410 
00411     } // End of loop on all the components of the output tensor
00412 
00413     // C'est fini !
00414     // -----------
00415     return resu ; 
00416 
00417 }
00418 
00419 
00420 
00421 // Divergence, returning a pointer.
00422 //---------------------------------
00423 
00424 Tensor* Connection_fspher::p_divergence(const Tensor& uu) const {
00425 
00426     // Notations: suffix 0 in name <=> input tensor
00427     //            suffix 1 in name <=> output tensor
00428 
00429     int valence0 = uu.get_valence() ; 
00430     int valence1 = valence0 - 1 ; 
00431     int valence0m1 = valence0 - 1 ; // same as valence1 but introduced for 
00432                                     // the sake of clarity
00433     int ncomp0 = uu.get_n_comp() ;
00434 
00435     // Protections
00436     // -----------
00437     assert (valence0 >= 1) ;
00438     assert (uu.get_triad() == triad) ; 
00439 
00440     // Last index must be contravariant:
00441     assert (uu.get_index_type(valence0-1) == CON) ;
00442 
00443 
00444     // Creation of the pointer on the result tensor
00445     // --------------------------------------------
00446     Tensor* resu ;
00447 
00448     if (valence0 == 1)      // if u is a Vector, the result is a Scalar
00449         resu = new Scalar(*mp) ;
00450     else {
00451     
00452         // Type of indices of the result :
00453         Itbl tipe(valence1) ; 
00454         const Itbl& tipeuu = uu.get_index_type() ;  
00455         for (int id = 0; id<valence1; id++) {
00456             tipe.set(id) = tipeuu(id) ;     // type of remaining indices = 
00457         }                                   //  same as uu indices
00458 
00459         if (valence0 == 2) {  // if u is a rank 2 tensor, the result is a Vector
00460             resu = new Vector(*mp, tipe(0), *triad) ;
00461         }
00462         else {
00463             // if uu is a Tensor_sym, the result might be also a Tensor_sym:
00464             const Tensor* puu = &uu ; 
00465             const Tensor_sym* puus = dynamic_cast<const Tensor_sym*>(puu) ; 
00466             if ( puus != 0x0 ) {    // the input tensor is symmetric
00467 
00468                 if (puus->sym_index2() != valence0 - 1) {
00469                  
00470                     // the symmetry is preserved: 
00471 
00472                     if (valence1 == 2) {
00473                         resu = new Sym_tensor(*mp, tipe, *triad) ;
00474                     }
00475                     else {
00476                         resu = new Tensor_sym(*mp, valence1, tipe, *triad,
00477                                   puus->sym_index1(), puus->sym_index2()) ;
00478                     }
00479                 }
00480                 else { // the symmetry is lost: 
00481                 
00482                 resu = new Tensor(*mp, valence1, tipe, *triad) ;
00483                 }
00484             }
00485             else { // no symmetry in the input tensor:
00486             resu = new Tensor(*mp, valence1, tipe, *triad) ;
00487             }
00488         }
00489  
00490     }
00491 
00492     int ncomp1 = resu->get_n_comp() ;
00493     
00494     Itbl ind0(valence0) ; // working Itbl to store the indices of uu
00495     Itbl ind1(valence1) ; // working Itbl to store the indices of resu
00496     Itbl ind(valence0) ;  // working Itbl to store the indices of uu
00497     
00498     Scalar tmp1(*mp) ;  // working scalar
00499     Scalar tmp2(*mp) ;  // working scalar
00500 
00501     // Determination of the dzpuis parameter of the result  --> dz_resu
00502     // ---------------------------------------------------
00503     int dz_in = 0 ;
00504     for (int ic=0; ic<ncomp0; ic++) {
00505         int dzp = uu(uu.indices(ic)).get_dzpuis() ; 
00506         assert(dzp >= 0) ; 
00507         if (dzp > dz_in) dz_in = dzp ; 
00508     }
00509         
00510 #ifndef NDEBUG
00511     // Check : do all components have the same dzpuis ?
00512     for (int ic=0; ic<ncomp0; ic++) {
00513         if ( !(uu(uu.indices(ic)).check_dzpuis(dz_in)) ) {
00514             cout << "######## WARNING #######\n" ; 
00515             cout << "  Connection_fspher::p_divergence : the tensor components \n"
00516             << "    do not have all the same dzpuis ! : \n" 
00517             << "    ic, dzpuis(ic), dz_in : " << ic << "  " 
00518             <<  uu(uu.indices(ic)).get_dzpuis() << "  " << dz_in << endl ; 
00519         } 
00520     }
00521 #endif
00522         
00523     int dz_resu = (dz_in == 0) ? 2 : dz_in + 1 ;
00524 
00525     // Loop on all the components of the output tensor
00526     for (int ic=0; ic<ncomp1; ic++) {
00527     
00528         ind1 = resu->indices(ic) ; 
00529         Scalar& cresu = resu->set(ind1) ;
00530 
00531         // Derivation index = r
00532         // --------------------
00533         int k = 1 ;     
00534 
00535         // indices (ind1,k) in the input tensor
00536         for (int id = 0; id < valence1; id++) {
00537         ind0.set(id) = ind1(id) ; 
00538         }
00539         ind0.set(valence0m1) = k ; 
00540 
00541         cresu = uu(ind0).dsdr() ; //dT^{l r}/dr
00542 
00543         // Derivation index = theta
00544         // ------------------------
00545         k = 2 ;     
00546 
00547         // indices (ind1,k) in the input tensor
00548         for (int id = 0; id < valence1; id++) {
00549         ind0.set(id) = ind1(id) ; 
00550         }
00551         ind0.set(valence0m1) = k ; 
00552         
00553         tmp1 = uu(ind0).dsdt() ; //dT^{l theta} /dtheta
00554 
00555         ind = ind0 ;
00556         ind.set(valence0m1) = 1 ;
00557         tmp1 += uu(ind) ;//Gamma^theta_{r theta}T^{l r} (div_r is done later)
00558     
00559 
00560         // Loop on all the (valence0-1) first indices of uu
00561         for (int id=0; id<valence0m1; id++) {
00562         
00563             switch ( ind0(id) ) {
00564             case 1 : {  // Gamma^r_{l theta} V^l 
00565                     // or -Gamma^l_{r theta} V_l 
00566             ind = ind0 ; 
00567             ind.set(id) = 2 ;   // l = theta
00568             tmp1 -= uu(ind) ; 
00569             break ; 
00570             }
00571                 
00572             case 2 : {  // Gamma^theta_{l theta} V^l 
00573                     // or -Gamma^l_{theta theta} V_l
00574             ind = ind0 ; 
00575             ind.set(id) = 1 ;   // l = r
00576             tmp1 += uu(ind) ; 
00577             break ; 
00578             }
00579                 
00580             case 3 : {  // Gamma^phi_{l theta} V^l 
00581                     // or -Gamma^l_{phi theta} V_l
00582             break ; 
00583             }
00584                 
00585             default : {
00586             cout << "Connection_fspher::p_divergence : index problem ! "
00587                 << endl ; 
00588             abort() ;  
00589             }
00590             }
00591             
00592         }
00593 
00594         // Derivation index = phi
00595         // ----------------------
00596         k = 3 ;             
00597 
00598         // indices (ind1,k) in the input tensor
00599         for (int id = 0; id < valence1; id++) {
00600             ind0.set(id) = ind1(id) ; 
00601         }
00602         ind0.set(valence0m1) = k ; 
00603     
00604         tmp1 += uu(ind0).stdsdp() ; // 1/sin(theta) dT^phi / dphi
00605     
00606         ind = ind0 ;
00607         ind.set(valence0m1) = 1 ;
00608         tmp1 += uu(ind) ;//Gamma^phi_{r phi} T^{l r} (div_r is done later)
00609         ind.set(valence0m1) = 2 ;
00610         tmp2 = uu(ind) ;//Gamma^phi_{theta phi} T^{l theta} (div_r is done later)
00611 
00612         // Loop on all the (valence0-1) first indices of uu
00613         for (int id=0; id<valence0-1; id++) {
00614       
00615             switch ( ind0(id) ) {
00616             case 1 : {  // Gamma^r_{l phi} V^l 
00617                     // or -Gamma^l_{r phi} V_l 
00618             ind = ind0 ; 
00619             ind.set(id) = 3 ;   // l = phi
00620             tmp1 -= uu(ind) ; 
00621             break ; 
00622             }
00623                 
00624             case 2 : {  // Gamma^theta_{l phi} V^l 
00625                     // or -Gamma^l_{theta phi} V_l
00626             ind = ind0 ; 
00627             ind.set(id) = 3 ;   // l = phi
00628             tmp2 -= uu(ind) ; 
00629             break ; 
00630             }
00631                 
00632             case 3 : {  // Gamma^phi_{l phi} V^l 
00633                     // or -Gamma^l_{phi phi} V_l
00634             ind = ind0 ; 
00635 
00636             ind.set(id) = 1 ;   // l = r
00637             tmp1 += uu(ind) ; 
00638 
00639             ind.set(id) = 2 ;   // l = theta
00640             tmp2 += uu(ind) ; 
00641             break ; 
00642             }
00643                 
00644             default : {
00645             cout << "Connection_fspher::p_divergence : index problem ! "
00646                 << endl ; 
00647             abort() ;  
00648             }
00649             }
00650         }
00651         // There remains a division by tan(theta) and r:
00652         //----------------------------------------------
00653         tmp2.div_tant() ;
00654         tmp1 += tmp2 ;
00655         tmp1.div_r_dzpuis(dz_resu) ;
00656 
00657         cresu += tmp1 ; // the d/dr term...
00658 
00659     }
00660 
00661     // C'est fini !
00662     // -----------
00663     return resu ; 
00664 
00665 }
00666 
00667 
00668 
00669 
00670 
00671 
00672 

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