Mathc initiation/Fichiers h : c60aa


Sommaire


Installer ce fichier dans votre répertoire de travail.

Crystal Clear mimetype source h.png x_surfzy.h
/* ---------------------------------- */
/* save as x_surfzy.h                 */
/* ---------------------------------- */
double   sint_dzy(
double (*P_g)(double x, double y, double z),

double (*P_k)(double y, double z),

double (*P_u)(double z),
double (*P_v)(double z),
   int nz,
   
double y,

double h
)
{
p2d p;

   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.;}

        p.y = ((*P_u)(y)) + i*(((*P_v)(y))-((*P_u)(y)))/nz;
        p.x = y;


  M += m * (       (*P_g)((*P_k)(p.x,p.y),p.x,p.y) *
                    sqrt( pow(fxy_x((*P_k),h,p),2) +
                          pow(fxy_y((*P_k),h,p),2) +
                          1));
 }

  return( ((((*P_v)(y)) -((*P_u)(y)))*M) / (3*nz) );
}
/* ---------------------------------- */
double surface_dzdy(
double (*P_g)(double x, double y, double z),

double (*P_k)(double y, double z),

double (*P_u)(double y),
double (*P_v)(double y),
   int nz,

double ay,
double by,
   int ny,

double h
)
{
   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.;}

  M += m *              sint_dzy( (*P_g),(*P_k),
                                  (*P_u),(*P_v),
                                    nz,
                                   (ay + i*(by-ay)/ny),
                                    h);
 }

  return( ((by -ay)*M) / (3*ny) );
}
/* ---------------------------------- */
/* ---------------------------------- */


Déclaration des fichiers h.