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
00032 char valeur_dsdx_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_dsdx.C,v 1.3 2007/12/14 10:19:35 jl_cornou Exp $" ;
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 #include <assert.h>
00078
00079
00080 #include "mtbl_cf.h"
00081 #include "valeur.h"
00082
00083
00084 void _dsdx_pas_prevu(Tbl *, int &) ;
00085 void _dsdx_r_cheb(Tbl *, int &) ;
00086 void _dsdx_r_chebu(Tbl *, int &) ;
00087 void _dsdx_r_chebp(Tbl *, int &) ;
00088 void _dsdx_r_chebi(Tbl *, int &) ;
00089 void _dsdx_r_chebpim_p(Tbl *, int &) ;
00090 void _dsdx_r_chebpim_i(Tbl *, int &) ;
00091 void _dsdx_r_chebpi_p(Tbl *, int &) ;
00092 void _dsdx_r_chebpi_i(Tbl *, int &) ;
00093 void _dsdx_r_jaco02(Tbl *, int &) ;
00094
00095
00096
00097
00098 const Valeur& Valeur::dsdx() const {
00099
00100
00101 assert(etat != ETATNONDEF) ;
00102
00103
00104 if (p_dsdx != 0x0) {
00105 return *p_dsdx ;
00106 }
00107
00108
00109
00110 p_dsdx = new Valeur(mg) ;
00111
00112 if (etat == ETATZERO) {
00113 p_dsdx->set_etat_zero() ;
00114 }
00115 else {
00116 assert(etat == ETATQCQ) ;
00117 p_dsdx->set_etat_cf_qcq() ;
00118 Mtbl_cf* cfp = p_dsdx->c_cf ;
00119
00120
00121
00122 if (c_cf == 0x0) {
00123 coef() ;
00124 }
00125 *cfp = *c_cf ;
00126
00127 cfp->dsdx() ;
00128
00129 p_dsdx->base = cfp->base ;
00130 }
00131
00132
00133 return *p_dsdx ;
00134 }
00135
00136
00137
00138
00139
00140 void Mtbl_cf::dsdx() {
00141
00142
00143 static void (*_dsdx[MAX_BASE])(Tbl *, int &) ;
00144 static int nap = 0 ;
00145
00146
00147 if (nap==0) {
00148 nap = 1 ;
00149 for (int i=0 ; i<MAX_BASE ; i++) {
00150 _dsdx[i] = _dsdx_pas_prevu ;
00151 }
00152
00153 _dsdx[R_CHEB >> TRA_R] = _dsdx_r_cheb ;
00154 _dsdx[R_CHEBU >> TRA_R] = _dsdx_r_chebu ;
00155 _dsdx[R_CHEBP >> TRA_R] = _dsdx_r_chebp ;
00156 _dsdx[R_CHEBI >> TRA_R] = _dsdx_r_chebi ;
00157 _dsdx[R_CHEBPIM_P >> TRA_R] = _dsdx_r_chebpim_p ;
00158 _dsdx[R_CHEBPIM_I >> TRA_R] = _dsdx_r_chebpim_i ;
00159 _dsdx[R_CHEBPI_P >> TRA_R] = _dsdx_r_chebpi_p ;
00160 _dsdx[R_CHEBPI_I >> TRA_R] = _dsdx_r_chebpi_i ;
00161 _dsdx[R_JACO02 >> TRA_R] = _dsdx_r_jaco02 ;
00162 }
00163
00164
00165
00166
00167 assert(etat == ETATQCQ) ;
00168
00169
00170 for (int l=0 ; l<nzone ; l++) {
00171 int base_r = (base.b[l] & MSQ_R) >> TRA_R ;
00172 assert(t[l] != 0x0) ;
00173 _dsdx[base_r](t[l], base.b[l]) ;
00174 }
00175 }