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


Python BoundingBoxTree.compute_first_entity_collision方法代码示例

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


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

示例1: test_compute_first_entity_collision_3d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
def test_compute_first_entity_collision_3d():

    reference = [876, 877, 878, 879, 880, 881]

    p = Point(0.3, 0.3, 0.3)
    mesh = UnitCubeMesh(8, 8, 8)
    tree = BoundingBoxTree()
    tree.build(mesh)
    first = tree.compute_first_entity_collision(p)
    assert first in reference

    tree = mesh.bounding_box_tree()
    first = tree.compute_first_entity_collision(p)
    assert first in reference
开发者ID:vincentqb,项目名称:dolfin,代码行数:16,代码来源:test_bounding_box_tree.py

示例2: test_compute_first_entity_collision_1d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
def test_compute_first_entity_collision_1d():

    reference = [4]

    p = Point(0.3)
    mesh = UnitIntervalMesh(16)
    tree = BoundingBoxTree()
    tree.build(mesh)
    first = tree.compute_first_entity_collision(p)
    assert first in reference

    tree = mesh.bounding_box_tree()
    first = tree.compute_first_entity_collision(p)
    assert first in reference
开发者ID:vincentqb,项目名称:dolfin,代码行数:16,代码来源:test_bounding_box_tree.py

示例3: test_compute_first_entity_collision_2d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
def test_compute_first_entity_collision_2d():

    reference = [136, 137]

    p = Point(0.3, 0.3)
    mesh = UnitSquareMesh(16, 16)
    tree = BoundingBoxTree()
    tree.build(mesh)
    first = tree.compute_first_entity_collision(p)
    assert first in reference

    tree = mesh.bounding_box_tree()
    first = tree.compute_first_entity_collision(p)
    assert first in reference
开发者ID:vincentqb,项目名称:dolfin,代码行数:16,代码来源:test_bounding_box_tree.py

示例4: test_compute_first_entity_collision_3d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
    def test_compute_first_entity_collision_3d(self):

        reference = [876, 877, 878, 879, 880, 881]

        p = Point(0.3, 0.3, 0.3)
        mesh = UnitCubeMesh(8, 8, 8)
        tree = BoundingBoxTree()
        tree.build(mesh)
        first = tree.compute_first_entity_collision(p)
        if MPI.size(mesh.mpi_comm()) == 1:
            self.assertIn(first, reference)

        tree = mesh.bounding_box_tree()
        first = tree.compute_first_entity_collision(p)
        if MPI.size(mesh.mpi_comm()) == 1:
            self.assertIn(first, reference)
开发者ID:YannCobigo,项目名称:dolfin,代码行数:18,代码来源:BoundingBoxTree.py

示例5: test_compute_first_entity_collision_1d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
    def test_compute_first_entity_collision_1d(self):

        reference = [4]

        p = Point(0.3)
        mesh = UnitIntervalMesh(16)
        tree = BoundingBoxTree()
        tree.build(mesh)
        first = tree.compute_first_entity_collision(p)
        if MPI.size(mesh.mpi_comm()) == 1:
            self.assertIn(first, reference)

        tree = mesh.bounding_box_tree()
        first = tree.compute_first_entity_collision(p)
        if MPI.size(mesh.mpi_comm()) == 1:
            self.assertIn(first, reference)
开发者ID:YannCobigo,项目名称:dolfin,代码行数:18,代码来源:BoundingBoxTree.py

示例6: test_compute_first_entity_collision_2d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
    def test_compute_first_entity_collision_2d(self):

        reference = [136, 137]

        p = Point(0.3, 0.3)
        mesh = UnitSquareMesh(16, 16)
        tree = BoundingBoxTree()
        tree.build(mesh)
        first = tree.compute_first_entity_collision(p)
        if MPI.num_processes() == 1:
            self.assertIn(first, reference)


        tree = mesh.bounding_box_tree()
        first = tree.compute_first_entity_collision(p)
        if MPI.num_processes() == 1:
            self.assertIn(first, reference)
开发者ID:maciekswat,项目名称:dolfin_1.3.0,代码行数:19,代码来源:BoundingBoxTree.py

示例7: test_compute_first_entity_collision_3d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
    def test_compute_first_entity_collision_3d(self):

        reference = [876, 877, 878, 879, 880, 881]

        p = Point(0.3, 0.3, 0.3)
        mesh = UnitCubeMesh(8, 8, 8)
        tree = BoundingBoxTree()
        tree.build(mesh)
        first = tree.compute_first_entity_collision(p, mesh)
        if MPI.num_processes() == 1:
            self.assertIn(first, reference)
开发者ID:MiroK,项目名称:DolfinSurface,代码行数:13,代码来源:BoundingBoxTree.py

示例8: test_compute_first_entity_collision_1d

# 需要导入模块: from dolfin import BoundingBoxTree [as 别名]
# 或者: from dolfin.BoundingBoxTree import compute_first_entity_collision [as 别名]
    def test_compute_first_entity_collision_1d(self):

        reference = [4]

        p = Point(0.3)
        mesh = UnitIntervalMesh(16)
        tree = BoundingBoxTree()
        tree.build(mesh)
        first = tree.compute_first_entity_collision(p, mesh)
        if MPI.num_processes() == 1:
            self.assertIn(first, reference)
开发者ID:MiroK,项目名称:DolfinSurface,代码行数:13,代码来源:BoundingBoxTree.py


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