eg1hprivated.h

Go to the documentation of this file.
00001 
00002 /* ///////////////////////////////////////////////////////////////////////// */
00003 /* This file is a part of the BSTools package                                */
00004 /* written by Przemyslaw Kiciak                                              */
00005 /* ///////////////////////////////////////////////////////////////////////// */
00006 /* (C) Copyright by Przemyslaw Kiciak, 2005, 2008                            */
00007 /* this package is distributed under the terms of the                        */
00008 /* Lesser GNU Public License, see the file COPYING.LIB                       */
00009 /* ///////////////////////////////////////////////////////////////////////// */
00010 
00011 /* this header file is private for g1hole library functions; */
00012 /* it is NOT intended to be #included in application source files */
00013 
00014 #ifndef EG1HPRIVATED_H
00015 #define EG1HPRIVATED_H
00016 
00017 #ifndef EGHPRIVATED_H
00018 #include "eghprivated.h"
00019 #endif
00020 
00021 /* degrees of polynomial junction functions */
00022 #define G1_BF01DEG 2
00023 #define G1_CG01DEG 1
00024 #define G1_BF11DEG 3
00025 #define G1_CG11DEG 2
00026 
00027 /* degrees of patch cross derivatives */
00028 #define G1_CROSS00DEG 4
00029 #define G1_CROSS01DEG 5
00030 #define G1_CROSS10DEG 3
00031 #define G1_CROSS11DEG 5
00032 
00033 /* degree of the final patches - the greatest of the above four */
00034 /* #define G1H_FINALDEG  5 - this is #defined in g1holef.h */
00035 
00036 #define G1_CROSSDEGSUM \
00037         (G1_CROSS00DEG+G1_CROSS01DEG+G1_CROSS10DEG+G1_CROSS11DEG)
00038 
00039 /* the following number is relevant for spline bases */
00040 #define G1_AUXDEG0 (G1_CROSS01DEG-G1H_OMCDEG+1)
00041 
00042 /* angle tolerances for partition analysis */
00043 #define MIN_DELTA (PI/180.0)       /*   1 degree  */
00044 #define MAX_DELTA (179.0*PI/180.0) /* 179 degrees */
00045 #define ANGLETOL (0.001*PI/180)    /* 0.001 degree */
00046 
00047 /* the #definitions below are for the construction with */
00048 /* the extended basis */
00049 #define G1_DBDIM 4    /* diagonal block dimension, 2*2 */
00050 #define G1_DIAGBLSIZE (G1_DBDIM*(G1_DBDIM+1)/2)
00051 
00052 
00053 /* number of quadrature knots */
00054 #define G1_NQUAD 16
00055 #define G1_NQUADSQ (G1_NQUAD*G1_NQUAD)
00056 #define G1_QUAD_FACTOR 10  /* for integration of spline basis functions */
00057 
00058 
00059 /* ////////////////////////////////////////////////////////////////////////// */
00060 /* private data of the construction procedures */
00061 typedef struct G1HolePrivateRecd {
00062     int      hole_m;
00063     int      nfunc_a,   /* number of "inner" basis functions */
00064              nfunc_b;   /* number of "outer" basis functions */
00065     char     opt_cp, opt_der1, opt_basis, opt_quad;  /* recorded options */
00066     vector2d *omcbc;    /* boundary conditions for auxiliary patches */
00067     vector2d *omc;      /* auxiliary patches representation */
00068     double   *jfunc;    /* coefficients of junction functions */
00069     vector2d *dicross;  /* curves describing cross derivatives */
00070                         /* of the domain patches */
00071     double   *AuxiMat;  /* matrices of transformations of derivatives */
00072                         /* for composing functions with domain patches */
00073     double   *basis_a,  /* Coons representations of "inner" basis functions */
00074              *basis_b;  /* Coons represetnationf of "outer" basis functions */
00075     unsigned char spdimen[2];   /* numbers of "inner" basis functions: */
00076                                 /* "half polynomial" and "splines" of degree 2 */
00077     double   *partition;        /* partition of the full angle */
00078     GHoleSgnPartd *spartition;  /* sorted partition, having hole_k-hole_m */
00079                                 /* elements */
00080     double   spart_alpha0;      /* sorted partition bisectrix */
00081     double   *Amat, *Bmat;      /* matrices of scalar products */
00082                                 /* of basis functions */
00083     double   *Lmat;             /* decomposition factor L:  A=LL^T */
00084     double   *EAmat, *EBmat;    /* matrices for the extended basis */
00085     double   *ELmat;            /* decomposition factor for the */
00086                                 /* extended matrix */
00087 
00088     int      nconstr;           /* number of constraint equations */
00089     double   *Cmat, *RCmat;     /* matrices of constraint equations */
00090     int      naconstr, acdim;
00091     double   *ACmat, *ARCmat;
00092     int      extnconstr;        /* number of constraints and */
00093     double   *ECmat, *ERCmat;   /* matrices of constraint equations for */
00094                                 /* the extended matrix */
00095     int      extnaconstr, extacdim;
00096     double   *AECmat, *AERCmat;
00097 
00098     double   *BBmat;            /* matrix of scalar products, for */
00099                                 /* evaluation of the functional */
00100 
00101                               /* private data for the quasi G2 constructions */
00102     double    C1b;                 /* constant in the definition of the form */
00103     double    *Q2AMat, *Q2BMat;    /* form matrices */
00104     double    *Q2LMat;
00105     double    *Q2RCMat, *Q2ARCMat; /* constraints */
00106 
00107     double    C1e;                 /* constant in the definition of the form */
00108     double    *Q2EAMat, *Q2EBMat;  /* form matrices for the extended basis */
00109     double    *Q2ELMat;
00110     double    *Q2ERCMat, *Q2AERCMat; /* constraints */
00111     int (*GetOption)( GHoleDomaind *domain, int query, int qn,
00112                       int *ndata, int **idata, double **fdata );
00113   } G1HolePrivateRecd;
00114 
00115 
00116 /* private data for the spline basis construction */
00117 typedef struct G1HoleSPrivateRecd {
00118     int    nk, m1, m2;   /* parameters, which determine the space dimension */
00119     int    nsfunc_c, nsfunc_d;
00120                        /* numbers of basis functions of various kinds */
00121     int    csize, dsize; /* sizes of the blocks in the form matrix */
00122     int    lastbezknot;
00123     double bezknots[2*(G1H_FINALDEG+1)];  /* knots for Bezier polynomials */
00124     int    lastomcknot;
00125     double *omcknots;  /* knots of basis function auxiliary patches */
00126     int    lastpvknot;
00127     double *pvknots;
00128                       /* knots of the basis functions of the D block */
00129     int    lastcknot;
00130     double *cknots;    /* knots of the basis functions of the C block */
00131     double *basis_d;   /* Coons representations of basis functions */   
00132 
00133     int    lastfpknot;
00134     double *fpknots;   /* knots of the final patches */
00135     double *SAMat, *SBMat;  /* form matrices for the spline basis */
00136     double *SLMat;          /* A=LL^T decomposition factor */
00137 
00138     int    splnconstr; /* number of constraints */
00139     double *SCmat, *SRCmat; /* matrices of constraint equations */
00140     int    splnaconstr, splacdim;
00141     double *ASCmat, *ASRCmat;
00142 
00143 /* private data for the quasi G2 constructions */
00144     double C1s;                 /* constant in the definition of the form */
00145     double *Q2SAMat, *Q2SBMat;  /* form matrices for the spline basis */
00146     double *Q2SLMat;
00147 
00148     double *Q2SRCmat; /* matrices of constraint equations */
00149     double *Q2SARCmat;
00150   } G1HoleSPrivateRecd;
00151 
00152 
00153 /* private data for the nonlinear constructions */
00154 typedef struct G1HNLPrivated {
00155     int      auxc;    /* patch counter */
00156     vector3d *nldi;   /* NL patches */
00157     vector3d *acoeff;
00158     vector3d *rhole_cp;
00159     vector3d nlnv, reflv;
00160     vector2d *diu, *div, *diuu, *diuv, *divv;
00161     double   ddiam;   /* NL domain diameter */
00162     double   *jac;
00163     double   *psiu, *psiv, *psiuu, *psiuv, *psivv;
00164                    /* the following data are used only for Q2 */
00165     vector2d *diuuu, *diuuv, *diuvv, *divvv;
00166     double   *psiuuu, *psiuuv, *psiuvv, *psivvv;
00167     vector2d *ctang;
00168     double   *cpsiu, *cpsiv, *cpsiuu, *cpsiuv, *cpsivv;
00169   } G1HNLPrivated;  
00170 
00171 
00172 typedef struct G1Q2HNLFuncd {
00173     double   pu, pv, jpuu, jpuv, jpvv;
00174     vector2d tang;
00175     double   psiu, psiv, jpsiuu, jpsiuv, jpsivv;
00176     double   psju, psjv, jpsjuu, jpsjuv, jpsjvv;  
00177     double   A, B, e0, e1, e2, e9, tGt, b1, b2, b3, b4, b5;
00178   } G1Q2HNLFuncd;
00179 
00180 
00181 /* private data for spline nonlinear constructions */
00182 typedef struct G1HNLSPrivated {
00183     G1HNLPrivated nlpr; /* must be the first field */
00184     int     nkn;          /* number of quadrature knots */
00185     double  *tkn;         /* quadrature knots */
00186     int     ftabsize;     /* function values table size */
00187     int     psize;        /* number of control points of each final patch  */
00188     int     *fkn, *lkn;   /* ranges of knots for the functions of block C  */
00189     double  *cb, *cbt, *cbtt, *cbttt; /* B-spline functions and their derivatives */
00190     int     *cfuncvi;     /* indexes of the first samples of C block functions */
00191     int     *dfuncvi;     /* indexes of the first samples of D block functions */
00192     int     jtabsize;     /* jump values table size */
00193     int     jcfs, jdfs;   /* indexes of the first samples of jump */
00194                           /* for block C and block D functions */
00195     short   njcurves;
00196     boolean jumpC, jumpD;
00197   } G1HNLSPrivated;
00198 
00199 
00200 /* ////////////////////////////////////////////////////////////////////////// */
00201 extern G1HNLPrivated *_g1h_nlprivd;
00202 
00203 /* ////////////////////////////////////////////////////////////////////////// */
00204 void _g1h_GetDiPatchCurvesd ( GHoleDomaind *domain, int i,
00205                 point2d **c00, vector2d **c01, point2d **c10, vector2d **c11,
00206                 point2d **d00, vector2d **d01, point2d **d10, vector2d **d11 );
00207 boolean _g1h_GetABasisAuxpd ( GHoleDomaind *domain, int fn,
00208                               double *br0, double *br0cr1 );
00209 boolean _g1h_GetBBasisAuxpd ( GHoleDomaind *domain, int fn,
00210                               double *bezfc, double *fcomc, double *fcomcd );
00211 void _g1h_GetBFAPatchCurvesd ( GHoleDomaind *domain, int fn, int i,
00212                     double **c00, double **c01,
00213                     double **d00, double **d01 );
00214 void _g1h_GetBFBPatchCurvesd ( GHoleDomaind *domain, int fn, int i,
00215                     double **c00, double **c01, double **c10, double **c11,
00216                     double **d00, double **d01, double **d10, double **d11 );
00217 
00218 void g1h_TabCubicHFuncDer2d ( int nkn, const double *kn,
00219                               double *hfunc, double *dhfunc, double *ddhfunc );
00220 boolean g1h_TabBicubicCoonsPatchDer2d (
00221       int spdimen, int nkn, const double *kn, const double *hfunc,
00222       const double *dhfunc, const double *ddhfunc,
00223       int degc00, const double *c00,
00224       int degc01, const double *c01,
00225       int degc10, const double *c10,
00226       int degc11, const double *c11,
00227       int degd00, const double *d00,
00228       int degd01, const double *d01,
00229       int degd10, const double *d10,
00230       int degd11, const double *d11,
00231       double *p, double *pu, double *pv, double *puu, double *puv, double *pvv );
00232 void _g1h_DiJacobian2d ( const vector2d *du, const vector2d *dv,
00233                          const vector2d *duu, const vector2d *duv,
00234                          const vector2d *dvv,
00235                          double *jac, double *trd );
00236 boolean _g1h_TabDiPatchJac2d ( int nkn, const double *kn, const double *hfunc,
00237                                const double *dhfunc, const double *ddhfunc,
00238                                const vector2d *c00, const vector2d *c01,
00239                                const vector2d *c10, const vector2d *c11,
00240                                const vector2d *d00, const vector2d *d01,
00241                                const vector2d *d10, const vector2d *d11,
00242                                double *jac, double *trd );
00243 boolean _g1h_TabLaplaciand ( int nkn, const double *tkn,
00244         const double *hfunc, const double *dhfunc, const double *ddhfunc,
00245         const double *fc00, const double *fc01,
00246         const double *fc10, const double *fc11,
00247         const double *fd00, const double *fd01,
00248         const double *fd10, const double *fd11,
00249         const double *trd,
00250         double *lap );
00251 boolean _g1h_TabLaplacian0d ( int nkn, const double *tkn,
00252         const double *hfunc, const double *dhfunc, const double *ddhfunc,
00253         const double *fc00, const double *fc01,
00254         const double *fd00, const double *fd01,
00255         const double *trd,
00256         double *lapgrad );
00257 double _g1h_Integrald ( int hole_k, int nknsq, double *jac,
00258                        unsigned short supp1, double *func1,
00259                        unsigned short supp2, double *func2 );
00260 
00261 boolean _g1h_VerifyJunctionFunctionsd ( GHoleDomaind *domain );
00262 boolean _g1h_VerifyDomPatchesd ( GHoleDomaind *domain );
00263                                                     
00264 /* ////////////////////////////////////////////////////////////////////////// */
00265 void g1h_ReflectVectorsd ( int n, const vector3d *v, vector3d *w );
00266 void g1h_nonlinoutpatchd ( int n, int m, const double *cp, void *usrptr );
00267 boolean _g1h_StopItd ( int itn, double gn0, double gn,
00268                        double cn, double dcn, double scf );
00269 boolean g1h_GetHoleSurrndPatchd ( GHoleDomaind *domain,
00270                                   const point3d *hole_cp,
00271                                   int i, int j, point3d *bcp );
00272 boolean _g1h_ComputeNLNormald ( GHoleDomaind *domain,
00273                                 G1HNLPrivated *nlprivate,
00274                                 const point3d *hole_cp );
00275 boolean _g1h_TabNLDer0d ( int nkn, const double *tkn,
00276              const double *hfunc, const double *dhfunc, const double *ddhfunc,
00277              vector2d *diu, vector2d *div,
00278              vector2d *diuu, vector2d *diuv, vector2d *divv,
00279              double *fc00, double *fc01, double *fd00, double *fd01,
00280              double *psiu, double *psiv,
00281              double *psiuu, double *psiuv, double *psivv );
00282 boolean _g1h_TabNLDerd ( int nkn, double *tkn,
00283              const double *hfunc, const double *dhfunc, const double *ddhfunc,
00284              vector2d *diu, vector2d *div,
00285              vector2d *diuu, vector2d *diuv, vector2d *divv,
00286              double *fc00, double *fc01, double *fc10, double *fc11,
00287              double *fd00, double *fd01, double *fd10, double *fd11,
00288              double *psiu, double *psiv,
00289              double *psiuu, double *psiuv, double *psivv );
00290 boolean _g1h_TabNLBasisFunctionsd ( GHoleDomaind *domain, int nkn,
00291                                     G1HNLPrivated *nlpr );
00292 boolean _g1h_ReflectSplAltConstrMatrixd ( GHoleDomaind *domain,
00293                                           vector3d *reflv, double *RACmat );
00294 void _g1h_IntFunc1d ( double pu, double pv,
00295                       double puu, double puv, double pvv, double jac,
00296                       double *c, double *cs, double *a, double *b,   
00297                       double *funct );
00298 void _g1h_IntFunc2d ( double pu, double pv,
00299                       double puu, double puv, double pvv,
00300                       double psiu, double psiv,
00301                       double psiuu, double psiuv, double psivv,
00302                       double jac, double c, double A, double B, 
00303                       double *ai, double *bi, double *grad );
00304 void _g1h_IntFunc3d ( double pu, double pv,       
00305                       double puu, double puv, double pvv,       
00306                       double psiu, double psiv,       
00307                       double psiuu, double psiuv, double psivv,       
00308                       double psju, double psjv,       
00309                       double psjuu, double psjuv, double psjvv,       
00310                       double jac, double c,       
00311                       double A, double B, double Ai, double Bi,       
00312                       double Aj, double Bj,       
00313                       double *hessian );
00314 
00315 /* ////////////////////////////////////////////////////////////////////////// */
00316 boolean _g1hq2_TabNLDer0d ( int nkn, const double *tkn,
00317              const double *hfunc, const double *dhfunc, const double *ddhfunc,
00318              const double *dddhfunc,
00319              vector2d *diu, vector2d *div,
00320              vector2d *diuu, vector2d *diuv, vector2d *divv,
00321              vector2d *diuuu, vector2d *diuuv, vector2d *diuvv, vector2d *divvv,
00322              double *fc00, double *fc01, double *fd00, double *fd01,
00323              double *psiu, double *psiv,
00324              double *psiuu, double *psiuv, double *psivv,
00325              double *psiuuu, double *psiuuv, double *psiuvv, double *psivvv );
00326 
00327 boolean _g1hq2_TabNLDerd ( int nkn, double *tkn,
00328              const double *hfunc, const double *dhfunc, const double *ddhfunc,
00329              const double *dddhfunc,
00330              vector2d *diu, vector2d *div,
00331              vector2d *diuu, vector2d *diuv, vector2d *divv,
00332              vector2d *diuuu, vector2d *diuuv, vector2d *diuvv, vector2d *divvv,
00333              double *fc00, double *fc01, double *fc10, double *fc11,
00334              double *fd00, double *fd01, double *fd10, double *fd11,
00335              double *psiu, double *psiv,
00336              double *psiuu, double *psiuv, double *psivv,
00337              double *psiuuu, double *psiuuv, double *psiuvv, double *psivvv );
00338 
00339 boolean _g1hq2_TabNLBasisFunctionsOmegad ( GHoleDomaind *domain, int nkn,
00340                                            G1HNLPrivated *nlpr, double *bc00 );
00341 boolean _g1hq2_TabNLBasisFunctionsGammad ( GHoleDomaind *domain, int nkn,
00342                                            G1HNLPrivated *nlpr, double *ctrd,
00343                                            double *bc00 );
00344 void _g1hq2_IntFunc1ad ( G1Q2HNLFuncd *f, double *funct );
00345 void _g1hq2_IntFunc1bd ( G1Q2HNLFuncd *f, double *funct );
00346 void _g1hq2_IntFunc1cd ( G1Q2HNLFuncd *f, double *funct );
00347 void _g1hq2_IntFunc2bd ( G1Q2HNLFuncd *f, double *grad );
00348 void _g1hq2_IntFunc2cd ( G1Q2HNLFuncd *f, double *Ai, double *Bi, double *grad );
00349 void _g1hq2_IntFunc3cd ( G1Q2HNLFuncd *f, double Ai, double Bi, double Aj, double Bj,
00350                          double *hessian );
00351 
00352 boolean _g1h_ReflectAltConstrMatrixd ( GHoleDomaind *domain,
00353                                        vector3d *reflv, double *RACmat );
00354 boolean _g1h_ReflectExtAltConstrMatrixd ( GHoleDomaind *domain,
00355                                           vector3d *reflv, double *RACmat );
00356 
00357 /* ////////////////////////////////////////////////////////////////////////// */
00358 /* the following horrible macros are used a number of times in the code. */
00359 /* They assume that some variables are declared and have proper initial */
00360 /* values */
00361 #define G1GetPolyAddr(jfunc,b01,c01,f01,g01,b11,c11,f11,g11)\
00362   b01 = jfunc; \
00363   c01 = &b01[hole_k*(G1_BF01DEG+1)];  f01 = &c01[hole_k*(G1_CG01DEG+1)]; \
00364   g01 = &f01[hole_k*(G1_BF01DEG+1)];  b11 = &g01[hole_k*(G1_CG01DEG+1)]; \
00365   c11 = &b11[hole_k*(G1_BF11DEG+1)];  f11 = &c11[hole_k*(G1_CG11DEG+1)]; \
00366   g11 = &f11[hole_k*(G1_BF11DEG+1)]
00367 
00368 #define G1GetPolyAddr0(jfunc,b01,c01,f01,g01)\
00369   b01 = jfunc; \
00370   c01 = &b01[hole_k*(G1_BF01DEG+1)];  f01 = &c01[hole_k*(G1_CG01DEG+1)]; \
00371   g01 = &f01[hole_k*(G1_BF01DEG+1)]
00372 
00373 #define G1GetDiCrossAddresses() \
00374   dir0cr1 = privateG1->dicross; \
00375   diq0cr1 = &dir0cr1[hole_k*(G1_CROSS01DEG+1)]; \
00376   dir1cr1 = &diq0cr1[hole_k*(G1_CROSS01DEG+1)]; \
00377   diq1cr1 = &dir1cr1[hole_k*(G1_CROSS11DEG+1)]
00378 
00379 #define G1GetBFuncACrossAddresses() \
00380   bbr0 = privateG1->basis_a; \
00381   bbr0cr1 = &bbr0[nfunc_a*hole_k*(G1_CROSS00DEG+1)]; \
00382   bbq0cr1 = &bbr0cr1[nfunc_a*hole_k*(G1_CROSS01DEG+1)]
00383 
00384 #define G1GetBFuncBCrossAddresses() \
00385   bbr0 = privateG1->basis_b; \
00386   bbr1 = &bbr0[nfunc_b*hole_k*(G1_CROSS00DEG+1)]; \
00387   bbq1 = &bbr1[nfunc_b*hole_k*(G1_CROSS10DEG+1)]; \
00388   bbr0cr1 = &bbq1[nfunc_b*hole_k*(G1_CROSS10DEG+1)]; \
00389   bbq0cr1 = &bbr0cr1[nfunc_b*hole_k*(G1_CROSS01DEG+1)]; \
00390   bbr1cr1 = &bbq0cr1[nfunc_b*hole_k*(G1_CROSS01DEG+1)]; \
00391   bbq1cr1 = &bbr1cr1[nfunc_b*hole_k*(G1_CROSS11DEG+1)]
00392 
00393 #define G1GetFCAddresses() \
00394   fc01 = &fc00[hole_k*spdimen*(G1_CROSS00DEG+1)]; \
00395   fc10 = &fc01[hole_k*spdimen*(G1_CROSS01DEG+1)]; \
00396   fc11 = &fc10[hole_k*spdimen*(G1_CROSS10DEG+1)]; \
00397   fd00 = &fc11[hole_k*spdimen*(G1_CROSS11DEG+1)]; \
00398   fd01 = &fd00[hole_k*spdimen*(G1_CROSS00DEG+1)]; \
00399   fd10 = &fd01[hole_k*spdimen*(G1_CROSS01DEG+1)]; \
00400   fd11 = &fd10[hole_k*spdimen*(G1_CROSS10DEG+1)]
00401 
00402 /* ///////////////////////////////////////////////////////////////////////// */
00403 #define G1GetSFCAddresses() \
00404   sfc01 = &sfc00[hole_k*spdimen*(lastomcknot-G1_CROSS00DEG)]; \
00405   sfd00 = &sfc01[hole_k*spdimen*(lastpvknot-G1_CROSS01DEG)]; \
00406   sfd01 = &sfd00[hole_k*spdimen*(lastomcknot-G1_CROSS00DEG)]
00407 
00408 /* ///////////////////////////////////////////////////////////////////////// */
00409 boolean _g1h_GetExtBlockAddressesd ( GHoleDomaind *domain,
00410                                      double **Aii, double **Aki, double **Akk,
00411                                      double **Bi, double **Bk, double **Lii );
00412 
00413 boolean _g1h_SetRightSided ( GHoleDomaind *domain, const double *Bmat,
00414                              int spdimen, CONST_ double *hole_cp,
00415                              double *fc00, double *b );
00416 boolean _g1h_OutputPatchesd ( GHoleDomaind *domain, int spdimen,
00417                        CONST_ double *x, double *fc00, void *usrptr,
00418                        void (*outpatch) ( int n, int m, const double *cp,
00419                                           void *usrptr ) );
00420 
00421 boolean _g1h_SetExtRightSided ( GHoleDomaind *domain,
00422                                 const double *Bo, const double *Bk,
00423                                 int spdimen, CONST_ double *hole_cp,
00424                                 double *fc00, double *b );
00425 boolean _g1h_OutputExtPatchesd ( GHoleDomaind *domain, int spdimen,
00426                            CONST_ double *x, double *fc00, void *usrptr,
00427                            void (*outpatch) ( int n, int m, const double *cp,
00428                                               void *usrptr ) );
00429 
00430 boolean _g1h_TabTensBezPolyDer2d ( int nkn, const double *tkn,       
00431                      double *tbez, double *tbezu, double *tbezv,
00432                      double *tbezuu, double *tbezuv, double *tbezvv );
00433 
00434 void _g1h_TensDer2d ( double p, double pu, double puu,
00435                       double q, double qv, double qvv,
00436                       double *pq );
00437 
00438 /* ///////////////////////////////////////////////////////////////////////// */
00439 void g1h_DestroySPrivateDatad ( GHoleDomaind *domain );
00440 boolean _g1h_GetSplDBasisAuxpd ( GHoleDomaind *domain, int fn, int cn,
00441                                  int *nzc, double *fcomc, double *fcomcd );
00442 boolean _g1h_GetSplDBasisCrossDerd ( GHoleDomaind *domain, int fn, int cn,
00443                                      double *fcomc, double *pv, double *pu );
00444 
00445 boolean _g1h_TabBSFuncDer2d ( int deg, int lastknot, const double *knots,
00446                               int i0, int i1,
00447                               int n, const double *tkn, int *fkn, int *lkn,
00448                               double *b, double *bt, double *btt );
00449 
00450 boolean _g1h_SetSplRightSided ( GHoleDomaind *domain,
00451                                 int spdimen, CONST_ double *hole_cp,
00452                                 const double *bmat,
00453                                 double *fc00, double *b );
00454 boolean _g1h_OutputSplPatchesd ( GHoleDomaind *domain,
00455                 int spdimen, CONST_ double *x, double *fc00, void *usrptr,
00456                 void (*outpatch) ( int n, int lknu, const double *knu,
00457                                    int m, int lknv, const double *knv,
00458                                    const double *cp, void *usrptr ) );
00459 
00460 /* ///////////////////////////////////////////////////////////////////////// */
00461 boolean _g1h_Q2TabDiPatchJac3d ( int nkn, const double *kn, const double *hfunc,
00462              const double *dhfunc, const double *ddhfunc, const double *dddhfunc,
00463              const vector2d *c00, const vector2d *c01,
00464              const vector2d *c10, const vector2d *c11,
00465              const vector2d *d00, const vector2d *d01,
00466              const vector2d *d10, const vector2d *d11,
00467              double *jac, double *trd );
00468 boolean _g1h_Q2TabLaplacianGradd ( int nkn, const double *tkn,
00469         const double *hfunc, const double *dhfunc, const double *ddhfunc,
00470         const double *dddhfunc,
00471         const double *fc00, const double *fc01,
00472         const double *fc10, const double *fc11,
00473         const double *fd00, const double *fd01,
00474         const double *fd10, const double *fd11,
00475         const double *trd,
00476         vector2d *lapgrad );
00477 boolean _g1h_Q2TabLaplacianGrad0d ( int nkn, const double *tkn,
00478         const double *hfunc, const double *dhfunc, const double *ddhfunc,
00479         const double *dddhfunc,
00480         const double *fc00, const double *fc01,
00481         const double *fd00, const double *fd01,
00482         const double *trd,
00483         vector2d *lapgrad );
00484 void _g1h_TabCurveJacobiand ( int deg, const point2d *cp,
00485                               int nkn, const double *kn, double *jac );
00486 void _g1h_LapCoeffd ( const vector2d *du, const vector2d *dv,
00487                       const vector2d *duu, const vector2d *duv,
00488                       const vector2d *dvv, double *trd );
00489 boolean _g1h_TabCurveLapCoeff0d ( const point2d *c00, const vector2d *c01,
00490                                   const point2d *c10, const vector2d *c11,
00491                                   const point2d *d00, const vector2d *d01,
00492                                   const point2d *d10, const vector2d *d11,
00493                                   int nkn, const double *tkn, const double *hfunc,
00494                                   const double *dhfunc, const double *ddhfunc,
00495                                   const double *atkn, const double *ahfunc,
00496                                   const double *adhfunc, const double *addhfunc,
00497                                   double *trdc00, double *trdc10,
00498                                   double *trdd00, double *trdd10 );
00499 void _g1h_TabCurveLapCoeff1d ( const point2d *sicp, int nkn,
00500                                const double *tkn, double *trd );
00501 boolean _g1h_TabTensBezPolyDer3d ( int nkn, const double *tkn,
00502              double *tbez, double *tbezu, double *tbezv,
00503              double *tbezuu, double *tbezuv, double *tbezvv,
00504              double *tbezuuu, double *tbezuuv, double *tbezuvv, double *tbezvvv );
00505 boolean _g1h_Q2TabLaplacianJump0d ( int nkn, const double *tkn,
00506               const double *hfunc, const double *dhfunc, const double *ddhfunc,
00507               const double *atkn, const double *ahfunc, const double *adhfunc,
00508               const double *addhfunc,
00509               const double *ec00, const double *ec01,
00510               const double *ed00, const double *ed01, const double *etrdd00,
00511               const double *fc00, const double *fc01,
00512               const double *fd00, const double *fd01,
00513               const double *ftrdc00, const double *ftrdc10, const double *ftrdd10,
00514               double *lapjc00, double *lapjc10, double *lapjd10 );
00515 boolean _g1h_Q2TabLaplacianJumpd ( int nkn, const double *tkn,
00516               const double *hfunc, const double *dhfunc, const double *ddhfunc,
00517               const double *atkn, const double *ahfunc, const double *adhfunc,
00518               const double *addhfunc,
00519               const double *ec00, const double *ec01,
00520               const double *ec10, const double *ec11,
00521               const double *ed00, const double *ed01,
00522               const double *ed10, const double *ed11, const double *etrdd00,
00523               const double *fc00, const double *fc01,
00524               const double *fc10, const double *fc11,
00525               const double *fd00, const double *fd01,
00526               const double *fd10, const double *fd11,
00527               const double *ftrdc00, const double *ftrdc10, const double *ftrdd10,
00528               const double *eicp1, const double *etrdc10,
00529               const double *eicp2, const double *etrdd10,
00530               double *lapjc00, double *lapjc10, double *lapjd10 );
00531 unsigned short _g1h_ExtendSupport ( int hole_k, unsigned short supp );
00532 boolean _g1h_TabLaplacianJump00d ( int nkn, const double *tkn, int fni,
00533                     const double *trdc00, const double *trdc10,
00534                     const double *trdd00, const double *trdd10,
00535                     double *lapc00, double *lapc10, double *lapd00, double *lapd10 );
00536 double _g1h_Q2Integrald ( int hole_k, int nquad, double *jac,
00537                          unsigned short supp1, double *lapj1,
00538                          unsigned short supp2, double *lapj2 );
00539 boolean _g1h_FuncDSuppd ( int hole_k, int nk, int m1, int fn, int i,
00540                           int *nzc, int *i0, int *i1, int *j0, int *j1 );
00541 
00542 void g1h_splnloutpatchd ( int n, int lknu, const double *knu,
00543                           int m, int lknv, const double *knv,
00544                           const double *cp, void *usrptr );
00545 boolean _g1h_TabBSFuncDer3d ( int deg, int lastknot, const double *knots,
00546                               int i0, int i1,
00547                               int n, const double *tkn, int *fkn, int *lkn,
00548                               double *b, double *bt, double *btt, double *bttt );
00549 void _g1hq2_SetupCTrdd ( const vector2d *cdiu, const vector2d *cdiv,
00550            const vector2d *cdiuu, const vector2d *cdiuv, const vector2d *cdivv,
00551            double *ctrd );
00552 boolean _g1hq2_FindDomSurrndPatchd ( GHoleDomaind *domain,
00553                                      G1HNLPrivated *nlpr,
00554                                      int i, int j, point2d *bezcp );
00555 boolean _g1hq2_FindNLDomainDiameterd ( GHoleDomaind *domain,  
00556                                        G1HNLPrivated *nlpr );
00557 boolean _g1h_TabBSFuncDer2Jd ( int rr, int deg, int nk, int m2,
00558              int lastcknot, const double *cknots,
00559              double *atbs, double *atbst, double *atbstt0, double *atbstt1 );
00560 
00561 #endif
00562