当前位置: 首页>>代码示例>>Python>>正文


Python PerceptMesh.edge_rank方法代码示例

本文整理汇总了Python中PerceptMesh.edge_rank方法的典型用法代码示例。如果您正苦于以下问题:Python PerceptMesh.edge_rank方法的具体用法?Python PerceptMesh.edge_rank怎么用?Python PerceptMesh.edge_rank使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PerceptMesh的用法示例。


在下文中一共展示了PerceptMesh.edge_rank方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_break_tri3_to_tri6_sierra

# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import edge_rank [as 别名]
  def test_break_tri3_to_tri6_sierra(self):
    fixture_setup()
    pm = MPI.COMM_WORLD
    p_size = parallel_machine_size(pm)

    print p_size, "++++++++++++++++++++"
    for i in range(100):
      print "-------------------"
    if p_size <= 3:
      n = 12
      nx = n
      ny = n
      createEdgeSets = True
      fixture = QuadFixture_3(pm, nx, ny, createEdgeSets)
      isCommited = False
      eMesh = PerceptMesh(fixture.meta_data, fixture.bulk_data, isCommited)
      scalarDimension = 0
      proc_rank_field = eMesh.add_field("proc_rank", eMesh.element_rank(), scalarDimension)
      eMesh.add_field("proc_rank_ede", eMesh.edge_rank(), scalarDimension)
      breaker = Refiner(eMesh, TRI3_TRI6_1, proc_rank_field)
      eMesh.commit()
      fixture.generate_mesh()
      eMesh.print_info("tri mesh tri6")
      eMesh.save_as("quad_fixture_tri3_tri6_0.e")
      breaker.doBreak()
      eMesh.print_info("tri mesh enriched")
      eMesh.save_as("quad_fixture_tri6_tri6_0.e")
      eMesh.save_as("quad_fixture_tri3_tri6_1.e")
开发者ID:00liujj,项目名称:trilinos,代码行数:30,代码来源:UniformRefinerUnitTests.py

示例2: test_break_tri3_to_tri6_to_tri6_sierra

# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import edge_rank [as 别名]
 def test_break_tri3_to_tri6_to_tri6_sierra(self):
   fixture_setup()
   pm = MPI.COMM_WORLD
   p_size = parallel_machine_size(pm)
   if p_size <= 3:
     eMesh = PerceptMesh(2)
     eMesh.open("quad_fixture_tri6_tri6_0.e")
     scalarDimension = 0
     proc_rank_field = eMesh.add_field("proc_rank", eMesh.element_rank(), scalarDimension)
     eMesh.add_field("proc_rank_ede", eMesh.edge_rank(), scalarDimension)
     breaker = Refiner(eMesh, TRI6_TRI6_4, proc_rank_field)
     eMesh.commit()  
     eMesh.print_info("tri mesh tri6")
     eMesh.save_as("quad_fixture_tri6_tri6_0.e")
     breaker.doBreak()
     eMesh.print_info("tri mesh refined")
     eMesh.save_as("quad_fixture_tri6_tri6_1.e")
开发者ID:00liujj,项目名称:trilinos,代码行数:19,代码来源:UniformRefinerUnitTests.py

示例3: test_break_tri_to_tri_sierra_1_test

# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import edge_rank [as 别名]
 def test_break_tri_to_tri_sierra_1_test(self):
   pm = MPI.COMM_WORLD
   p_size = parallel_machine_size(pm)
   if p_size <= 2:
     n = 2
     nx = n
     ny = n
     createEdgeSets = False
     fixture = QuadFixture_4(pm,nx,ny,createEdgeSets)
     isCommited = False
     eMesh = PerceptMesh(fixture.meta_data, fixture.bulk_data, isCommited)
     scalarDimension = 0
     proc_rank_field = eMesh.add_field("proc_rank", eMesh.element_rank(), scalarDimension)
     eMesh.add_field("proc_rank_edge", eMesh.edge_rank(), scalarDimension)
     breaker = Refiner(eMesh, TRI3_TRI3_4, proc_rank_field)
     eMesh.commit()
     fixture.generate_mesh()
     breaker.setRemoveOldElements(False)
     breaker.doBreak()
     eMesh.dump_elements_compact()
开发者ID:00liujj,项目名称:trilinos,代码行数:22,代码来源:UniformRefinerUnitTests.py

示例4: test_perceptMesh_walk_nodes

# 需要导入模块: import PerceptMesh [as 别名]
# 或者: from PerceptMesh import edge_rank [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
开发者ID:00liujj,项目名称:trilinos,代码行数:38,代码来源:PerceptMeshUnitTests.py


注:本文中的PerceptMesh.edge_rank方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。