网格体积
-
@队长别开枪 请问您测试过吗,我测试了在
createField.H
加入Info << "\n-Class: cell----------" << endl; cell &cl(cells[100]); Info << "cl.centre(points, faces) = " << cl.centre(points, faces) << endl;
报错如下:
createFields.H:33:14: error: ‘cells’ was not declared in this scope cell &cl(cells[100]); ^ createFields.H:34:52: error: ‘points’ was not declared in this scope Info << "cl.centre(points, faces) = " << cl.centre(points, faces) << endl; ^ createFields.H:34:60: error: ‘faces’ was not declared in this scope Info << "cl.centre(points, faces) = " << cl.centre(points, faces) << endl; ^
怎么修改就好了
-
@飞火流星jyj 不好意思,这两天太忙没顾得上,刚刚把代码发上来。链接地址:
meshInfoFoam
,它会将体单元的体积、中心和面单元的面积、中心、面积矢量、单位矢量全部写入初始文件夹0
,具体结果可以参考链接meshInfoFoam output
。代码里还测试了一些涉及单个网格元素操作的成员函数。