本文整理汇总了Python中PerceptMesh.close方法的典型用法代码示例。如果您正苦于以下问题:Python PerceptMesh.close方法的具体用法?Python PerceptMesh.close怎么用?Python PerceptMesh.close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PerceptMesh
的用法示例。
在下文中一共展示了PerceptMesh.close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_break_quad_to_quad_sierra_2
# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import close [as 别名]
def test_break_quad_to_quad_sierra_2(self):
fixture_setup()
pm = MPI.COMM_WORLD
p_size = parallel_machine_size(pm)
doGenSideSets = True
if p_size <= 3:
n = 12
nx = n
ny = n
fixture = QuadFixture_4(pm,nx,ny,doGenSideSets)
isCommited = False
eMesh = PerceptMesh(fixture.meta_data, fixture.bulk_data, isCommited)
eMesh.commit()
fixture.generate_mesh()
eMesh.save_as("quad_fixture_mbreak_0.e")
eMesh.close()
eMesh1 = PerceptMesh(2)
eMesh1.open("quad_fixture_mbreak_0.e")
scalarDimension = 0
proc_rank_field = eMesh1.add_field("proc_rank", eMesh.element_rank(), scalarDimension)
breaker = Refiner(eMesh1, QUAD4_QUAD4_4_SIERRA, proc_rank_field)
eMesh1.commit()
i = 0
while i < 2:
print "\n\n\n ================ tmp Refine Pass = ", i
breaker.doBreak()
eMesh1.save_as("quad_fixture_mbreak_" + str(i) + ".e")
i = i + 1
示例2: test_heterogeneous_mesh
# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import close [as 别名]
def test_heterogeneous_mesh(self):
fixture_setup()
pm = MPI.COMM_WORLD
p_size = parallel_machine_size(MPI.COMM_WORLD)
if p_size <= 1:
mesh = HeterogeneousFixture(MPI.COMM_WORLD, False)
#put_io_part_attribute(mesh.m_block_hex)
#put_io_part_attribute(mesh.m_block_wedge)
#put_io_part_attribute(mesh.m_block_tet)
mesh.m_metaData.commit()
mesh.populate()
isCommited = True
em1 = PerceptMesh(mesh.m_metaData, mesh.m_bulkData, isCommited)
em1.save_as("heterogeneous_0.e")
em1.close()
eMesh = PerceptMesh(3)
eMesh.open("heterogeneous_0.e")
scalarDimension = 0
proc_rank_field = eMesh.add_field("proc_rank", eMesh.element_rank(), scalarDimension)