Overture  Version 25
Macros | Functions
OGPolyFunction.C File Reference
#include "OGPolyFunction.h"
Include dependency graph for OGPolyFunction.C:

Macros

#define polyFunction   EXTERN_C_NAME(polyfunction)
 
#define polyEvaluate   EXTERN_C_NAME(polyevaluate)
 
#define X   coord(I[0],I[1],I[2],axis1)
 
#define Y   coord(I[0],I[1],I[2],axis2)
 
#define Z   coord(I[0],I[1],I[2],axis3)
 
#define EVAL(ndx, ndy, ndz, ndt, n, t)   real r;polyEvaluate(numberOfDimensions, r, x,y,z,n,t, cc.getLength(0),cc.getLength(1),cc.getLength(2), a.getLength(0),degreeX, degreeT,*a.getDataPointer(), *cc.getDataPointer(), ndx,ndy,ndz,ndt);return r;
 
#define GET_TIME(result)   switch (ntd) { case 0: /* result*=TIME(n,t); */ if( degreeT==0 ) result*=a(0,n); else if( degreeT==1 ) result*=a(0,n)+t*(a(1,n)); else if( degreeT==2 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n))); else if( degreeT==3 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)))); else if( degreeT==4 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)+t*(a(4,n))))); else if( degreeT==5 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)+t*(a(4,n)+t*(a(5,n)))))); else if( degreeT==6 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)+t*(a(4,n)+t*(a(5,n)+t*(a(6,n))))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 1: /* result*=a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n)))); */ if( degreeT==0 ) result*=0.; else if( degreeT==1 ) result*=a(1,n); else if( degreeT==2 ) result*=(a(1,n)+t*(2.*a(2,n))); else if( degreeT==3 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)))); else if( degreeT==4 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n))))); else if( degreeT==5 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n)+t*(5.*a(5,n)))))); else if( degreeT==6 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n)+t*(5.*a(5,n)+t*(6.*a(6,n))))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 2: /* result*=2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n))); */ if( degreeT==0 ) result*=0.; else if( degreeT==1 ) result*=0.; else if( degreeT==2 ) result*=(2.*a(2,n)); else if( degreeT==3 ) result*=(2.*a(2,n)+t*(6.*a(3,n))); else if( degreeT==4 ) result*=(2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n)))); else if( degreeT==5 ) result*=(2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n)+t*(20.*a(5,n))))); else if( degreeT==6 ) result*=(2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n)+t*(20.*a(5,n)+t*(30.*a(6,n)))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 3: /* result*=6.*a(3,n)+t*(24.*a(4,n)); */ if( degreeT<=2 ) result*=0.; else if( degreeT==3 ) result*=(6.*a(3,n)); else if( degreeT==4 ) result*=(6.*a(3,n)+t*(24.*a(4,n))); else if( degreeT==5 ) result*=(6.*a(3,n)+t*(24.*a(4,n)+t*(60.*a(5,n)))); else if( degreeT==6 ) result*=(6.*a(3,n)+t*(24.*a(4,n)+t*(60.*a(5,n)+t*(120.*a(6,n))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 4: /* result*=24.*a(4,n); */ if( degreeT<=3 ) result*=0.; else if( degreeT==4 ) result*=(24.*a(4,n)); else if( degreeT==5 ) result*=(24.*a(4,n)+t*(120.*a(5,n))); else if( degreeT==6 ) result*=(24.*a(4,n)+t*(120.*a(5,n)+t*(360.*a(6,n)))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 5: /* result*=24.*a(4,n); */ if( degreeT<=4 ) result*=0.; else if( degreeT==5 ) result*=(120.*a(5,n)); else if( degreeT==6 ) result*=(120.*a(5,n)+t*(720.*a(6,n))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 6: /* result*=24.*a(4,n); */ if( degreeT<=5 ) result*=0.; else if( degreeT==6 ) result*=(720.*a(6,n)); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; default: printf("OGPolyFunction:ERROR: gd\n"); Overture::abort("error"); }
 

Functions

void polyFunction (const int &nd, const int &ndra, const int &ndrb, const int &ndsa, const int &ndsb, const int &ndta, const int &ndtb, const int &ndrra, const int &ndrrb, const int &ndrsa, const int &ndrsb, const int &ndrta, const int &ndrtb, const int &ndrca, const int &ndrcb, const int &ndc1, const int &ndc2, const int &ndc3, const int &nra, const int &nrb, const int &nsa, const int &nsb, const int &nta, const int &ntb, const int &nca, const int &ncb, const int &nda, const int &degree, const int &degreeTime, const real &t, const real &a, const real &c, real &r, const real &xa, const real &ya, const real &za, const int &dx, const int &dy, const int &dz, const int &dt)
 
void polyEvaluate (const int &nd, real &r, const real &x, const real &y, const real &z, const int &n, const real &t, const int &ndc1, const int &ndc2, const int &ndc3, const int &nda, const int &degree, const int &degreeTime, const real &a, const real &c, const int &dx, const int &dy, const int &dz, const int &dt)
 

Macro Definition Documentation

