本文整理汇总了Python中pylith.topology.Mesh.Mesh.dimension方法的典型用法代码示例。如果您正苦于以下问题:Python Mesh.dimension方法的具体用法?Python Mesh.dimension怎么用?Python Mesh.dimension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pylith.topology.Mesh.Mesh
的用法示例。
在下文中一共展示了Mesh.dimension方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_dimension
# 需要导入模块: from pylith.topology.Mesh import Mesh [as 别名]
# 或者: from pylith.topology.Mesh.Mesh import dimension [as 别名]
def test_dimension(self):
"""
Test debug().
"""
mesh = Mesh()
self.assertEqual(0, mesh.dimension())
return
示例2: test_constructorA
# 需要导入模块: from pylith.topology.Mesh import Mesh [as 别名]
# 或者: from pylith.topology.Mesh.Mesh import dimension [as 别名]
def test_constructorA(self):
"""
Test constructor.
"""
mesh = Mesh()
self.assertEqual(0, mesh.dimension())
self.assertEqual(False, mesh.debug())
return
示例3: test_dimension
# 需要导入模块: from pylith.topology.Mesh import Mesh [as 别名]
# 或者: from pylith.topology.Mesh.Mesh import dimension [as 别名]
def test_dimension(self):
"""
Test debug().
"""
mesh = self._getMesh()
submesh = Mesh(mesh=mesh, label="bc")
self.assertEqual(1, submesh.dimension())
return
示例4: test_constructorB
# 需要导入模块: from pylith.topology.Mesh import Mesh [as 别名]
# 或者: from pylith.topology.Mesh.Mesh import dimension [as 别名]
def test_constructorB(self):
"""
Test constructor.
"""
mesh = self._getMesh()
submesh = Mesh(mesh=mesh, label="bc")
self.assertEqual(1, submesh.dimension())
self.assertEqual(False, mesh.debug())
return
示例5: test_constructorB
# 需要导入模块: from pylith.topology.Mesh import Mesh [as 别名]
# 或者: from pylith.topology.Mesh.Mesh import dimension [as 别名]
def test_constructorB(self):
"""
Test constructor.
"""
dim = 2
mesh = Mesh(dim=dim)
self.assertEqual(dim, mesh.dimension())
self.assertEqual(False, mesh.debug())
return
示例6: test_constructorC
# 需要导入模块: from pylith.topology.Mesh import Mesh [as 别名]
# 或者: from pylith.topology.Mesh.Mesh import dimension [as 别名]
def test_constructorC(self):
"""
Test constructor.
"""
dim = 2
from pylith.mpi.Communicator import mpi_comm_self
mesh = Mesh(dim=dim, comm=mpi_comm_self())
self.assertEqual(dim, mesh.dimension())
self.assertEqual(False, mesh.debug())
return