📄 main2.c
字号:
/* last edit: Ilja Schmelzer -------------- 10-JUN-1994 17:58:40.20 */
/************************************************************************/
/* */
/* <<< 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;
/* ibgNameApplication = "test"; */
ibgApplicationInit(); /* calls also ibgdInit and ibGridInit */
g0 = ibgdNew(2); /* trivial geometry: only one region 2 */
/* 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 */
1,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: */
ibgNameFile = "test";
ibgOutput(grid);
return ibgdQuit();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -