grille3d.C

00001 /*
00002  *  Methods of class Grille3d and derived classes
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 1999-2000 Jean-Alain Marck
00008  *   Copyright (c) 1999-2001 Eric Gourgoulhon
00009  *
00010  *   This file is part of LORENE.
00011  *
00012  *   LORENE is free software; you can redistribute it and/or modify
00013  *   it under the terms of the GNU General Public License as published by
00014  *   the Free Software Foundation; either version 2 of the License, or
00015  *   (at your option) any later version.
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 
00029 char grille3d_C[] = "$Header: /cvsroot/Lorene/C++/Source/Grille3d/grille3d.C,v 1.6 2008/08/27 08:47:38 jl_cornou Exp $" ;
00030 
00031 /*
00032  * $Id: grille3d.C,v 1.6 2008/08/27 08:47:38 jl_cornou Exp $
00033  * $Log: grille3d.C,v $
00034  * Revision 1.6  2008/08/27 08:47:38  jl_cornou
00035  * Added R_JACO02 case
00036  *
00037  * Revision 1.5  2008/01/09 14:04:03  j_novak
00038  * Initialization of xx
00039  *
00040  * Revision 1.4  2008/01/08 13:53:29  j_novak
00041  * Special treatment of the case nt=1.
00042  *
00043  * Revision 1.3  2007/12/11 15:28:13  jl_cornou
00044  * Jacobi(0,2) polynomials partially implemented
00045  *
00046  * Revision 1.2  2002/10/16 14:36:36  j_novak
00047  * Reorganization of #include instructions of standard C++, in order to
00048  * use experimental version 3 of gcc.
00049  *
00050  * Revision 1.1.1.1  2001/11/20 15:19:28  e_gourgoulhon
00051  * LORENE
00052  *
00053  * Revision 2.10  2001/05/26  14:50:46  eric
00054  * *** empty log message ***
00055  *
00056  * Revision 2.9  2001/05/26  13:25:59  eric
00057  * Ajout du membre g_twice (grille double pour le desaliasing)
00058  * Modif de la declaration de g_angu (pointeur mutable)
00059  *   g_twice et g_angu ne sont calcules que si necessaire (cad si
00060  *   on appelle la fonction get_twice() ou get_angu()).
00061  *
00062  * Revision 2.8  2000/03/22  13:38:51  eric
00063  * Remplacement des iendl par endl dans <<
00064  *
00065  * Revision 2.7  1999/10/12  15:04:29  eric
00066  * *** empty log message ***
00067  *
00068  * Revision 2.6  1999/10/12  15:03:30  eric
00069  * *** empty log message ***
00070  *
00071  * Revision 2.5  1999/09/30  14:58:16  eric
00072  * Operator!= declare const
00073  *
00074  * Revision 2.4  1999/09/30  14:12:04  eric
00075  * sauve declaree const.
00076  *
00077  * Revision 2.3  1999/09/30  12:52:52  eric
00078  * Depoussierage.
00079  * Documentation.
00080  *
00081  * Revision 2.2  1999/03/01  14:35:21  eric
00082  * Modif affichage (operator<<)
00083  *
00084  *
00085  * $Header: /cvsroot/Lorene/C++/Source/Grille3d/grille3d.C,v 1.6 2008/08/27 08:47:38 jl_cornou Exp $
00086  *
00087  */
00088 
00089 
00090 // Fichiers include
00091 // ----------------
00092 #include <stdlib.h>
00093 #include <math.h>
00094 #include <assert.h>
00095 
00096 #include "grilles.h"
00097 #include "type_parite.h"
00098 #include "proto.h"
00099 
00100                 //-------------//
00101                 // Mono-grille //
00102                 //-------------//
00103 
00104             // Classe de base
00105 
00106 // Constructeur
00107 //-------------
00108 Grille3d::Grille3d(int nrs, int nts, int nps) 
00109     : nr(nrs), nt(nts), np(nps)
00110 {
00111     x = new double[nr] ; 
00112     tet = new double[nt] ;
00113     phi = new double[np] ;
00114 }
00115     
00116 // Destructeur
00117 //------------
00118 Grille3d::~Grille3d() {
00119     delete [] x ; 
00120     delete [] tet ; 
00121     delete [] phi ; 
00122 }
00123 
00124 
00125             // Cas rare + sans symetrie
00126 
00127 // Constructeur
00128 //-------------
00129 Grille3d_r::Grille3d_r(int nrs, int nts, int nps) 
00130     : Grille3d(nrs, nts, nps)
00131 {
00132 
00133     // Cette grille n'a pas de sens si np = 1
00134     assert(nps != 1) ;  // ??
00135 
00136       type_r = RARE ;       // echantillonnage radial rarefie en 0     
00137       type_t = NONSYM ;     // echantillonnage en theta sur [0, pi] 
00138       type_p = NONSYM ;     // echantillonnage en phi sur [0, 2 pi[
00139 
00140     // Partie radiale
00141     double xx = 0 ;
00142     if (nr>1) xx = M_PI/double(2*(nr-1)) ;
00143     for (int i=0 ; i<nr ; i++) {
00144     x[i] = sin(xx*i) ;
00145     }
00146     // Partie en theta
00147     if (nt > 1) 
00148     xx = M_PI/double(nt-1) ;
00149     else
00150     xx = 0. ;
00151     for (int i=0 ; i<nt ; i++) {
00152     tet[i] = xx*i ;
00153     }
00154     // Partie longitudinale
00155     xx = 2.*M_PI/double(np) ;
00156     for (int i=0 ; i<np ; i++) {
00157     phi[i] = xx*i ;
00158     }
00159 }
00160 
00161 // Destructeur 
00162 //-------------
00163 Grille3d_r::~Grille3d_r() { }   // ne fait rien (c'est le destructeur
00164                 // de la classe de base, Grille3d, qui 
00165                 // fait tout. 
00166 
00167 
00168 // cas fin + sans symetrie
00169 
00170 // Constructeur
00171 //-------------
00172 Grille3d_f::Grille3d_f(int nrs, int nts, int nps)
00173     : Grille3d(nrs, nts, nps)
00174 {
00175     // Cette grille n'a pas de sens si np = 1
00176     assert(nps != 1) ;  // ??
00177 
00178     double xx ;
00179 
00180     type_r = FIN ;  // echantillonnage radial fin sur [r_min,r_max]   
00181     type_t = NONSYM ;   // echantillonnage en theta sur [0, pi] 
00182     type_p = NONSYM ;   // echantillonnage en phi sur [0, 2 pi[
00183 
00184     // Partie radiale
00185     xx = 0 ;
00186     if (nr>1)  xx = M_PI/double(nr-1) ;
00187     for (int i=0 ; i<nr ; i++) {
00188     x[i] = -cos(xx*i) ;
00189     }
00190     // Partie en theta
00191     if (nt > 1) 
00192     xx = M_PI/double(nt-1) ;
00193     else
00194     xx = 0. ;
00195     for (int i=0 ; i<nt ; i++) {
00196     tet[i] = xx*i ;
00197     }
00198     // Partie longitudinale
00199     xx = 2.*M_PI/double(np) ;
00200     for (int i=0 ; i<np ; i++) {
00201     phi[i] = xx*i ;
00202     }
00203 }
00204 
00205 // Destructeur 
00206 //-------------
00207 Grille3d_f::~Grille3d_f() { }   // ne fait rien (c'est le destructeur
00208                 // de la classe de base, Grille3d, qui 
00209                 // fait tout. 
00210 
00211 // cas echantillonnage en 1/r + sans symetrie
00212 
00213 // Constructeur
00214 //-------------
00215 Grille3d_i::Grille3d_i(int nrs, int nts, int nps) 
00216     : Grille3d(nrs, nts, nps)
00217 {
00218     // Cette grille n'a pas de sens si np = 1
00219     assert(nps != 1) ;  // ??
00220 
00221     double xx ;
00222 
00223     type_r = UNSURR ;   // echantillonnage radial en u=1/r (fin sur [u_min,u_max]) 
00224     type_t = NONSYM ;   // echantillonnage en theta sur [0,pi] 
00225     type_p = NONSYM ;   // echantillonnage en phi sur [0,pi[
00226 
00227     // Partie radiale
00228     xx = 0 ;
00229     if (nr>1)  xx = M_PI/double(nr-1) ;
00230     for (int i=0 ; i<nr ; i++) {
00231     x[i] = -cos(xx*i) ;
00232     }
00233     // Partie en theta
00234     if (nt > 1) 
00235     xx = M_PI/double(nt-1) ;
00236     else
00237     xx = 0. ;
00238     for (int i=0 ; i<nt ; i++) {
00239     tet[i] = xx*i ;
00240     }
00241     // Partie longitudinale
00242     xx = 2.*M_PI/double(np) ;
00243     for (int i=0 ; i<np ; i++) {
00244     phi[i] = xx*i ;
00245     }
00246 }
00247 
00248 // Destructeur 
00249 //-------------
00250 Grille3d_i::~Grille3d_i() { }   // ne fait rien (c'est le destructeur
00251                 // de la classe de base, Grille3d, qui 
00252                 // fait tout. 
00253 
00254 // Cas rare + symetrie equatoriale 
00255 
00256 // Constructeur
00257 //-------------
00258 Grille3d_req::Grille3d_req(int nrs, int nts, int nps) 
00259     : Grille3d(nrs, nts, nps)
00260 {
00261 
00262     double xx ;
00263 
00264     type_r = RARE ; // echantillonnage radial rarefie en 0     
00265     type_t = SYM ;  // echantillonnage en theta sur [0, pi/2] 
00266     type_p = NONSYM ;   // echantillonnage en phi sur [0, 2 pi[
00267      
00268     // Partie radiale
00269     xx = 0 ;
00270     if (nr>1) xx = M_PI/double(2*(nr-1)) ;
00271     for (int i=0 ; i<nr ; i++) {
00272     x[i] = sin(xx*i) ;
00273     }
00274     // Partie en theta
00275     if (nt > 1) 
00276     xx = M_PI/double(2*(nt-1)) ;
00277     else
00278     xx = 0. ;
00279     for (int i=0 ; i<nt ; i++) {
00280     tet[i] = xx*i ;
00281     }
00282     // Partie longitudinale
00283     xx = 2.*M_PI/double(np) ;
00284     for (int i=0 ; i<np ; i++) {
00285     phi[i] = xx*i ;
00286     }
00287 }
00288 
00289 // Destructeur 
00290 //-------------
00291 Grille3d_req::~Grille3d_req() { }   // ne fait rien (c'est le destructeur
00292                     // de la classe de base, Grille3d, qui 
00293                     // fait tout. 
00294 
00295 
00296 // cas fin + symetrie equatoriale 
00297 
00298 // Constructeur
00299 //-------------
00300 Grille3d_feq::Grille3d_feq(int nrs, int nts, int nps) 
00301     : Grille3d(nrs, nts, nps)
00302 {
00303 
00304     double xx ;
00305 
00306     type_r = FIN ;  // echantillonnage radial fin sur [r_min,r_max]   
00307     type_t = SYM ;  // echantillonnage en theta sur [0, pi/2] 
00308     type_p = NONSYM ;   // echantillonnage en phi sur [0, 2 pi[
00309 
00310     // Partie radiale
00311     xx = 0 ;
00312     if (nr>1)  xx = M_PI/double(nr-1) ;
00313     for (int i=0 ; i<nr ; i++) {
00314     x[i] = -cos(xx*i) ;
00315     }
00316     // Partie en theta
00317     if (nt > 1) 
00318     xx = M_PI/double(2*(nt-1)) ;
00319     else
00320     xx = 0. ;
00321     for (int i=0 ; i<nt ; i++) {
00322     tet[i] = xx*i ;
00323     }
00324     // Partie longitudinale
00325     xx = 2.*M_PI/double(np) ;
00326     for (int i=0 ; i<np ; i++) {
00327     phi[i] = xx*i ;
00328     }
00329 }
00330 
00331 // Destructeur 
00332 //-------------
00333 Grille3d_feq::~Grille3d_feq() { }   // ne fait rien (c'est le destructeur
00334                     // de la classe de base, Grille3d, qui 
00335                     // fait tout. 
00336 
00337 // cas echantillonnage en 1/r + symetrie equatoriale 
00338 
00339 // Constructeur
00340 //-------------
00341 Grille3d_ieq::Grille3d_ieq(int nrs, int nts, int nps) 
00342     : Grille3d(nrs, nts, nps)
00343 {
00344 
00345     double xx ;
00346 
00347     type_r = UNSURR ;   // echantillonnage radial en u=1/r (fin sur [u_min,u_max]) 
00348     type_t = SYM ;  // echantillonnage en theta sur [0,pi/2] 
00349     type_p = NONSYM ;   // echantillonnage en phi sur [0,pi[
00350 
00351     // Partie radiale
00352     xx = 0 ;
00353     if (nr>1)  xx = M_PI/double(nr-1) ;
00354     for (int i=0 ; i<nr ; i++) {
00355     x[i] = -cos(xx*i) ;
00356     }
00357     // Partie en theta
00358     if (nt > 1) 
00359     xx = M_PI/double(2*(nt-1)) ;
00360     else
00361     xx = 0. ;
00362     for (int i=0 ; i<nt ; i++) {
00363     tet[i] = xx*i ;
00364     }
00365     // Partie longitudinale
00366     xx = 2.*M_PI/double(np) ;
00367     for (int i=0 ; i<np ; i++) {
00368     phi[i] = xx*i ;
00369     }
00370 }
00371 
00372 // Destructeur 
00373 //-------------
00374 Grille3d_ieq::~Grille3d_ieq() { }   // ne fait rien (c'est le destructeur
00375                     // de la classe de base, Grille3d, qui 
00376                     // fait tout. 
00377 
00378 // Cas rare + 2 phi
00379 
00380 // Constructeur
00381 //-------------
00382 Grille3d_r2p::Grille3d_r2p(int nrs, int nts, int nps) 
00383     : Grille3d(nrs, nts, nps)
00384 {
00385 
00386     double xx ;
00387 
00388     type_r = RARE ; // echantillonnage radial rarefie en 0     
00389     type_t = NONSYM ;   // echantillonnage en theta sur [0,pi] 
00390     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00391      
00392     // Partie radiale
00393     xx = 0 ;
00394     if (nr>1)     xx = M_PI/double(2*(nr-1)) ;
00395     for (int i=0 ; i<nr ; i++) {
00396     x[i] = sin(xx*i) ;
00397     }
00398     // Partie en theta
00399     if (nt > 1) 
00400     xx = M_PI/double(nt-1) ;
00401     else
00402     xx = 0. ;
00403     for (int i=0 ; i<nt ; i++) {
00404     tet[i] = xx*i ;
00405     }
00406     // Partie longitudinale
00407     xx = M_PI/double(np) ;
00408     for (int i=0 ; i<np ; i++) {
00409     phi[i] = xx*i ;
00410     }
00411 }
00412 
00413 // Destructeur 
00414 //-------------
00415 Grille3d_r2p::~Grille3d_r2p() { }   // ne fait rien (c'est le destructeur
00416                     // de la classe de base, Grille3d, qui 
00417                     // fait tout. 
00418 
00419 // cas fin + 2 phi
00420 
00421 // Constructeur
00422 //-------------
00423 Grille3d_f2p::Grille3d_f2p(int nrs, int nts, int nps) 
00424     : Grille3d(nrs, nts, nps)
00425 {
00426 
00427     double xx ;
00428 
00429     type_r = FIN ;  // echantillonnage radial fin sur [r_min,r_max]   
00430     type_t = NONSYM ;   // echantillonnage en theta sur [0,pi] 
00431     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00432 
00433     // Partie radiale
00434     xx = 0 ;
00435     if (nr>1)     xx = M_PI/double(nr-1) ;
00436     for (int i=0 ; i<nr ; i++) {
00437     x[i] = -cos(xx*i) ;
00438     }
00439     // Partie en theta
00440     if (nt > 1) 
00441     xx = M_PI/double(nt-1) ;
00442     else
00443     xx = 0. ;
00444     for (int i=0 ; i<nt ; i++) {
00445     tet[i] = xx*i ;
00446     }
00447     // Partie longitudinale
00448     xx = M_PI/double(np) ;
00449     for (int i=0 ; i<np ; i++) {
00450     phi[i] = xx*i ;
00451     }
00452 }
00453 
00454 // Destructeur 
00455 //-------------
00456 Grille3d_f2p::~Grille3d_f2p() { }   // ne fait rien (c'est le destructeur
00457                     // de la classe de base, Grille3d, qui 
00458                     // fait tout. 
00459 
00460 // cas echantillonnage en 1/r + 2 phi
00461 
00462 // Constructeur
00463 //-------------
00464 Grille3d_i2p::Grille3d_i2p(int nrs, int nts, int nps) 
00465     : Grille3d(nrs, nts, nps)
00466 {
00467 
00468     double xx ;
00469 
00470     type_r = UNSURR ;   // echantillonnage radial en u=1/r (fin sur [u_min,u_max]) 
00471     type_t = NONSYM ;   // echantillonnage en theta sur [0,pi] 
00472     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00473 
00474     // Partie radiale
00475     xx = 0 ;
00476     if (nr>1) xx = M_PI/double(nr-1) ;
00477     for (int i=0 ; i<nr ; i++) {
00478     x[i] = -cos(xx*i) ;
00479     }
00480     // Partie en theta
00481     if (nt > 1) 
00482     xx = M_PI/double(nt-1) ;
00483     else
00484     xx = 0. ;
00485     for (int i=0 ; i<nt ; i++) {
00486     tet[i] = xx*i ;
00487     }
00488     // Partie longitudinale
00489     xx = M_PI/double(np) ;
00490     for (int i=0 ; i<np ; i++) {
00491     phi[i] = xx*i ;
00492     }
00493 }
00494 
00495 // Destructeur 
00496 //-------------
00497 Grille3d_i2p::~Grille3d_i2p() { }   // ne fait rien (c'est le destructeur
00498                     // de la classe de base, Grille3d, qui 
00499                     // fait tout. 
00500 
00501 // Cas rare supersymmetrique
00502 
00503 // Constructeur
00504 //-------------
00505 Grille3d_rs::Grille3d_rs(int nrs, int nts, int nps) 
00506     : Grille3d(nrs, nts, nps)
00507 {
00508 
00509     double xx ;
00510 
00511     type_r = RARE ; // echantillonnage radial rarefie en 0     
00512     type_t = SYM ;  // echantillonnage en theta sur [0,pi/2] 
00513     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00514      
00515     // Partie radiale
00516     xx = 0 ;
00517     if (nr>1)     xx = M_PI/double(2*(nr-1)) ;
00518     for (int i=0 ; i<nr ; i++) {
00519     x[i] = sin(xx*i) ;
00520     }
00521     // Partie en theta
00522     if (nt > 1) 
00523     xx = M_PI/double(2*(nt-1)) ;
00524     else
00525     xx = 0. ;
00526     for (int i=0 ; i<nt ; i++) {
00527     tet[i] = xx*i ;
00528     }
00529     // Partie longitudinale
00530     xx = M_PI/double(np) ;
00531     for (int i=0 ; i<np ; i++) {
00532     phi[i] = xx*i ;
00533     }
00534 }
00535 
00536 // Destructeur 
00537 //-------------
00538 Grille3d_rs::~Grille3d_rs() { }     // ne fait rien (c'est le destructeur
00539                     // de la classe de base, Grille3d, qui 
00540                     // fait tout. 
00541 
00542 // cas fin supersymetrique
00543 
00544 // Constructeur
00545 //-------------
00546 Grille3d_fs::Grille3d_fs(int nrs, int nts, int nps) 
00547     : Grille3d(nrs, nts, nps)
00548 {
00549 
00550     double xx ;
00551 
00552     type_r = FIN ;  // echantillonnage radial fin sur [r_min,r_max]   
00553     type_t = SYM ;  // echantillonnage en theta sur [0,pi/2] 
00554     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00555 
00556     // Partie radiale
00557     xx = 0 ;
00558     if (nr>1)     xx = M_PI/double(nr-1) ;
00559     for (int i=0 ; i<nr ; i++) {
00560     x[i] = -cos(xx*i) ;
00561     }
00562     // Partie en theta
00563     if (nt > 1) 
00564     xx = M_PI/double(2*(nt-1)) ;
00565     else
00566     xx = 0. ;
00567     for (int i=0 ; i<nt ; i++) {
00568     tet[i] = xx*i ;
00569     }
00570     // Partie longitudinale
00571     xx = M_PI/double(np) ;
00572     for (int i=0 ; i<np ; i++) {
00573     phi[i] = xx*i ;
00574     }
00575 }
00576 
00577 // Destructeur 
00578 //-------------
00579 Grille3d_fs::~Grille3d_fs() { }     // ne fait rien (c'est le destructeur
00580                     // de la classe de base, Grille3d, qui 
00581                     // fait tout. 
00582 
00583 // cas echantillonnage en 1/r supersymetrique
00584 
00585 // Constructeur
00586 //-------------
00587 Grille3d_is::Grille3d_is(int nrs, int nts, int nps) 
00588     : Grille3d(nrs, nts, nps)
00589 {
00590 
00591     double xx ;
00592 
00593     type_r = UNSURR ;   // echantillonnage radial en u=1/r (fin sur [u_min,u_max]) 
00594     type_t = SYM ;  // echantillonnage en theta sur [0,pi/2] 
00595     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00596 
00597     // Partie radiale
00598     xx = 0 ;
00599     if (nr>1)     xx = M_PI/double(nr-1) ;
00600     for (int i=0 ; i<nr ; i++) {
00601     x[i] = -cos(xx*i) ;
00602     }
00603     // Partie en theta
00604     if (nt > 1) 
00605     xx = M_PI/double(2*(nt-1)) ;
00606     else
00607     xx = 0. ;
00608     for (int i=0 ; i<nt ; i++) {
00609     tet[i] = xx*i ;
00610     }
00611     // Partie longitudinale
00612     xx = M_PI/double(np) ;
00613     for (int i=0 ; i<np ; i++) {
00614     phi[i] = xx*i ;
00615     }
00616 }
00617 
00618 // Destructeur 
00619 //-------------
00620 Grille3d_is::~Grille3d_is() { }     // ne fait rien (c'est le destructeur
00621                     // de la classe de base, Grille3d, qui 
00622                     // fait tout. 
00623 
00624 
00625         
00626 
00627 
00628                      // Cas fin de jacobi + sans symetrie
00629 
00630 // Constructeur
00631 //-------------
00632 Grille3d_fj::Grille3d_fj(int nrs, int nts, int nps) 
00633     : Grille3d(nrs, nts, nps)
00634 {
00635 
00636     // Cette grille n'a pas de sens si np = 1
00637     assert(nps != 1) ;  // ??
00638 
00639     double xx ;
00640 
00641       type_r = FINJAC ;     // echantillonnage radial fin avec Jacobi     
00642       type_t = NONSYM ;     // echantillonnage en theta sur [0, pi] 
00643       type_p = NONSYM ;     // echantillonnage en phi sur [0, 2 pi[
00644 
00645     // Partie radiale
00646      if (nr > 1) {
00647     double* yy = pointsgausslobatto(nr-1); 
00648         for (int i=0 ; i<nr ; i++) {
00649         x[i] = yy[i] ;
00650         }
00651     delete [] yy ;
00652     }
00653     else 
00654     x[0]=0;
00655 
00656     // Partie en theta
00657     if (nt > 1) 
00658     xx = M_PI/double(nt-1) ;
00659     else
00660     xx = 0. ;
00661     for (int i=0 ; i<nt ; i++) {
00662     tet[i] = xx*i ;
00663     }
00664     // Partie longitudinale
00665     xx = 2.*M_PI/double(np) ;
00666     for (int i=0 ; i<np ; i++) {
00667     phi[i] = xx*i ;
00668     }
00669 }
00670 
00671 // Destructeur 
00672 //-------------
00673 Grille3d_fj::~Grille3d_fj() { } // ne fait rien (c'est le destructeur
00674                 // de la classe de base, Grille3d, qui 
00675                 // fait tout. 
00676 
00677 
00678 
00679 // cas fin de jacobi + symetrie equatoriale 
00680 
00681 // Constructeur
00682 //-------------
00683 Grille3d_fjeq::Grille3d_fjeq(int nrs, int nts, int nps) 
00684     : Grille3d(nrs, nts, nps)
00685 {
00686 
00687     double xx ;
00688         
00689 
00690     type_r = FINJAC ;   // echantillonnage radial fin avec Jacobi   
00691     type_t = SYM ;  // echantillonnage en theta sur [0, pi/2] 
00692     type_p = NONSYM ;   // echantillonnage en phi sur [0, 2 pi[
00693 
00694     // Partie radiale
00695     if (nr > 1) {
00696     double* yy = pointsgausslobatto(nr-1); 
00697         for (int i=0 ; i<nr ; i++) {
00698         x[i] = yy[i] ;
00699         }
00700     delete [] yy ;
00701     }
00702     else 
00703     x[0]=0;
00704     // Partie en theta
00705     if (nt > 1) 
00706     xx = M_PI/double(2*(nt-1)) ;
00707     else
00708     xx = 0. ;
00709     for (int i=0 ; i<nt ; i++) {
00710     tet[i] = xx*i ;
00711     }
00712     // Partie longitudinale
00713     xx = 2.*M_PI/double(np) ;
00714     for (int i=0 ; i<np ; i++) {
00715     phi[i] = xx*i ;
00716     }
00717 }
00718 
00719 // Destructeur 
00720 //-------------
00721 Grille3d_fjeq::~Grille3d_fjeq() { } // ne fait rien (c'est le destructeur
00722                     // de la classe de base, Grille3d, qui 
00723                     // fait tout. 
00724 
00725 
00726 
00727 // cas fin de jacobi + 2 phi
00728 
00729 // Constructeur
00730 //-------------
00731 Grille3d_fj2p::Grille3d_fj2p(int nrs, int nts, int nps) 
00732     : Grille3d(nrs, nts, nps)
00733 {
00734 
00735     double xx ;
00736 
00737     type_r = FINJAC ;   // echantillonnage radial fin avec Jacobi   
00738     type_t = NONSYM ;   // echantillonnage en theta sur [0,pi] 
00739     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00740 
00741     // Partie radiale
00742     if (nr > 1) {
00743     double* yy = pointsgausslobatto(nr-1); 
00744         for (int i=0 ; i<nr ; i++) {
00745         x[i] = yy[i] ;
00746         }
00747     delete [] yy ;
00748     }
00749     else 
00750     x[0]=0;
00751     // Partie en theta
00752     if (nt > 1) 
00753     xx = M_PI/double(nt-1) ;
00754     else
00755     xx = 0. ;
00756     for (int i=0 ; i<nt ; i++) {
00757     tet[i] = xx*i ;
00758     }
00759     // Partie longitudinale
00760     xx = M_PI/double(np) ;
00761     for (int i=0 ; i<np ; i++) {
00762     phi[i] = xx*i ;
00763     }
00764 }
00765 
00766 // Destructeur 
00767 //-------------
00768 Grille3d_fj2p::~Grille3d_fj2p() { } // ne fait rien (c'est le destructeur
00769                     // de la classe de base, Grille3d, qui 
00770                     // fait tout. 
00771 
00772 
00773 
00774 // cas fin de jacobi supersymetrique
00775 
00776 // Constructeur
00777 //-------------
00778 Grille3d_fjs::Grille3d_fjs(int nrs, int nts, int nps) 
00779     : Grille3d(nrs, nts, nps)
00780 {
00781 
00782     double xx ;
00783     
00784     type_r = FINJAC ;   // echantillonnage radial fin avec Jacobi   
00785     type_t = SYM ;  // echantillonnage en theta sur [0,pi/2] 
00786     type_p = SYM ;  // echantillonnage en phi sur [0,pi[
00787 
00788     // Partie radiale
00789     
00790     
00791     if (nr > 1) {
00792     double* yy = pointsgausslobatto(nr-1); 
00793         for (int i=0 ; i<nr ; i++) {
00794         x[i] = yy[i] ;
00795         }
00796     delete [] yy ;
00797     }
00798     else 
00799     x[0]=0;
00800     // Partie en theta
00801     if (nt > 1) 
00802     xx = M_PI/double(2*(nt-1)) ;
00803     else
00804     xx = 0. ;
00805     for (int i=0 ; i<nt ; i++) {
00806     tet[i] = xx*i ;
00807     }
00808     // Partie longitudinale
00809     xx = M_PI/double(np) ;
00810     for (int i=0 ; i<np ; i++) {
00811     phi[i] = xx*i ;
00812     }
00813 }
00814 
00815 // Destructeur 
00816 //-------------
00817 Grille3d_fjs::~Grille3d_fjs() { }   // ne fait rien (c'est le destructeur
00818                     // de la classe de base, Grille3d, qui 
00819                     // fait tout. 

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