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

📄 main3.c

📁 有限元学习研究用源代码(老外的),供科研人员参考
💻 C
字号:
/* last edit: Ilja Schmelzer -------------- 10-JUN-1994 17:59:39.65	*/
/************************************************************************/
/*                                                                      */
/*  <<< 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")	*/
/*                                                                      */
/************************************************************************/
/*
	Intersection-Based Grid Generator	Version 1.1

author:	Ilja Schmelzer, IAAS,
	Mohrenst. 39, D-10117 Berlin Germany
	e-mail:	schmelzer@iaas-berlin.d400.de
	Tel:	+49 30	20377 567
	Fax:	+49 30	200 4975

This example creates the most trivial 2D grid and writes it into a file.
*/

#include <stdio.h>
#include "ibg.h"
#include "ibgd.h"
#include "ibgg.h"
#include "ibgapplication.h"

int main()
{
/* the data of the coarse grid - cuboid */
 ibgFloat x[2] = {-1.0,1.0},
	  y[2] = {-1.0,1.0},
	  z[2] = { 0.0,1.0};
 ibGeometry g0;
 ibGrid	*grid;
 ibgApplicationInit();	/* calls also ibgdInit and ibGridInit */

 g0 = ibgdNew(2);	/* trivial geometry: only one region 1 */

/* grid generator call. */
 grid=ibGridGenerate(g0,  	/* geometry description */
	100,	/* approx. point number (for malloc to minimize realloc) */
	2,x,0, 	/* coarse grid data */
	2,y,0,  /* 2 values in x and y data field */
	2,z,0,	/* for the 2D variant only 1 value in z direction */
/* default refinement criteria: */
	ibggDefaultRefineRegion,ibgNULL,
	ibggDefaultRefineFace,ibgNULL,
	ibggDefaultRefineLine,ibgNULL,
	ibggDefaultRefineNode,ibgNULL,
	ibggDefaultRefineEdge,ibgNULL);
/* end of program: */
 ibgOSOutside = ibgTrue;
 ibgNameFile = "test3";
 ibgOutput(grid);
 return ibgdQuit();
}

⌨️ 快捷键说明

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