- mesh1=MEDCouplingUMesh.New();
- mesh1.setMeshDimension(2);
- mesh1.allocateCells(5);
- conn=[0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4];
- mesh1.insertNextCell(NORM_QUAD4,4,conn[0:4]); # 0
- mesh1.insertNextCell(NORM_TRI3,3, conn[4:7]); # 1
- mesh1.insertNextCell(NORM_TRI3,3, conn[7:10]); # 2
- mesh1.insertNextCell(NORM_QUAD4,4,conn[10:14]); # 3
- mesh1.insertNextCell(NORM_QUAD4,4,conn[14:18]); # 4
- mesh1.finishInsertingCells();
- coords=[-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 ];
- coordsArr=DataArrayDouble.New();
- coordsArr.setValues(coords,9,2);
- mesh1.setCoords(coordsArr);
+ mesh1=MEDCouplingUMesh()
+ mesh1.setMeshDimension(2)
+ mesh1.allocateCells(5)
+ conn=[0,3,4,1, 1,2,4, 4,5,2, 6,7,4,3, 7,8,5,4]
+ mesh1.insertNextCell(NORM_QUAD4,4,conn[0:4]) # 0
+ mesh1.insertNextCell(NORM_TRI3,3, conn[4:7]) # 1
+ mesh1.insertNextCell(NORM_TRI3,3, conn[7:10]) # 2
+ mesh1.insertNextCell(NORM_QUAD4,4,conn[10:14]) # 3
+ mesh1.insertNextCell(NORM_QUAD4,4,conn[14:18]) # 4
+ mesh1.finishInsertingCells()
+ coords=[-0.3,-0.3, 0.2,-0.3, 0.7,-0.3, -0.3,0.2, 0.2,0.2, 0.7,0.2, -0.3,0.7, 0.2,0.7, 0.7,0.7 ]
+ coordsArr=DataArrayDouble(coords,9,2)
+ mesh1.setCoords(coordsArr)