📄 mainbound.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 reads a boundary grid and creates a complete grid
*/
#include <stdio.h>
#include "ibg.h"
#include "ibgd.h"
#include "ibgg.h"
#include "ibgoutput.h"
#include "ibgapplication.h"
int main()
{
/* the data of the coarse grid - cuboid */
ibgFloat x[2] = {-1.1,1.13},
y[2] = {-1.1,1.13},
z[2] = {-0.1,1.13};
ibGeometry g0;
FILE *ff;
ibGrid *grid,*g1;
ibgApplicationInit(); /* calls also ibgdInit and ibGridInit */
ff = fopen("g1.smp","r");
g1 = ibgOtSimplex(ff);
g0 = ibgdBoundaryGrid(g1,1); /* 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,5, /* coarse grid data */
2,y,5, /* 2 values in x and y data field */
2,z,5, /* 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 = "test3";
ibgOutput(grid);
return ibgdQuit();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -