gmsh 中的重复结构 surface/mesh

Duplicate structured surface/mesh in gmsh

我正在尝试在 gmsh 中从一个简单的几何形状构建一个大型结构,我想使用结构化(四边形)网格。我首先创建该形状,然后根据需要经常复制和转换它以构建我的最终结构。

问题是,即使我将原始形状的线和面定义为超限,这个 属性 一旦我复制和平移它就会丢失。检查正方形的示例代码:

Point(1) = {0, 0, 0, 1};
Point(2) = {0, 1, 0, 1};
Point(3) = {1, 1, 0, 1};
Point(4) = {1, 0, 0, 1};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(5) = {1, 2, 3, 4};
Plane Surface(6) = {5};

Transfinite Line {1, 2, 3, 4} = 10 Using Progression 1;
Transfinite Surface {6};
Recombine Surface {6};

Translate {0, 1, 0} {
  Duplicata { Surface{6}; }
}

我获得了带有结构化网格的原始正方形,但复制的正方形没有这个 属性。 复制表面时是否可以保留结构化网格?

EDIT: It seems that there is indeed no possibility to duplicate a structured volume or surface. The problem is that these properties are directly related to the mesh itself and not the geometry. And the mesh cannot be duplicated.

有可能。

您可以使用 GMSH Geometry.CopyMeshingMethod 属性 负责为复制或翻译的几何实体复制网格化方法。默认情况下,它是关闭的。要打开它,您只需将以下行添加到 GEO 文件的开头即可。

Geometry.CopyMeshingMethod = 1;

现在,比较一下:

已在 GMSH 3.0.5 上测试,但应适用于任何现代版本。