本文整理汇总了Python中PerceptMesh.get_coordinates_field方法的典型用法代码示例。如果您正苦于以下问题:Python PerceptMesh.get_coordinates_field方法的具体用法?Python PerceptMesh.get_coordinates_field怎么用?Python PerceptMesh.get_coordinates_field使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PerceptMesh
的用法示例。
在下文中一共展示了PerceptMesh.get_coordinates_field方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_perceptMesh_walk_nodes
# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import get_coordinates_field [as 别名]
def test_perceptMesh_walk_nodes(self):
self.fixture_setup()
p_size = self.pm.size
p_rank = self.pm.rank
if p_size <= 2:
n = 12
nx = n
ny = n
sidesets_on = 1
fixture = QuadFixture_4(self.pm, nx, ny, sidesets_on)
fixture.meta_data.commit()
fixture.generate_mesh()
eMesh = PerceptMesh(fixture.meta_data, fixture.bulk_data)
eMesh.print_info("quad fixture", 2)
metaData = eMesh.get_fem_meta_data()
parts = metaData.get_parts()
nparts = len(parts)
print "Number of parts = ", nparts
surface_id = 2
surface_name = "surface_" + str(surface_id)
part = eMesh.get_part(surface_name)
in_surface_selector = Selector(part)
bulkData = eMesh.get_bulk_data()
coordField = eMesh.get_coordinates_field()
if eMesh.get_spatial_dim() == 2:
buckets_arg = eMesh.edge_rank()
else:
buckets_arg = eMesh.face_rank
buckets = bulkData.buckets(buckets_arg)
sum = 0.0