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_d2sdx2_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_d2sdx2.C,v 1.3 2008/08/27 08:52:55 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
00078
00079
00080 #include <assert.h>
00081
00082
00083 #include "mtbl_cf.h"
00084 #include "valeur.h"
00085
00086
00087 void _d2sdx2_pas_prevu(Tbl *, int &) ;
00088 void _d2sdx2_r_cheb(Tbl *, int &) ;
00089 void _d2sdx2_r_chebu_0(Tbl *, int &) ;
00090 void _d2sdx2_r_chebp(Tbl *, int &) ;
00091 void _d2sdx2_r_chebi(Tbl *, int &) ;
00092 void _d2sdx2_r_chebpim_p(Tbl *, int &) ;
00093 void _d2sdx2_r_chebpim_i(Tbl *, int &) ;
00094 void _d2sdx2_r_chebpi_p(Tbl *, int &) ;
00095 void _d2sdx2_r_chebpi_i(Tbl *, int &) ;
00096 void _d2sdx2_r_jaco02(Tbl *, int &) ;
00097
00098
00099
00100
00101 const Valeur& Valeur::d2sdx2() const {
00102
00103
00104 assert(etat != ETATNONDEF) ;
00105
00106
00107 if (p_d2sdx2 != 0x0) {
00108 return *p_d2sdx2 ;
00109 }
00110
00111
00112
00113 p_d2sdx2 = new Valeur(mg) ;
00114
00115 if (etat == ETATZERO) {
00116 p_d2sdx2->set_etat_zero() ;
00117 }
00118 else {
00119 assert(etat == ETATQCQ) ;
00120 p_d2sdx2->set_etat_cf_qcq() ;
00121 Mtbl_cf* cfp = p_d2sdx2->c_cf ;
00122
00123
00124
00125 if (c_cf == 0x0) {
00126 coef() ;
00127 }
00128 *cfp = *c_cf ;
00129
00130 cfp->d2sdx2() ;
00131
00132 p_d2sdx2->base = cfp->base ;
00133 }
00134
00135
00136 return *p_d2sdx2 ;
00137 }
00138
00139
00140
00141
00142 void Mtbl_cf::d2sdx2() {
00143
00144
00145 static void (*_d2sdx2[MAX_BASE])(Tbl *, int &) ;
00146 static int nap = 0 ;
00147
00148
00149 if (nap==0) {
00150 nap = 1 ;
00151 for (int i=0 ; i<MAX_BASE ; i++) {
00152 _d2sdx2[i] = _d2sdx2_pas_prevu ;
00153 }
00154
00155 _d2sdx2[R_CHEB >> TRA_R] = _d2sdx2_r_cheb ;
00156 _d2sdx2[R_CHEBU >> TRA_R] = _d2sdx2_r_chebu_0 ;
00157 _d2sdx2[R_CHEBP >> TRA_R] = _d2sdx2_r_chebp ;
00158 _d2sdx2[R_CHEBI >> TRA_R] = _d2sdx2_r_chebi ;
00159 _d2sdx2[R_CHEBPIM_P >> TRA_R] = _d2sdx2_r_chebpim_p ;
00160 _d2sdx2[R_CHEBPIM_I >> TRA_R] = _d2sdx2_r_chebpim_i ;
00161 _d2sdx2[R_CHEBPI_P >> TRA_R] = _d2sdx2_r_chebpi_p ;
00162 _d2sdx2[R_CHEBPI_I >> TRA_R] = _d2sdx2_r_chebpi_i ;
00163 _d2sdx2[R_JACO02 >> TRA_R] = _d2sdx2_r_jaco02 ;
00164 }
00165
00166
00167
00168
00169 assert(etat == ETATQCQ) ;
00170
00171
00172 for (int l=0 ; l<nzone ; l++) {
00173 int base_r = (base.b[l] & MSQ_R) >> TRA_R ;
00174 assert(t[l] != 0x0) ;
00175 _d2sdx2[base_r](t[l], base.b[l]) ;
00176 }
00177 }