egholed.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, 2010                            */
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 intended to be #included by the #include files        */
00012 /* eg1holed.h and eg2holed.h, which in turn may be #included by applications */
00013 
00014 #ifndef EGHOLED_H
00015 #define EGHOLED_H
00016 
00017 #ifndef CONST_  /* a dirty trick to suppress many compiler warning messages */
00018 #define CONST_ const
00019 #endif
00020 
00021 #ifdef __cplusplus   
00022 extern "C" {
00023 #endif
00024 
00025 #define GH_MAX_K 16  /* maximal number of hole sides */
00026 
00027 typedef struct GHoleDomaind {
00028     int     hole_k;         /* number of hole sides */
00029     double   *hole_knots;    /* knots of the surface with the hole */
00030     point2d *domain_cp;     /* control points of domain definition */
00031     boolean basisG1, basisG2;
00032     void    *privateG;      /* points to a common private data dor G1 and G2 */
00033     void    *privateG1;     /* points to a G1HolePrivateRecd structure */
00034     void    *SprivateG1;    /* points to a G1HoleSPrivateRecd structire */
00035     void    *privateG2;     /* points to a G1HolePrivateRecd structure */
00036     void    *SprivateG2;    /* points to a G1HoleSPrivateRecd structire */
00037     void    *usrptr;        /* points to arbitrary application stuff */
00038     int     error_code;     /* explains possible failure reasons */
00039   } GHoleDomaind;
00040 
00041 
00042 GHoleDomaind* gh_CreateDomaind ( int     hole_k,
00043                                  double   *hole_knots,
00044                                  point2d *domain_cp );
00045 void gh_DestroyDomaind ( GHoleDomaind *domain );
00046 
00047 void gh_GetBspInd ( int hole_k, int i, int j, int *ind );
00048 int gh_DrawBFcpn ( int hole_k, unsigned char *bfcpn );
00049 
00050 boolean gh_FindDomSurrndBezPatchesd ( GHoleDomaind *domain );
00051 double gh_DomainDiamd ( GHoleDomaind *domain );
00052 double gh_HoleDomainAread ( GHoleDomaind *domain, boolean symmetric );
00053 
00054 /* ///////////////////////////////////////////////////////////////////////// */
00055 /* drawing procedure */
00056 void gh_DrawDomSurrndPatchesd ( GHoleDomaind *domain,
00057                void (*drawpatch) ( int n, int m, const point2d *cp ) );
00058 void gh_GetDomSurrndBFuncd ( GHoleDomaind *domain, int fn, int i, int j,
00059                              double *bf );
00060 
00061 /* ///////////////////////////////////////////////////////////////////////// */
00062 /* domain net data, eigenvectors of the mesh refinement operators */
00063 extern point2d egh_eigendom3d[], egh_eigendom5d[], egh_eigendom6d[],
00064                egh_eigendom7d[], egh_eigendom8d[], egh_eigendom9d[],
00065                egh_eigendom10d[], egh_eigendom11d[], egh_eigendom12d[],
00066                egh_eigendom13d[], egh_eigendom14d[], egh_eigendom15d[],
00067                egh_eigendom16d[], *egh_eigendomcpd[];
00068 extern double egh_eigenvald[GH_MAX_K-3];
00069 
00070 #ifdef __cplusplus
00071 }
00072 #endif
00073 
00074 #endif
00075