90 hole1.tkij_tot.set_etat_qcq() ;
91 hole2.tkij_tot.set_etat_qcq() ;
95 hole1.fait_taij_auto () ;
96 hole2.fait_taij_auto () ;
99 hole1.taij_comp.set_etat_qcq() ;
100 hole2.taij_comp.set_etat_qcq() ;
109 double orientation_un =
hole1.taij_auto.get_mp()->get_rot_phi() ;
110 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
111 double orientation_deux =
hole2.taij_auto.get_mp()->get_rot_phi() ;
112 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
113 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
116 if (
hole2.taij_auto.get_etat() == ETATZERO)
117 hole1.taij_comp.set_etat_zero() ;
119 hole1.taij_comp.set(0, 0).import_asymy(sans_dz_deux(0, 0)) ;
120 hole1.taij_comp.set(0, 1).import_symy(sans_dz_deux(0, 1)) ;
121 hole1.taij_comp.set(0, 2).import_asymy(same_orient*sans_dz_deux(0, 2)) ;
122 hole1.taij_comp.set(1, 1).import_asymy(sans_dz_deux(1, 1)) ;
123 hole1.taij_comp.set(1, 2).import_symy(same_orient*sans_dz_deux(1, 2)) ;
124 hole1.taij_comp.set(2, 2).import_asymy(sans_dz_deux(2, 2)) ;
127 if (
hole1.taij_auto.get_etat() == ETATZERO)
128 hole2.taij_comp.set_etat_zero() ;
130 hole2.taij_comp.set(0, 0).import_asymy(sans_dz_un(0, 0)) ;
131 hole2.taij_comp.set(0, 1).import_symy(sans_dz_un(0, 1)) ;
132 hole2.taij_comp.set(0, 2).import_asymy(same_orient*sans_dz_un(0, 2)) ;
133 hole2.taij_comp.set(1, 1).import_asymy(sans_dz_un(1, 1)) ;
134 hole2.taij_comp.set(1, 2).import_symy(same_orient*sans_dz_un(1, 2)) ;
135 hole2.taij_comp.set(2, 2).import_asymy(sans_dz_un(2, 2)) ;
138 hole1.taij_comp.set_std_base() ;
139 hole2.taij_comp.set_std_base() ;
140 hole1.taij_comp.inc2_dzpuis() ;
141 hole2.taij_comp.inc2_dzpuis() ;
147 if ((
hole1.taij_tot.get_etat() == ETATZERO) &&
148 (
hole2.taij_tot.get_etat() == ETATZERO)) {
150 hole1.tkij_tot.set_etat_zero() ;
151 hole1.tkij_auto.set_etat_zero() ;
152 hole2.tkij_tot.set_etat_zero() ;
153 hole2.tkij_auto.set_etat_zero() ;
156 int nz_un =
hole1.mp.get_mg()->get_nzone() ;
157 int nz_deux =
hole2.mp.get_mg()->get_nzone() ;
160 ntot_un = division_xpun (ntot_un, 0) ;
164 ntot_deux = division_xpun (ntot_deux, 0) ;
168 for (
int lig = 0 ; lig<3 ; lig++)
169 for (
int col = lig ; col<3 ; col++) {
177 if (same_orient == 1)
181 Cmp auxi_un (
hole1.taij_tot(lig, col)/2.) ;
183 auxi_un = division_xpun (auxi_un, 0) ;
184 auxi_un = auxi_un / ntot_un ;
188 Cmp auxi_deux (
hole2.taij_tot(lig, col)/2.) ;
190 auxi_deux = division_xpun (auxi_deux, 0) ;
191 auxi_deux = auxi_deux / ntot_deux ;
195 Cmp copie_un (
hole1.taij_tot(lig, col)) ;
198 Cmp copie_deux (
hole2.taij_tot(lig, col)) ;
202 double lim_un =
hole1.mp.get_alpha()[1] +
hole1.mp.get_beta()[1] ;
203 double lim_deux =
hole2.mp.get_alpha()[1] +
hole2.mp.get_beta()[1] ;
213 double xabs, yabs, zabs, air, theta,
phi ;
216 for (
int l=2 ; l<nz_un ; l++) {
218 int nr =
hole1.mp.get_mg()->get_nr (l) ;
223 int np =
hole1.mp.get_mg()->get_np (l) ;
224 int nt =
hole1.mp.get_mg()->get_nt (l) ;
226 for (
int k=0 ; k<np ; k++)
227 for (
int j=0 ; j<nt ; j++)
228 for (
int i=0 ; i<nr ; i++) {
230 xabs = xabs_un (l, k, j, i) ;
231 yabs = yabs_un (l, k, j, i) ;
232 zabs = zabs_un (l, k, j, i) ;
235 hole2.mp.convert_absolute
236 (xabs, yabs, zabs, air, theta,
phi) ;
240 auxi_un.
set(l, k, j, i) =
241 copie_un(l, k, j, i) / ntot_un (l, k, j, i)/2. ;
244 auxi_un.
set(l, k, j, i) =
250 for (
int k=0 ; k<np ; k++)
251 for (
int j=0 ; j<nt ; j++)
252 auxi_un.
set(nz_un-1, k, j, nr-1) = 0 ;
256 for (
int l=2 ; l<nz_deux ; l++) {
258 int nr =
hole2.mp.get_mg()->get_nr (l) ;
263 int np =
hole2.mp.get_mg()->get_np (l) ;
264 int nt =
hole2.mp.get_mg()->get_nt (l) ;
266 for (
int k=0 ; k<np ; k++)
267 for (
int j=0 ; j<nt ; j++)
268 for (
int i=0 ; i<nr ; i++) {
270 xabs = xabs_deux (l, k, j, i) ;
271 yabs = yabs_deux (l, k, j, i) ;
272 zabs = zabs_deux (l, k, j, i) ;
275 hole1.mp.convert_absolute
276 (xabs, yabs, zabs, air, theta,
phi) ;
280 auxi_deux.
set(l, k, j, i) =
281 copie_deux(l, k, j, i) / ntot_deux (l, k, j, i) /2.;
284 auxi_deux.
set(l, k, j, i) =
289 for (
int k=0 ; k<np ; k++)
290 for (
int j=0 ; j<nt ; j++)
291 auxi_deux.
set(nz_deux-1, k, j, nr-1) = 0 ;
297 hole1.tkij_tot.set(lig, col) = auxi_un ;
298 hole2.tkij_tot.set(lig, col) = auxi_deux ;
301 hole1.tkij_auto.set_etat_qcq() ;
302 hole2.tkij_auto.set_etat_qcq() ;
304 for (
int lig=0 ; lig<3 ; lig++)
305 for (
int col=lig ; col<3 ; col++) {
306 hole1.tkij_auto.set(lig, col) =
hole1.tkij_tot(lig, col)*
308 hole2.tkij_auto.set(lig, col) =
hole2.tkij_tot(lig, col)*
316 int nz_un =
hole1.mp.get_mg()->get_nzone() ;
317 int nz_deux =
hole2.mp.get_mg()->get_nzone() ;
320 double distance =
hole1.mp.get_ori_x() -
hole2.mp.get_ori_x() ;
321 double lim_un = distance/2. ;
322 double lim_deux = distance/2. ;
323 double int_un = distance/6. ;
324 double int_deux = distance/6. ;
328 fonction_f_un = 0.5*
pow(
329 cos((
hole1.mp.r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
333 fonction_g_un = 0.5*
pow
334 (
sin((
hole1.mp.r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
338 fonction_f_deux = 0.5*
pow(
339 cos((
hole2.mp.r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
343 fonction_g_deux = 0.5*
pow(
344 sin((
hole2.mp.r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
361 double xabs, yabs, zabs, air_un, air_deux, theta,
phi ;
364 for (
int l=0 ; l<nz_un ; l++) {
365 int nr =
hole1.mp.get_mg()->get_nr (l) ;
370 int np =
hole1.mp.get_mg()->get_np (l) ;
371 int nt =
hole1.mp.get_mg()->get_nt (l) ;
373 for (
int k=0 ; k<np ; k++)
374 for (
int j=0 ; j<nt ; j++)
375 for (
int i=0 ; i<nr ; i++) {
377 xabs = xabs_un (l, k, j, i) ;
378 yabs = yabs_un (l, k, j, i) ;
379 zabs = zabs_un (l, k, j, i) ;
382 hole1.mp.convert_absolute
383 (xabs, yabs, zabs, air_un, theta,
phi) ;
384 hole2.mp.convert_absolute
385 (xabs, yabs, zabs, air_deux, theta,
phi) ;
387 if (air_un <= lim_un)
389 decouple_un.
set(l, k, j, i) = 1 ;
392 decouple_un.
set(l, k, j, i) =
393 fonction_f_un (l, k, j, i) ;
395 if (air_deux <= lim_deux)
396 if (air_deux < int_deux)
397 decouple_un.
set(l, k, j, i) = 0 ;
400 decouple_un.
set(l, k, j, i) =
405 decouple_un.
set(l, k, j, i) = 0.5 ;
410 for (
int k=0 ; k<np ; k++)
411 for (
int j=0 ; j<nt ; j++)
412 decouple_un.
set(nz_un-1, k, j, nr) = 0.5 ;
415 for (
int l=0 ; l<nz_deux ; l++) {
417 int nr =
hole2.mp.get_mg()->get_nr (l) ;
422 int np =
hole2.mp.get_mg()->get_np (l) ;
423 int nt =
hole2.mp.get_mg()->get_nt (l) ;
425 for (
int k=0 ; k<np ; k++)
426 for (
int j=0 ; j<nt ; j++)
427 for (
int i=0 ; i<nr ; i++) {
429 xabs = xabs_deux (l, k, j, i) ;
430 yabs = yabs_deux (l, k, j, i) ;
431 zabs = zabs_deux (l, k, j, i) ;
434 hole1.mp.convert_absolute
435 (xabs, yabs, zabs, air_un, theta,
phi) ;
436 hole2.mp.convert_absolute
437 (xabs, yabs, zabs, air_deux, theta,
phi) ;
439 if (air_deux <= lim_deux)
440 if (air_deux < int_deux)
441 decouple_deux.
set(l, k, j, i) = 1 ;
444 decouple_deux.
set(l, k, j, i) =
445 fonction_f_deux (l, k, j, i) ;
447 if (air_un <= lim_un)
449 decouple_deux.
set(l, k, j, i) = 0 ;
452 decouple_deux.
set(l, k, j, i) =
457 decouple_deux.
set(l, k, j, i) = 0.5 ;
462 for (
int k=0 ; k<np ; k++)
463 for (
int j=0 ; j<nt ; j++)
464 decouple_deux.
set(nz_deux-1, k, j, nr) = 0.5 ;
467 hole1.decouple = decouple_un ;
468 hole2.decouple = decouple_deux ;