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_d2sdt2_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_d2sdt2.C,v 1.3 2009/10/09 14:01:06 j_novak 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 _d2sdtet2_pas_prevu(Tbl *, int &) ;
00085 void _d2sdtet2_t_cos(Tbl *, int &) ;
00086 void _d2sdtet2_t_sin(Tbl *, int &) ;
00087 void _d2sdtet2_t_cos_p(Tbl *, int &) ;
00088 void _d2sdtet2_t_sin_p(Tbl *, int &) ;
00089 void _d2sdtet2_t_sin_i(Tbl *, int &) ;
00090 void _d2sdtet2_t_cos_i(Tbl *, int &) ;
00091 void _d2sdtet2_t_cossin_cp(Tbl *, int &) ;
00092 void _d2sdtet2_t_cossin_sp(Tbl *, int &) ;
00093 void _d2sdtet2_t_cossin_si(Tbl *, int &) ;
00094 void _d2sdtet2_t_cossin_c(Tbl *, int &) ;
00095 void _d2sdtet2_t_cossin_s(Tbl *, int &) ;
00096
00097
00098
00099
00100 const Valeur& Valeur::d2sdt2() const {
00101
00102
00103 assert(etat != ETATNONDEF) ;
00104
00105
00106 if (p_d2sdt2 != 0x0) {
00107 return *p_d2sdt2 ;
00108 }
00109
00110
00111
00112 p_d2sdt2 = new Valeur(mg) ;
00113
00114 if (etat == ETATZERO) {
00115 p_d2sdt2->set_etat_zero() ;
00116 }
00117 else {
00118 assert(etat == ETATQCQ) ;
00119 p_d2sdt2->set_etat_cf_qcq() ;
00120 Mtbl_cf* cfp = p_d2sdt2->c_cf ;
00121
00122
00123
00124 if (c_cf == 0x0) {
00125 coef() ;
00126 }
00127 *cfp = *c_cf ;
00128
00129 cfp->d2sdt2() ;
00130
00131 p_d2sdt2->base = cfp->base ;
00132 }
00133
00134
00135 return *p_d2sdt2 ;
00136 }
00137
00138
00139
00140
00141 void Mtbl_cf::d2sdt2() {
00142
00143
00144 static void (*_d2sdtet2[MAX_BASE])(Tbl *, int &) ;
00145 static int nap = 0 ;
00146
00147
00148 if (nap==0) {
00149 nap = 1 ;
00150 for (int i=0 ; i<MAX_BASE ; i++) {
00151 _d2sdtet2[i] = _d2sdtet2_pas_prevu ;
00152 }
00153
00154 _d2sdtet2[T_COS >> TRA_T] = _d2sdtet2_t_cos ;
00155 _d2sdtet2[T_SIN >> TRA_T] = _d2sdtet2_t_sin ;
00156 _d2sdtet2[T_COS_P >> TRA_T] = _d2sdtet2_t_cos_p ;
00157 _d2sdtet2[T_SIN_P >> TRA_T] = _d2sdtet2_t_sin_p ;
00158 _d2sdtet2[T_SIN_I >> TRA_T] = _d2sdtet2_t_sin_i ;
00159 _d2sdtet2[T_COS_I >> TRA_T] = _d2sdtet2_t_cos_i ;
00160 _d2sdtet2[T_COSSIN_CP >> TRA_T] = _d2sdtet2_t_cossin_cp ;
00161 _d2sdtet2[T_COSSIN_SP >> TRA_T] = _d2sdtet2_t_cossin_sp ;
00162 _d2sdtet2[T_COSSIN_SI >> TRA_T] = _d2sdtet2_t_cossin_si ;
00163 _d2sdtet2[T_COSSIN_S >> TRA_T] = _d2sdtet2_t_cossin_s ;
00164 _d2sdtet2[T_COSSIN_C >> TRA_T] = _d2sdtet2_t_cossin_c ;
00165 }
00166
00167
00168
00169
00170 assert(etat == ETATQCQ) ;
00171
00172
00173 for (int l=0 ; l<nzone ; l++) {
00174 int base_t = (base.b[l] & MSQ_T) >> TRA_T ;
00175 assert(t[l] != 0x0) ;
00176 _d2sdtet2[base_t](t[l], base.b[l]) ;
00177 }
00178 }