#define EVAL (   ndx,
  ndy,
  ndz,
  ndt,
  n,
 
)    real r;polyEvaluate(numberOfDimensions, r, x,y,z,n,t, cc.getLength(0),cc.getLength(1),cc.getLength(2), a.getLength(0),degreeX, degreeT,*a.getDataPointer(), *cc.getDataPointer(), ndx,ndy,ndz,ndt);return r;
#define GET_TIME (   result)    switch (ntd) { case 0: /* result*=TIME(n,t); */ if( degreeT==0 ) result*=a(0,n); else if( degreeT==1 ) result*=a(0,n)+t*(a(1,n)); else if( degreeT==2 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n))); else if( degreeT==3 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)))); else if( degreeT==4 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)+t*(a(4,n))))); else if( degreeT==5 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)+t*(a(4,n)+t*(a(5,n)))))); else if( degreeT==6 ) result*=a(0,n)+t*(a(1,n)+t*(a(2,n)+t*(a(3,n)+t*(a(4,n)+t*(a(5,n)+t*(a(6,n))))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 1: /* result*=a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n)))); */ if( degreeT==0 ) result*=0.; else if( degreeT==1 ) result*=a(1,n); else if( degreeT==2 ) result*=(a(1,n)+t*(2.*a(2,n))); else if( degreeT==3 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)))); else if( degreeT==4 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n))))); else if( degreeT==5 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n)+t*(5.*a(5,n)))))); else if( degreeT==6 ) result*=(a(1,n)+t*(2.*a(2,n)+t*(3.*a(3,n)+t*(4.*a(4,n)+t*(5.*a(5,n)+t*(6.*a(6,n))))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 2: /* result*=2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n))); */ if( degreeT==0 ) result*=0.; else if( degreeT==1 ) result*=0.; else if( degreeT==2 ) result*=(2.*a(2,n)); else if( degreeT==3 ) result*=(2.*a(2,n)+t*(6.*a(3,n))); else if( degreeT==4 ) result*=(2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n)))); else if( degreeT==5 ) result*=(2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n)+t*(20.*a(5,n))))); else if( degreeT==6 ) result*=(2.*a(2,n)+t*(6.*a(3,n)+t*(12.*a(4,n)+t*(20.*a(5,n)+t*(30.*a(6,n)))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 3: /* result*=6.*a(3,n)+t*(24.*a(4,n)); */ if( degreeT<=2 ) result*=0.; else if( degreeT==3 ) result*=(6.*a(3,n)); else if( degreeT==4 ) result*=(6.*a(3,n)+t*(24.*a(4,n))); else if( degreeT==5 ) result*=(6.*a(3,n)+t*(24.*a(4,n)+t*(60.*a(5,n)))); else if( degreeT==6 ) result*=(6.*a(3,n)+t*(24.*a(4,n)+t*(60.*a(5,n)+t*(120.*a(6,n))))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 4: /* result*=24.*a(4,n); */ if( degreeT<=3 ) result*=0.; else if( degreeT==4 ) result*=(24.*a(4,n)); else if( degreeT==5 ) result*=(24.*a(4,n)+t*(120.*a(5,n))); else if( degreeT==6 ) result*=(24.*a(4,n)+t*(120.*a(5,n)+t*(360.*a(6,n)))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 5: /* result*=24.*a(4,n); */ if( degreeT<=4 ) result*=0.; else if( degreeT==5 ) result*=(120.*a(5,n)); else if( degreeT==6 ) result*=(120.*a(5,n)+t*(720.*a(6,n))); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; case 6: /* result*=24.*a(4,n); */ if( degreeT<=5 ) result*=0.; else if( degreeT==6 ) result*=(720.*a(6,n)); else { printf("ERROR invalid degreeTime\n"); Overture::abort("error"); } break; default: printf("OGPolyFunction:ERROR: gd\n"); Overture::abort("error"); }

Referenced by OGPolyFunction::gd().

#define polyEvaluate   EXTERN_C_NAME(polyevaluate)
#define polyFunction   EXTERN_C_NAME(polyfunction)
#define X   coord(I[0],I[1],I[2],axis1)
#define Y   coord(I[0],I[1],I[2],axis2)
#define Z   coord(I[0],I[1],I[2],axis3)

Function Documentation

void polyEvaluate ( const int &  nd,
real r,
const real x,
const real y,
const real z,
const int &  n,
const real t,
const int &  ndc1,
const int &  ndc2,
const int &  ndc3,
const int &  nda,
const int &  degree,
const int &  degreeTime,
const real a,
const real c,
const int &  dx,
const int &  dy,
const int &  dz,
const int &  dt 
)
void polyFunction ( const int &  nd,
const int &  ndra,
const int &  ndrb,
const int &  ndsa,
const int &  ndsb,
const int &  ndta,
const int &  ndtb,
const int &  ndrra,
const int &  ndrrb,
const int &  ndrsa,
const int &  ndrsb,
const int &  ndrta,
const int &  ndrtb,
const int &  ndrca,
const int &  ndrcb,
const int &  ndc1,
const int &  ndc2,
const int &  ndc3,
const int &  nra,
const int &  nrb,
const int &  nsa,
const int &  nsb,
const int &  nta,
const int &  ntb,
const int &  nca,
const int &  ncb,
const int &  nda,
const int &  degree,
const int &  degreeTime,
const real t,
const real a,
const real c,
real r,
const real xa,
const real ya,
const real za,
const int &  dx,
const int &  dy,
const int &  dz,
const int &  dt 
)