00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 char map_radial_reeval_symy_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_radial_reeval_symy.C,v 1.2 2007/05/15 12:43:57 p_grandclement Exp $" ;
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #include <stdlib.h>
00045
00046
00047 #include "map.h"
00048 #include "cmp.h"
00049 #include "param.h"
00050 #include "scalar.h"
00051
00052 void Map_radial::reevaluate_symy(const Map* mp_prev0, int nzet, Cmp& uu) const {
00053
00054 const Map_radial* mp_prev = dynamic_cast<const Map_radial*>(mp_prev0) ;
00055
00056 if (mp_prev == 0x0) {
00057 cout <<
00058 "Map_radial::reevaluate_symy : the mapping mp_prev does not belong"
00059 << endl ;
00060 cout << " to the class Map_radial !" << endl ;
00061 abort() ;
00062 }
00063
00064 int nz = mg->get_nzone() ;
00065
00066
00067
00068 assert(uu.get_mp() == this) ;
00069 assert(uu.get_dzpuis() == 0) ;
00070 assert(uu.get_etat() != ETATNONDEF) ;
00071 assert(mp_prev->mg == mg) ;
00072 assert(nzet <= nz) ;
00073 assert(mg->get_type_p() == NONSYM) ;
00074
00075
00076
00077 if ( uu.get_etat() == ETATZERO ) {
00078 return ;
00079 }
00080
00081 assert(uu.get_etat() == ETATQCQ) ;
00082 (uu.va).coef() ;
00083
00084
00085 Mtbl_cf va_cf = *((uu.va).c_cf) ;
00086
00087
00088
00089
00090 (uu.va).set_etat_c_qcq() ;
00091
00092
00093
00094 Mtbl& va_c = *((uu.va).c) ;
00095
00096 va_c.set_etat_qcq() ;
00097
00098
00099
00100
00101
00102
00103 if ( r.c == 0x0 ) r.fait() ;
00104 const Mtbl& rc = *(r.c) ;
00105
00106
00107
00108 int nitermax = 100 ;
00109 int niter ;
00110 double precis = 1.e-15 ;
00111 Param par ;
00112 par.add_int(nitermax) ;
00113 par.add_int_mod(niter) ;
00114 par.add_double(precis) ;
00115
00116
00117
00118
00119 for (int l=0; l<nzet; l++) {
00120 int nr = mg->get_nr(l) ;
00121 int nt = mg->get_nt(l) ;
00122 int np = mg->get_np(l) ;
00123
00124 va_c.t[l]->set_etat_qcq() ;
00125
00126
00127 double* ptx = (va_c.t[l])->t ;
00128
00129 double* pr = (rc.t[l])->t ;
00130
00131
00132
00133
00134
00135 for (int k=0 ; k<np/2+1 ; k++) {
00136 for (int j=0; j<nt; j++) {
00137 for (int i=0; i<nr; i++) {
00138
00139
00140
00141
00142 int l0 ;
00143 double xi0 ;
00144 mp_prev->val_lx_jk(*pr, j, k, par, l0, xi0) ;
00145
00146
00147
00148 *ptx = va_cf.val_point_jk_symy(l0, xi0, j, k) ;
00149
00150
00151 pr++ ;
00152 ptx++ ;
00153 }
00154 }
00155 }
00156
00157
00158
00159
00160 for (int k=np/2+1 ; k<np ; k++) {
00161
00162
00163
00164 double* ptx_symy = (va_c.t[l])->t + (np-k)*nt*nr ;
00165
00166
00167 for (int j=0 ; j<nt ; j++) {
00168 for (int i=0 ; i<nr ; i++) {
00169 *ptx = *ptx_symy ;
00170 ptx++ ;
00171 ptx_symy++ ;
00172 }
00173 }
00174 }
00175
00176 }
00177
00178
00179
00180
00181 uu.annule(nzet, nz - 1) ;
00182
00183
00184 }
00185
00186 void Map_radial::reevaluate_symy(const Map* mp_prev0, int nzet, Scalar& uu) const {
00187
00188 const Map_radial* mp_prev = dynamic_cast<const Map_radial*>(mp_prev0) ;
00189
00190 if (mp_prev == 0x0) {
00191 cout <<
00192 "Map_radial::reevaluate_symy : the mapping mp_prev does not belong"
00193 << endl ;
00194 cout << " to the class Map_radial !" << endl ;
00195 abort() ;
00196 }
00197
00198 int nz = mg->get_nzone() ;
00199
00200
00201
00202 assert(uu.get_mp() == *this) ;
00203 assert(uu.get_dzpuis() == 0) ;
00204 assert(uu.get_etat() != ETATNONDEF) ;
00205 assert(mp_prev->mg == mg) ;
00206 assert(nzet <= nz) ;
00207 assert(mg->get_type_p() == NONSYM) ;
00208
00209
00210
00211 if ( uu.get_etat() == ETATZERO ) {
00212 return ;
00213 }
00214
00215 assert(uu.get_etat() == ETATQCQ) ;
00216 uu.set_spectral_va().coef() ;
00217
00218
00219 Mtbl_cf va_cf = *(uu.set_spectral_va().c_cf) ;
00220
00221
00222
00223
00224 uu.set_spectral_va().set_etat_c_qcq() ;
00225
00226
00227
00228 Mtbl& va_c = *(uu.set_spectral_va().c) ;
00229
00230 va_c.set_etat_qcq() ;
00231
00232
00233
00234
00235
00236
00237 if ( r.c == 0x0 ) r.fait() ;
00238 const Mtbl& rc = *(r.c) ;
00239
00240
00241
00242 int nitermax = 100 ;
00243 int niter ;
00244 double precis = 1.e-15 ;
00245 Param par ;
00246 par.add_int(nitermax) ;
00247 par.add_int_mod(niter) ;
00248 par.add_double(precis) ;
00249
00250
00251
00252
00253 for (int l=0; l<nzet; l++) {
00254 int nr = mg->get_nr(l) ;
00255 int nt = mg->get_nt(l) ;
00256 int np = mg->get_np(l) ;
00257
00258 va_c.t[l]->set_etat_qcq() ;
00259
00260
00261 double* ptx = (va_c.t[l])->t ;
00262
00263 double* pr = (rc.t[l])->t ;
00264
00265
00266
00267
00268
00269 for (int k=0 ; k<np/2+1 ; k++) {
00270 for (int j=0; j<nt; j++) {
00271 for (int i=0; i<nr; i++) {
00272
00273
00274
00275
00276 int l0 ;
00277 double xi0 ;
00278 mp_prev->val_lx_jk(*pr, j, k, par, l0, xi0) ;
00279
00280
00281
00282 *ptx = va_cf.val_point_jk_symy(l0, xi0, j, k) ;
00283
00284
00285 pr++ ;
00286 ptx++ ;
00287 }
00288 }
00289 }
00290
00291
00292
00293
00294 for (int k=np/2+1 ; k<np ; k++) {
00295
00296
00297
00298 double* ptx_symy = (va_c.t[l])->t + (np-k)*nt*nr ;
00299
00300
00301 for (int j=0 ; j<nt ; j++) {
00302 for (int i=0 ; i<nr ; i++) {
00303 *ptx = *ptx_symy ;
00304 ptx++ ;
00305 ptx_symy++ ;
00306 }
00307 }
00308 }
00309
00310 }
00311
00312
00313
00314
00315 uu.annule(nzet, nz - 1) ;
00316
00317
00318 }