00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __GRILLES_H_
00032 #define __GRILLES_H_
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151 #include <assert.h>
00152 #include <stdio.h>
00153 #include <stdlib.h>
00154 #include "headcpp.h"
00155
00156 #include "type_parite.h"
00157
00158 class Base_val ;
00159
00160
00161
00162
00163
00164
00183 class Grille3d {
00184 protected:
00185 const int nr ;
00186 const int nt ;
00187 const int np ;
00188
00189 int type_r ;
00190 int type_t ;
00191 int type_p ;
00192 public:
00194 double* x ;
00196 double* tet ;
00198 double* phi ;
00199
00200 protected:
00202 Grille3d(int n_r, int n_t, int n_p) ;
00203
00204 private:
00208 Grille3d(const Grille3d& ) ;
00209
00213 void operator=(const Grille3d& ) ;
00214
00215 public:
00216 virtual ~Grille3d() ;
00217
00218 public:
00220 int get_nr() const {return nr ;} ;
00222 int get_nt() const {return nt ;} ;
00224 int get_np() const {return np ;} ;
00225
00227 int get_type_r() const {return type_r ;} ;
00229 int get_type_t() const {return type_t ;} ;
00231 int get_type_p() const {return type_p ;} ;
00232
00233 };
00234
00235
00236
00237
00238
00239
00247
00248
00249
00257 class Grille3d_r : public Grille3d {
00258 public:
00259 Grille3d_r(int n_r, int n_t, int n_p) ;
00260 ~Grille3d_r() ;
00261 };
00262
00263
00264
00273 class Grille3d_f : public Grille3d {
00274 public:
00275 Grille3d_f(int n_r, int n_t, int n_p) ;
00276 ~Grille3d_f() ;
00277 };
00278
00279
00280
00289 class Grille3d_i : public Grille3d {
00290 public:
00291 Grille3d_i(int n_r, int n_t, int n_p) ;
00292 ~Grille3d_i() ;
00293 };
00294
00295
00296
00306 class Grille3d_req : public Grille3d {
00307 public:
00308 Grille3d_req(int n_r, int n_t, int n_p) ;
00309 ~Grille3d_req() ;
00310 };
00311
00312
00313
00323 class Grille3d_feq : public Grille3d {
00324 public:
00325 Grille3d_feq(int n_r, int n_t, int n_p) ;
00326 ~Grille3d_feq() ;
00327 };
00328
00329
00330
00340 class Grille3d_ieq : public Grille3d {
00341 public:
00342 Grille3d_ieq(int n_r, int n_t, int n_p) ;
00343 ~Grille3d_ieq() ;
00344 };
00345
00346
00347
00357 class Grille3d_rs : public Grille3d {
00358 public:
00359 Grille3d_rs(int n_r, int n_t, int n_p) ;
00360 ~Grille3d_rs() ;
00361 };
00362
00363
00364
00374 class Grille3d_fs : public Grille3d {
00375 public:
00376 Grille3d_fs(int n_r, int n_t, int n_p) ;
00377 ~Grille3d_fs() ;
00378 };
00379
00380
00381
00391 class Grille3d_is : public Grille3d {
00392 public:
00393 Grille3d_is(int n_r, int n_t, int n_p) ;
00394 ~Grille3d_is() ;
00395 };
00396
00397
00398
00407 class Grille3d_r2p : public Grille3d {
00408 public:
00409 Grille3d_r2p(int n_r, int n_t, int n_p) ;
00410 ~Grille3d_r2p() ;
00411 };
00412
00413
00414
00423 class Grille3d_f2p : public Grille3d {
00424 public:
00425 Grille3d_f2p(int n_r, int n_t, int n_p) ;
00426 ~Grille3d_f2p() ;
00427 };
00428
00429
00430
00440 class Grille3d_i2p : public Grille3d {
00441 public:
00442 Grille3d_i2p(int n_r, int n_t, int n_p) ;
00443 ~Grille3d_i2p() ;
00444 };
00445
00446
00447
00457 class Grille3d_fj : public Grille3d {
00458 public:
00459 Grille3d_fj(int n_r, int n_t, int n_p) ;
00460 ~Grille3d_fj() ;
00461 };
00462
00463
00464
00475 class Grille3d_fjeq : public Grille3d {
00476 public:
00477 Grille3d_fjeq(int n_r, int n_t, int n_p) ;
00478 ~Grille3d_fjeq() ;
00479 };
00480
00481
00482
00493 class Grille3d_fjs : public Grille3d {
00494 public:
00495 Grille3d_fjs(int n_r, int n_t, int n_p) ;
00496 ~Grille3d_fjs() ;
00497 };
00498
00499
00500
00510 class Grille3d_fj2p : public Grille3d {
00511 public:
00512 Grille3d_fj2p(int n_r, int n_t, int n_p) ;
00513 ~Grille3d_fj2p() ;
00514 };
00515
00517
00518
00519
00520
00521
00539 class Mg3d {
00540
00541
00542
00543 protected:
00544 int nzone ;
00545
00546 int* nr ;
00547 int* nt ;
00548 int* np ;
00549
00553 int* type_r ;
00555 int type_t ;
00557 int type_p ;
00558
00560 Grille3d** g ;
00561
00562 mutable Mg3d* g_angu ;
00563
00564 mutable Mg3d* g_angu_1dom ;
00565 mutable Mg3d* g_radial ;
00566
00570 mutable Mg3d* g_twice ;
00571
00575 mutable Mg3d* g_plus_half ;
00576
00581 mutable Mg3d* g_non_axi ;
00582
00583
00584
00585
00586 public:
00587
00601 Mg3d(int nz, int nbr[], int typr[], int nbt[], int typt, int nbp[],
00602 int typp) ;
00603
00639 Mg3d(int nz, int nbr, int nbt, int nbp, int typt, int typp,
00640 bool compact) ;
00641
00666 Mg3d(int nz, int nbr, int nbt, int nbp, int typt, int typp) ;
00667
00668 Mg3d(FILE* ) ;
00669
00670 public:
00675 Mg3d(const Mg3d& ) ;
00676
00677 public:
00678
00679 ~Mg3d() ;
00680
00681
00682
00683 private:
00688 void operator=(const Mg3d& ) ;
00689
00690
00691
00692 public:
00694 int get_nzone() const {
00695 return nzone ;
00696 } ;
00698 int get_nr(int l) const {
00699 assert(l>=0 && l<nzone) ;
00700 return nr[l] ;
00701 } ;
00703 int get_nt(int l) const {
00704 assert(l>=0 && l<nzone) ;
00705 return nt[l] ;
00706 } ;
00708 int get_np(int l) const {
00709 assert(l>=0 && l<nzone) ;
00710 return np[l] ;
00711 } ;
00712
00722 int get_type_r(int l) const {
00723 assert(l>=0 && l<nzone) ;
00724 return type_r[l] ;
00725 } ;
00726
00733 int get_type_t() const {
00734 return type_t ;
00735 } ;
00736
00743 int get_type_p() const {
00744 return type_p ;
00745 } ;
00746
00748 const Grille3d* get_grille3d(int l) const {
00749 assert(l>=0 && l<nzone) ;
00750 return g[l] ;
00751 } ;
00752
00754 const Mg3d* get_angu() const ;
00755
00759 const Mg3d* get_angu_1dom() const ;
00760
00762 const Mg3d* get_radial() const ;
00763
00767 const Mg3d* get_twice() const ;
00768
00772 const Mg3d* plus_half() const ;
00773
00778 const Mg3d* get_non_axi() const ;
00779
00781 bool operator==(const Mg3d& ) const ;
00782
00783
00784
00785
00786
00787 public:
00788 void sauve(FILE* ) const ;
00789
00790 friend ostream& operator<<(ostream& , const Mg3d & ) ;
00791
00792
00793
00794 protected:
00798 void del_deriv() const ;
00799
00803 void set_deriv_0x0() const ;
00804
00805
00806
00807
00808 public:
00809 bool operator!=(const Mg3d & ) const ;
00810
00812 Base_val std_base_scal() const ;
00813
00815 Base_val std_base_scal_odd() const ;
00816
00820 Base_val** std_base_vect_cart() const ;
00821
00825 Base_val** std_base_vect_spher() const ;
00826
00830 Base_val** pseudo_base_vect_cart() const ;
00831
00835 Base_val** pseudo_base_vect_spher() const ;
00836
00837 };
00838 ostream& operator<<(ostream& , const Mg3d & ) ;
00839
00840 #endif