Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E    +1.E-1
         
#define RCA          RC6 
#define EV           RC4  
/* ------------------------------------ */       
/* ------------------------------------ */
void fun(void)
{                          
double a[RCA*(RCA*C2)] ={   
+2.547682339,+0.000000000, -0.152948221,-0.240121509, -0.155610012,-0.195690152, -0.298057299,-0.136017286, +0.269130276,-0.188132110, -0.030470880,+0.242003023, 
-0.152948221,+0.240121509, +2.509208904,-0.000000000, -0.155129068,+0.324099386, +0.216564361,-0.033484580, -0.042828351,-0.496677449, +0.294488953,+0.063493335, 
-0.155610012,+0.195690152, -0.155129068,-0.324099386, +2.260239854,-0.000000000, -0.143493743,+0.368327431, +0.532444321,-0.134971208, +0.126713301,-0.110092820, 
-0.298057299,+0.136017286, +0.216564361,+0.033484580, -0.143493743,-0.368327431, +2.122680989,+0.000000000, +0.151516032,+0.128430424, -0.310946484,-0.029309153, 
+0.269130276,+0.188132110, -0.042828351,+0.496677449, +0.532444321,+0.134971208, +0.151516032,-0.128430424, +2.282218238,-0.000000000, +0.206791187,+0.000458645, 
-0.030470880,-0.242003023, +0.294488953,-0.063493335, +0.126713301,+0.110092820, -0.310946484,+0.029309153, +0.206791187,-0.000458645, +2.277969677,+0.000000000  
}; 
                      
double **A        = ca_A_mZ(a,           i_mZ(RCA,RCA));
double **sA       = smul_mZ(FACTOR_E, A, i_mZ(RCA,RCA));
double **EValue   = eigs_mZ(         sA, i_mZ(RCA,RCA));
double **V        =                      i_mZ(RCA,RCA);

double **Ide      =  eye_mZ(             i_mZ(RCA,RCA));
double **zIde     =                      i_mZ(RCA,RCA);
double **sAmnszIde =                     i_mZ(RCA,RCA);

double **Ab       =            i_Abr_Ac_bc_mZ(RCA,RCA,C1);
double **b        =                      i_mZ(    RCA,C1);
double **Ab_free  =            i_Abr_Ac_bc_mZ(RCA,RCA,C3);
double  **b_free  =                      i_mZ(    RCA,C3);

  clrscrn();
  printf("A :"); 
  p_mZ(A, S9,P5, S8,P5, C4); 
  stop();

         zmul_mZ(i_Z(EValue[EV][C1],EValue[EV][C2]),Ide,zIde);           
        MmnsD_mZ(sA,zIde,sAmnszIde);
      
     c_A_b_Ab_mZ(sAmnszIde,b,Ab); 

  GJ_PP_FreeV_mZ(Ab,Ab_free,b_free);
    
          c_c_mZ(b_free,C2,V,EV); 
          c_c_mZ(b_free,C3,V,EV+C1); 
          
    Normalize_mZ(V);

  clrscrn();  
  printf("     zIde : EV%d * Ide",EV);                 p_mZ(zIde, S9,P5, S8,P5, C4);  
  stop();

  clrscrn(); 
  printf(" sAmnszIde : A - (EV%d*Ide)",EV);            p_mZ(sAmnszIde, S9,P5, S8,P5, C4); 
  stop();

  clrscrn();  
  printf("                 A        x  = b \n"
         "       Ab : [A-(EV%d*Ide)] V%d = 0 ",EV,EV); p_mZ(Ab, S9,P5, S8,P5, C4);  
  stop();

  clrscrn(); 
  printf("  Ab_free : [A-(EV%d*Ide)] V%d = 0 ",EV,EV); p_mZ(Ab_free, S9,P5, S8,P5, C4);  
  stop();

  clrscrn();  
  printf("   b_free :");                               p_mZ(b_free, S9,P5, S8,P5, C4); 
  stop();

  clrscrn();         
  printf("      V%d : Copy V%d into the last file",EV,EV);  P_mZ(V, S9,P9, S8,P9, C3);   
  stop();
              
  f_mZ(A);
  f_mZ(V);  
  f_mZ(EValue);
  
  f_mZ(Ide);

  f_mZ(sAmnszIde);
       
  f_mZ(sA);
  
  f_mZ(Ab);
  f_mZ(b);
  
  f_mZ(Ab_free);
  f_mZ(b_free);  
}
/* ------------------------------------ */
int main(void)
{
    fun();
    
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Calculer les vecteurs propres des deux valeurs propres identiques


Exemple de sortie écran :
A :
 +2.54768+0.00000i  -0.15295-0.24012i  -0.15561-0.19569i  -0.29806-0.13602i 
 -0.15295+0.24012i  +2.50921-0.00000i  -0.15513+0.32410i  +0.21656-0.03348i 
 -0.15561+0.19569i  -0.15513-0.32410i  +2.26024-0.00000i  -0.14349+0.36833i 
 -0.29806+0.13602i  +0.21656+0.03348i  -0.14349-0.36833i  +2.12268+0.00000i 
 +0.26913+0.18813i  -0.04283+0.49668i  +0.53244+0.13497i  +0.15152-0.12843i 
 -0.03047-0.24200i  +0.29449-0.06349i  +0.12671+0.11009i  -0.31095+0.02931i 

 +0.26913-0.18813i  -0.03047+0.24200i 
 -0.04283-0.49668i  +0.29449+0.06349i 
 +0.53244-0.13497i  +0.12671-0.11009i 
 +0.15152+0.12843i  -0.31095-0.02931i 
 +2.28222-0.00000i  +0.20679+0.00046i 
 +0.20679-0.00046i  +2.27797+0.00000i 

 Press return to continue. 


     zIde : EV4 * Ide
 +0.20000-0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.20000-0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.20000-0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.20000-0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 

 +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i 
 +0.20000-0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.20000-0.00000i 

 Press return to continue. 


 sAmnszIde : A - (EV4*Ide)
 +0.05477+0.00000i  -0.01529-0.02401i  -0.01556-0.01957i  -0.02981-0.01360i 
 -0.01529+0.02401i  +0.05092+0.00000i  -0.01551+0.03241i  +0.02166-0.00335i 
 -0.01556+0.01957i  -0.01551-0.03241i  +0.02602+0.00000i  -0.01435+0.03683i 
 -0.02981+0.01360i  +0.02166+0.00335i  -0.01435-0.03683i  +0.01227+0.00000i 
 +0.02691+0.01881i  -0.00428+0.04967i  +0.05324+0.01350i  +0.01515-0.01284i 
 -0.00305-0.02420i  +0.02945-0.00635i  +0.01267+0.01101i  -0.03109+0.00293i 

 +0.02691-0.01881i  -0.00305+0.02420i 
 -0.00428-0.04967i  +0.02945+0.00635i 
 +0.05324-0.01350i  +0.01267-0.01101i 
 +0.01515+0.01284i  -0.03109-0.00293i 
 +0.02822+0.00000i  +0.02068+0.00005i 
 +0.02068-0.00005i  +0.02780+0.00000i 

 Press return to continue. 


                 A        x  = b 
       Ab : [A-(EV4*Ide)] V4 = 0 
 +1.00000+0.00000i  -0.27926-0.43843i  -0.28412-0.35731i  -0.54422-0.24835i 
 +0.00000-0.00000i  +1.00000+0.00000i  +0.36345-0.83919i  +0.03265-0.37903i 
 +0.00000-0.00000i  -0.00000-0.00000i  +1.00000+0.00000i  +0.17131-0.20772i 
 +0.00000-0.00000i  -0.00000+0.00000i  +0.00000+0.00000i  +1.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000-0.00000i  +0.00000+0.00000i  +0.00000-0.00000i 

 +0.49140-0.34351i  -0.05564+0.44187i  +0.00000+0.00000i 
 -0.00956-0.12719i  -0.19511-0.44230i  +0.00000-0.00000i 
 -0.64911+0.49393i  +0.00457-0.72480i  +0.00000-0.00000i 
 -1.86373-1.03263i  -0.00448-0.80658i  +0.00000-0.00000i 
 -0.00000+0.00000i  -0.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000-0.00000i  +0.00000+0.00000i 

 Press return to continue. 


  Ab_free : [A-(EV4*Ide)] V4 = 0 
 +1.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  -0.00000-0.00000i 
 +0.00000+0.00000i  +1.00000+0.00000i  +0.00000+0.00000i  -0.00000-0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +1.00000+0.00000i  +0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +1.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  -0.00000+0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 

 +0.00000-0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  -0.10663+1.50006i 
 +0.00000-0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  -0.24653+0.99979i 
 -0.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +0.11533-0.28370i 
 +0.00000-0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +1.86373+1.03263i 
 +1.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i  +1.00000+0.00000i 
 +0.00000+0.00000i  +1.00000+0.00000i  +0.00000+0.00000i  +0.00000+0.00000i 

 -0.57826-0.11734i 
 -0.54100+0.05904i 
 -0.17288+0.58755i 
 +0.00448+0.80658i 
 +0.00000-0.00000i 
 +1.00000+0.00000i 

 Press return to continue. 


   b_free :
 +0.00000+0.00000i  -0.10663+1.50006i  -0.57826-0.11734i 
 +0.00000+0.00000i  -0.24653+0.99979i  -0.54100+0.05904i 
 +0.00000+0.00000i  +0.11533-0.28370i  -0.17288+0.58755i 
 +0.00000+0.00000i  +1.86373+1.03263i  +0.00448+0.80658i 
 +0.00000+0.00000i  +1.00000+0.00000i  +0.00000-0.00000i 
 +0.00000+0.00000i  +0.00000+0.00000i  +1.00000+0.00000i 

 Press return to continue. 


      V4 : Copy V4 into the last file
     -nan,    -nan,      -nan,    -nan,      -nan,    -nan, 
     -nan,    -nan,      -nan,    -nan,      -nan,    -nan, 
     -nan,    -nan,      -nan,    -nan,      -nan,    -nan, 
     -nan,    -nan,      -nan,    -nan,      -nan,    -nan, 
     -nan,    -nan,      -nan,    -nan,      -nan,    -nan, 
     -nan,    -nan,      -nan,    -nan,      -nan,    -nan  

-0.035632010,+0.501260535, -0.353889608,-0.071809365,      -nan,    -nan, 
-0.082379706,+0.334090099, -0.331083544,+0.036132621,      -nan,    -nan, 
+0.038538669,-0.094800033, -0.105801002,+0.359575937,      -nan,    -nan, 
+0.622785543,+0.345062820, +0.002742500,+0.493616159,      -nan,    -nan, 
+0.334160392,+0.000000000, +0.000000000,-0.000000000,      -nan,    -nan, 
+0.000000000,+0.000000000, +0.611989004,+0.000000000,      -nan,    -nan  

 Press return to continue.