24 char binhor_kij_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_hor/binhor_kij.C,v 1.11 2014/10/13 08:52:42 j_novak Exp $" ;
84 #include "utilitaires.h"
96 for (
int k=0; k<nnp; k++)
97 for (
int j=0; j<nnt; j++){
121 for (
int i=1 ; i<=3 ; i++)
122 for (
int j=i ; j<=3 ; j++) {
123 if (aa_auto_un(i,j).get_etat() != ETATZERO)
125 if (aa_auto_deux(i,j).get_etat() != ETATZERO)
151 for (
int i=1 ; i<=3 ; i++)
152 for (
int j=i ; j<=3 ; j++) {
153 aa_comp_un.
set(i, j).
import(aa_auto_deux(i, j)) ;
155 get_spectral_va().get_base()) ;
165 for (
int i=1 ; i<=3 ; i++)
166 for (
int j=i ; j<=3 ; j++) {
167 aa_comp_deux.
set(i, j).
import(aa_auto_un(i, j)) ;
169 get_spectral_va().get_base()) ;
224 for (
int i=1 ; i<=3 ; i++)
225 for (
int j=1 ; j<=3 ; j++) {
226 if (aa_auto_un(i,j).get_etat() != ETATZERO)
228 if (aa_auto_deux(i,j).get_etat() != ETATZERO)
248 aa_comp_un.
set(1, 1).
import(aa_auto_2(1, 1)) ;
249 aa_comp_un.
set(1, 2).
import(aa_auto_2(1, 2)) ;
250 aa_comp_un.
set(1, 3).
import(aa_auto_2(1, 3)) ;
251 aa_comp_un.
set(2, 2).
import(aa_auto_2(2, 2)) ;
252 aa_comp_un.
set(2, 3).
import(aa_auto_2(2, 3)) ;
253 aa_comp_un.
set(3, 3).
import(aa_auto_2(3, 3)) ;
261 aa_comp_deux.
set(1, 1).
import(aa_auto_1(1, 1)) ;
262 aa_comp_deux.
set(1, 2).
import(aa_auto_1(1, 2)) ;
263 aa_comp_deux.
set(1, 3).
import(aa_auto_1(1, 3)) ;
264 aa_comp_deux.
set(2, 2).
import(aa_auto_1(2, 2)) ;
265 aa_comp_deux.
set(2, 3).
import(aa_auto_1(2, 3)) ;
266 aa_comp_deux.
set(3, 3).
import(aa_auto_1(3, 3)) ;
274 aa_tot_un = aa_auto_un + aa_comp_un ;
275 aa_tot_deux = aa_auto_deux + aa_comp_deux ;
293 ntot_un = division_xpun (ntot_un, 0) ;
297 ntot_deux = division_xpun (ntot_deux, 0) ;
302 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
304 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
305 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
309 for (
int lig = 1 ; lig<=3 ; lig++)
310 for (
int col = lig ; col<=3 ; col++) {
318 if (same_orient == 1)
322 Scalar auxi_un (aa_tot_un(lig, col)/2.) ;
324 auxi_un = division_xpun (auxi_un, 0) ;
325 auxi_un = auxi_un / ntot_un ;
330 Scalar auxi_deux (aa_tot_deux(lig, col)/2.) ;
332 auxi_deux = division_xpun (auxi_deux, 0) ;
333 auxi_deux = auxi_deux / ntot_deux ;
334 if (auxi_deux.
get_etat() != ETATZERO)
338 Scalar copie_un (aa_tot_un(lig, col)) ;
341 Scalar copie_deux (aa_tot_deux(lig, col)) ;
355 double xabs, yabs, zabs, air, theta, phi ;
357 if (auxi_un.
get_etat() != ETATZERO){
359 for (
int l=2 ; l<nz_un ; l++) {
369 for (
int k=0 ; k<np ; k++)
370 for (
int j=0 ; j<nt ; j++)
371 for (
int i=0 ; i<nr ; i++) {
373 xabs = xabs_un (l, k, j, i) ;
374 yabs = yabs_un (l, k, j, i) ;
375 zabs = zabs_un (l, k, j, i) ;
379 (xabs, yabs, zabs, air, theta, phi) ;
389 ind * auxi_deux.
val_point (air, theta, phi) ;
395 for (
int k=0 ; k<np ; k++)
396 for (
int j=0 ; j<nt ; j++)
401 if (auxi_deux.
get_etat() != ETATZERO){
403 for (
int l=2 ; l<nz_deux ; l++) {
413 for (
int k=0 ; k<np ; k++)
414 for (
int j=0 ; j<nt ; j++)
415 for (
int i=0 ; i<nr ; i++) {
417 xabs = xabs_deux (l, k, j, i) ;
418 yabs = yabs_deux (l, k, j, i) ;
419 zabs = zabs_deux (l, k, j, i) ;
423 (xabs, yabs, zabs, air, theta, phi) ;
433 ind * auxi_un.
val_point (air, theta, phi) ;
437 for (
int k=0 ; k<np ; k++)
438 for (
int j=0 ; j<nt ; j++)
446 aa_un.
set(lig, col) = auxi_un ;
447 aa_deux.
set(lig, col) = auxi_deux ;
459 for (
int lig=1 ; lig<=3 ; lig++)
460 for (
int col=lig ; col<=3 ; col++) {
480 double lim_un = distance/2. ;
481 double lim_deux = distance/2. ;
482 double int_un = distance/6. ;
483 double int_deux = distance/6. ;
487 fonction_f_un = 0.5*
pow(
488 cos((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.)+0.5 ;
492 fonction_g_un = 0.5*
pow
493 (
sin((
hole1.
mp.
r-int_un)*M_PI/2./(lim_un-int_un)), 2.) ;
497 fonction_f_deux = 0.5*
pow(
498 cos((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_deux-int_deux)), 2.)+0.5 ;
502 fonction_g_deux = 0.5*
pow(
503 sin((
hole2.
mp.
r-int_deux)*M_PI/2./(lim_un-int_deux)), 2.) ;
520 double xabs, yabs, zabs, air_un, air_deux, theta, phi ;
522 for (
int l=0 ; l<nz_un ; l++) {
531 for (
int k=0 ; k<np ; k++)
532 for (
int j=0 ; j<nt ; j++)
533 for (
int i=0 ; i<nr ; i++) {
535 xabs = xabs_un (l, k, j, i) ;
536 yabs = yabs_un (l, k, j, i) ;
537 zabs = zabs_un (l, k, j, i) ;
541 (xabs, yabs, zabs, air_un, theta, phi) ;
543 (xabs, yabs, zabs, air_deux, theta, phi) ;
545 if (air_un <= lim_un)
553 if (air_deux <= lim_deux)
554 if (air_deux < int_deux)
559 fonction_g_deux.
val_point (air_deux, theta, phi) ;
568 for (
int k=0 ; k<np ; k++)
569 for (
int j=0 ; j<nt ; j++)
573 for (
int l=0 ; l<nz_deux ; l++) {
582 for (
int k=0 ; k<np ; k++)
583 for (
int j=0 ; j<nt ; j++)
584 for (
int i=0 ; i<nr ; i++) {
586 xabs = xabs_deux (l, k, j, i) ;
587 yabs = yabs_deux (l, k, j, i) ;
588 zabs = zabs_deux (l, k, j, i) ;
592 (xabs, yabs, zabs, air_un, theta, phi) ;
594 (xabs, yabs, zabs, air_deux, theta, phi) ;
596 if (air_deux <= lim_deux)
597 if (air_deux < int_deux)
604 if (air_un <= lim_un)
610 fonction_g_un.
val_point (air_un, theta, phi) ;
619 for (
int k=0 ; k<np ; k++)
620 for (
int j=0 ; j<nt ; j++)