Sommaire


Installer ce fichier dans votre répertoire de travail.

x_jvuw.h
/* --------------------------------- */
/* save as x_jvuw.h                  */
/* --------------------------------- */
double J_y_vuw(
double (*P_f)(double x, double y, double z),

double (*P_X)(double x, double y, double z),
double (*P_Y)(double x, double y, double z),
double (*P_Z)(double x, double y, double z),

double (*Puy)(double x, double z),
double (*Pvy)(double x, double z),
   int   ny,

double x,

double z
)
{
pt3d   p;

double y = 0;

   int i = 0;
double m = 0.;
double M = 0.;

 for(i = 0; i <= ny; i++)
 {
       if(i ==0 || i== ny){m = 1.;}
  else if(fmod(i,2) == 0){m = 2.;}
  else                   {m = 4.;}
  
  y = ((*Puy)(x,z)) + i*(((*Pvy)(x,z))-((*Puy)(x,z)))/ny;
  
  p.x = x;
  p.y = y;   
  p.z = z;    
     
  M += m * (*P_f)( ((*P_X)(x,y,z)), 
                   ((*P_Y)(x,y,z)), 
                   ((*P_Z)(x,y,z)))
                          *
                   /* Jacobian */   
                      
                    fabs(
                    
              fxyz_x((*P_X),H,p) 
                       * 
   ( fxyz_y((*P_Y),H,p)*fxyz_z((*P_Z),H,p)
                       -
     fxyz_z((*P_Y),H,p)*fxyz_y((*P_Z),H,p) ) 
     
                       - 
                                       
              fxyz_y((*P_X),H,p) 
                       * 
   ( fxyz_x((*P_Y),H,p)*fxyz_z((*P_Z),H,p)
                       -
     fxyz_z((*P_Y),H,p)*fxyz_x((*P_Z),H,p) )
     
                       + 
                                       
              fxyz_z((*P_X),H,p) 
                       * 
   ( fxyz_x((*P_Y),H,p)*fxyz_y((*P_Z),H,p)
                       -
     fxyz_y((*P_Y),H,p)*fxyz_x((*P_Z),H,p) )
                        );   
 }

  return( ((((*Pvy)(x,z)) -((*Puy)(x,z)))*M) / (3*ny) );
}
/* --------------------------------- */
double J_x_vuw(
double (*P_f)(double x, double y, double z),

double (*P_X)(double x, double y, double z),
double (*P_Y)(double x, double y, double z),
double (*P_Z)(double x, double y, double z),
   
double (*Puy)(double x, double z),
double (*Pvy)(double x, double z),
   int   ny,

double (*Psx)(double z),
double (*Ptx)(double z),
   int   nx,

double z
)
{
   int i = 0;
double m = 0.;
double M = 0.;

 for(i = 0; i <= nx; i++)
 {
       if(i ==0 || i== nx){m = 1.;}
  else if(fmod(i,2) == 0){m = 2.;}
  else                   {m = 4.;}

  M += m * J_y_vuw( (*P_f),
                    (*P_X),(*P_Y),(*P_Z),                            
                    (*Puy),(*Pvy),ny,                                
                    (((*Psx)(z))+i*(((*Ptx)(z))-((*Psx)(z)))/nx),
                             z);
 }

 return( ((((*Ptx)(z)) -((*Psx)(z)))*M) / (3*nx) );
}
/* --------------------------------- */
double J_vuw(
double (*P_f)(double x, double y, double z),

double (*P_X)(double x, double y, double z),
double (*P_Y)(double x, double y, double z),
double (*P_Z)(double x, double y, double z),
   
double (*Puy)(double x, double z),
double (*Pvy)(double x, double z),
   int   ny,
   
double (*Psx)(double x),
double (*Ptx)(double x),
   int   nx,

double az,
double bz,
   int nz
)
{
   int i = 0;
double m = 0.;
double M = 0.;

 for(i = 0; i <= nz; i++)
 {
       if(i ==0 || i== nz){m = 1.;}
  else if(fmod(i,2) == 0){m = 2.;}
  else                   {m = 4.;}

  M += m * J_x_vuw( (*P_f),
                    (*P_X),(*P_Y),(*P_Z),                               
                    (*Puy),(*Pvy),ny,
                    (*Psx),(*Ptx),nx, 
                    (az+i*(bz-az)/nz));
 }

  return( ((bz -az)*M) / (3*nz) );
}
/* --------------------------------- */
/* --------------------------------- */


----