⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ibg.h

📁 有限元学习研究用源代码(老外的),供科研人员参考
💻 H
字号:
/* last edit: Ilja Schmelzer -------------- 18-OCT-1994 08:51:11.84	*/
/************************************************************************/
/*                                                                      */
/*  <<< I B G >>> - Intersection - Based Grid generation package 	*/
/*                                                                      */
/*  Version 1.1 by Ilja Schmelzer   schmelzer@iaas-berlin.d400.de       */
/*                                                                      */
/*  to be distributed under IBG license conditions (see "readme.ibg")	*/
/*                                                                      */
/************************************************************************/
/* <<< IBG >>> - Intersection-Based Geometry - General Definitions */
#ifndef IBG_H
#define IBG_H

/* these definitions can be changed: */
	/* this definition includes a lot of tests: */
#define IBGDEBUG
	/* floating point type */
#define ibgFloat	float
#define ibgDouble	double
	/* allowed accuracy for boundary computation */
#define ibgInfty	1.e6
	/* integer type */
#define ibgInt	   	int
	/* boolean type */
#define ibgBoolean 	int
#define ibgTrue		(1)
#define ibgFalse	(0)
	/* abstract pointer type to user data */
typedef void		*ibgPtObject;
#define ibgNULL		((ibgPtObject)0)
	/* pointer to an abstract function */
typedef	int		(*ibgFunction)();
#define ibgNoFunction	((ibgFunction)0)
	/* type for geometrical segments */
#define ibgSegment		int
	/* maximal user-defined segment number (ibgSMAX**3 must be in ibgSegment) */
#define	ibgSMAX	100
	/* number of floating point values per point (#undef if none) */
#define ibgFloatValues	3
	/* number of integer values per point (#undef if none) */
#define ibgIntValues	1
	/* space dimension (between 1 and 3) */
#define ibgDIM		3

/* extern ibgFloat	ibgDelta;*/
/* these definitions cannot be changed: */
	/* the type of a geometrical segment (the codimension) */
#define IBGSTMAX 5
typedef enum{ibgSRegion,ibgSFace,ibgSLine,ibgSNode,ibgSNothing} ibgSegmentType;
	/* the point type */
typedef struct ibgPoint0		ibgPoint;
        /* the point list type */
typedef struct ibgPoints0		ibgPoints;
	/* the geometry type (complete definition in ibgi.h) */
typedef struct _ibGeometry	ibGeometryRec,*ibGeometry;
	/* the topology type (complete definition in ibgt.h) */
typedef struct _ibgTopology	ibgTopologyRec,*ibgTopology;
	/* the grid type (complete definition in ibgg.h) */
typedef struct _ibGrid0		ibGrid;

/* <<< IBGN >>> - Intersection-Based Geometry - the Point Data Type */

/* formal definition of the point functions:

ibgSegment	ibgpSegment(ibgPoint point);	segment
ibgSegmentType	ibgpType(ibgPoint point);	type
ibgFloat	*ibgpX(ibgPoint point);		coordinates
ibgFloat	*ibgpF(ibgPoint point);		floating point values
ibgInt		*ibgpI(ibgPoint point);		integer values

*/

	/* <<< implementation-dependend (private) part >>> */

/* complete point type definition: */

struct ibgPoint0{
	ibgSegmentType	tt;
	ibgSegment	uu;
	ibgFloat	xx[ibgDIM];
#ifdef ibgFloatValues
	ibgFloat	ff[ibgFloatValues];
#endif
#ifdef ibgIntValues
	ibgInt		ii[ibgIntValues];
#endif
};

/* extern ibgPoint	ibgNoPoint;	*/
#define IBGPOINTSIZE sizeof(ibgPoint)

/* realization of the calls by definitions: */

#define ibgpSegment(point)		((point).uu)
#define ibgpType(point)		((point).tt)
#define ibgpX(point)		((point).xx)
#define ibgpF(point)		((point).ff)
#define ibgpI(point)		((point).ii)

/* general output return values: */
#define ibgSuccess	0
#define ibgWarning	(-1)
#define ibgError	(-2)
#define ibgFatal	(-3)

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -