93 hole1.tkij_tot.set_etat_qcq() ;
94 hole2.tkij_tot.set_etat_qcq() ;
98 hole1.fait_taij_auto () ;
99 hole2.fait_taij_auto () ;
102 hole1.taij_comp.set_etat_qcq() ;
103 hole2.taij_comp.set_etat_qcq() ;
112 double orientation_un =
hole1.taij_auto.get_mp()->get_rot_phi() ;
113 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
114 double orientation_deux =
hole2.taij_auto.get_mp()->get_rot_phi() ;
115 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
116 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
119 if (
hole2.taij_auto.get_etat() == ETATZERO)
120 hole1.taij_comp.set_etat_zero() ;
122 hole1.taij_comp.set(0, 0).import_asymy(sans_dz_deux(0, 0)) ;
123 hole1.taij_comp.set(0, 1).import_symy(sans_dz_deux(0, 1)) ;
124 hole1.taij_comp.set(0, 2).import_asymy(same_orient*sans_dz_deux(0, 2)) ;
125 hole1.taij_comp.set(1, 1).import_asymy(sans_dz_deux(1, 1)) ;
126 hole1.taij_comp.set(1, 2).import_symy(same_orient*sans_dz_deux(1, 2)) ;
127 hole1.taij_comp.set(2, 2).import_asymy(sans_dz_deux(2, 2)) ;
130 if (
hole1.taij_auto.get_etat() == ETATZERO)
131 hole2.taij_comp.set_etat_zero() ;
133 hole2.taij_comp.set(0, 0).import_asymy(sans_dz_un(0, 0)) ;
134 hole2.taij_comp.set(0, 1).import_symy(sans_dz_un(0, 1)) ;
135 hole2.taij_comp.set(0, 2).import_asymy(same_orient*sans_dz_un(0, 2)) ;
136 hole2.taij_comp.set(1, 1).import_asymy(sans_dz_un(1, 1)) ;
137 hole2.taij_comp.set(1, 2).import_symy(same_orient*sans_dz_un(1, 2)) ;
138 hole2.taij_comp.set(2, 2).import_asymy(sans_dz_un(2, 2)) ;
141 hole1.taij_comp.set_std_base() ;
142 hole2.taij_comp.set_std_base() ;
143 hole1.taij_comp.inc2_dzpuis() ;
144 hole2.taij_comp.inc2_dzpuis() ;
150 if ((
hole1.taij_tot.get_etat() == ETATZERO) &&
151 (
hole2.taij_tot.get_etat() == ETATZERO)) {
153 hole1.tkij_tot.set_etat_zero() ;
154 hole1.tkij_auto.set_etat_zero() ;
155 hole2.tkij_tot.set_etat_zero() ;
156 hole2.tkij_auto.set_etat_zero() ;
159 int nz_un =
hole1.mp.get_mg()->get_nzone() ;
160 int nz_deux =
hole2.mp.get_mg()->get_nzone() ;
163 ntot_un = division_xpun (ntot_un, 0) ;
167 ntot_deux = division_xpun (ntot_deux, 0) ;
171 for (
int lig = 0 ; lig<3 ; lig++)
172 for (
int col = lig ; col<3 ; col++) {
180 if (same_orient == 1)
184 Cmp auxi_un (
hole1.taij_tot(lig, col)/2.) ;
186 auxi_un = division_xpun (auxi_un, 0) ;
187 auxi_un = auxi_un / ntot_un ;
191 Cmp auxi_deux (
hole2.taij_tot(lig, col)/2.) ;
193 auxi_deux = division_xpun (auxi_deux, 0) ;
194 auxi_deux = auxi_deux / ntot_deux ;
198 Cmp copie_un (
hole1.taij_tot(lig, col)) ;
201 Cmp copie_deux (
hole2.taij_tot(lig, col)) ;
205 double lim_un =
hole1.mp.get_alpha()[1] +
hole1.mp.get_beta()[1] ;
206 double lim_deux =
hole2.mp.get_alpha()[1] +
hole2.mp.get_beta()[1] ;
216 double xabs, yabs, zabs, air, theta,
phi ;
219 for (
int l=2 ; l<nz_un ; l++) {
221 int nr =
hole1.mp.get_mg()->get_nr (l) ;
226 int np =
hole1.mp.get_mg()->get_np (l) ;
227 int nt =
hole1.mp.get_mg()->get_nt (l) ;
229 for (
int k=0 ; k<np ; k++)
230 for (
int j=0 ; j<nt ; j++)
231 for (
int i=0 ; i<nr ; i++) {
233 xabs = xabs_un (l, k, j, i) ;
234 yabs = yabs_un (l, k, j, i) ;
235 zabs = zabs_un (l, k, j, i) ;
238 hole2.mp.convert_absolute
239 (xabs, yabs, zabs, air, theta,
phi) ;
243 auxi_un.
set(l, k, j, i) =
244 copie_un(l, k, j, i) / ntot_un (l, k, j, i)/2. ;
247 auxi_un.
set(l, k, j, i) =
253 for (
int k=0 ; k<np ; k++)
254 for (
int j=0 ; j<nt ; j++)
255 auxi_un.
set(nz_un-1, k, j, nr-1) = 0 ;
259 for (
int l=2 ; l<nz_deux ; l++) {
261 int nr =
hole2.mp.get_mg()->get_nr (l) ;
266 int np =
hole2.mp.get_mg()->get_np (l) ;
267 int nt =
hole2.mp.get_mg()->get_nt (l) ;
269 for (
int k=0 ; k<np ; k++)
270 for (
int j=0 ; j<nt ; j++)
271 for (
int i=0 ; i<nr ; i++) {
273 xabs = xabs_deux (l, k, j, i) ;
274 yabs = yabs_deux (l, k, j, i) ;
275 zabs = zabs_deux (l, k, j, i) ;
278 hole1.mp.convert_absolute
279 (xabs, yabs, zabs, air, theta,
phi) ;
283 auxi_deux.
set(l, k, j, i) =
284 copie_deux(l, k, j, i) / ntot_deux (l, k, j, i) /2.;
287 auxi_deux.
set(l, k, j, i) =
292 for (
int k=0 ; k<np ; k++)
293 for (
int j=0 ; j<nt ; j++)
294 auxi_deux.
set(nz_deux-1, k, j, nr-1) = 0 ;
300 hole1.tkij_tot.set(lig, col) = auxi_un ;
301 hole2.tkij_tot.set(lig, col) = auxi_deux ;
304 hole1.tkij_auto.set_etat_qcq() ;
305 hole2.tkij_auto.set_etat_qcq() ;
307 for (
int lig=0 ; lig<3 ; lig++)
308 for (
int col=lig ; col<3 ; col++) {
309 hole1.tkij_auto.set(lig, col) =
hole1.tkij_tot(lig, col)*
311 hole2.tkij_auto.set(lig, col) =
hole2.tkij_tot(lig, col)*
319 int nz_un =
hole1.mp.get_mg()->get_nzone() ;
320 int nz_deux =
hole2.mp.get_mg()->get_nzone() ;
323 double distance =
hole1.mp.get_ori_x() -
hole2.mp.get_ori_x() ;
324 double lim_un = distance/2. ;
325 double lim_deux = distance/2. ;
326 double int_un = distance/6. ;
327 double int_deux = distance/6. ;
331 fonction_f_un = 0.5*
pow(
332 cos((
hole1.mp.r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
336 fonction_g_un = 0.5*
pow
337 (
sin((
hole1.mp.r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
341 fonction_f_deux = 0.5*
pow(
342 cos((
hole2.mp.r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
346 fonction_g_deux = 0.5*
pow(
347 sin((
hole2.mp.r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
364 double xabs, yabs, zabs, air_un, air_deux, theta,
phi ;
367 for (
int l=0 ; l<nz_un ; l++) {
368 int nr =
hole1.mp.get_mg()->get_nr (l) ;
373 int np =
hole1.mp.get_mg()->get_np (l) ;
374 int nt =
hole1.mp.get_mg()->get_nt (l) ;
376 for (
int k=0 ; k<np ; k++)
377 for (
int j=0 ; j<nt ; j++)
378 for (
int i=0 ; i<nr ; i++) {
380 xabs = xabs_un (l, k, j, i) ;
381 yabs = yabs_un (l, k, j, i) ;
382 zabs = zabs_un (l, k, j, i) ;
385 hole1.mp.convert_absolute
386 (xabs, yabs, zabs, air_un, theta,
phi) ;
387 hole2.mp.convert_absolute
388 (xabs, yabs, zabs, air_deux, theta,
phi) ;
390 if (air_un <= lim_un)
392 decouple_un.
set(l, k, j, i) = 1 ;
395 decouple_un.
set(l, k, j, i) =
396 fonction_f_un (l, k, j, i) ;
398 if (air_deux <= lim_deux)
399 if (air_deux < int_deux)
400 decouple_un.
set(l, k, j, i) = 0 ;
403 decouple_un.
set(l, k, j, i) =
408 decouple_un.
set(l, k, j, i) = 0.5 ;
413 for (
int k=0 ; k<np ; k++)
414 for (
int j=0 ; j<nt ; j++)
415 decouple_un.
set(nz_un-1, k, j, nr) = 0.5 ;
418 for (
int l=0 ; l<nz_deux ; l++) {
420 int nr =
hole2.mp.get_mg()->get_nr (l) ;
425 int np =
hole2.mp.get_mg()->get_np (l) ;
426 int nt =
hole2.mp.get_mg()->get_nt (l) ;
428 for (
int k=0 ; k<np ; k++)
429 for (
int j=0 ; j<nt ; j++)
430 for (
int i=0 ; i<nr ; i++) {
432 xabs = xabs_deux (l, k, j, i) ;
433 yabs = yabs_deux (l, k, j, i) ;
434 zabs = zabs_deux (l, k, j, i) ;
437 hole1.mp.convert_absolute
438 (xabs, yabs, zabs, air_un, theta,
phi) ;
439 hole2.mp.convert_absolute
440 (xabs, yabs, zabs, air_deux, theta,
phi) ;
442 if (air_deux <= lim_deux)
443 if (air_deux < int_deux)
444 decouple_deux.
set(l, k, j, i) = 1 ;
447 decouple_deux.
set(l, k, j, i) =
448 fonction_f_deux (l, k, j, i) ;
450 if (air_un <= lim_un)
452 decouple_deux.
set(l, k, j, i) = 0 ;
455 decouple_deux.
set(l, k, j, i) =
460 decouple_deux.
set(l, k, j, i) = 0.5 ;
465 for (
int k=0 ; k<np ; k++)
466 for (
int j=0 ; j<nt ; j++)
467 decouple_deux.
set(nz_deux-1, k, j, nr) = 0.5 ;
470 hole1.decouple = decouple_un ;
471 hole2.decouple = decouple_deux ;