本文整理汇总了C++中TetrahedralMesh::RotateX方法的典型用法代码示例。如果您正苦于以下问题:C++ TetrahedralMesh::RotateX方法的具体用法?C++ TetrahedralMesh::RotateX怎么用?C++ TetrahedralMesh::RotateX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TetrahedralMesh
的用法示例。
在下文中一共展示了TetrahedralMesh::RotateX方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestExceptions
void TestExceptions()
{
TrianglesMeshReader<1,1> mesh_reader("mesh/test/data/1D_0_to_10_100_elements");
TetrahedralMesh<1,1> mesh;
mesh.ConstructFromMeshReader(mesh_reader);
TS_ASSERT_THROWS_THIS(mesh.RotateZ(1.4),"This rotation is not valid in less than 2D");
TS_ASSERT_THROWS_THIS(mesh.RotateY(0.3),"This rotation is only valid in 3D");
TS_ASSERT_THROWS_THIS(mesh.RotateX(0.7),"This rotation is only valid in 3D");
}
示例2:
void TestGeneralConvolution3DWithMethod()
{
TrianglesMeshReader<3,3> mesh_reader("mesh/test/data/cube_136_elements");
TetrahedralMesh<3,3> mesh;
mesh.ConstructFromMeshReader(mesh_reader);
double mesh_volume = mesh.GetVolume();
mesh.Translate(2.3, 3.1, 1.7);
mesh.RotateZ(1.4);
mesh.RotateY(0.3);
mesh.RotateX(0.7);
double new_mesh_volume = mesh.GetVolume();
TS_ASSERT_DELTA(mesh_volume, new_mesh_volume, 1e-6);
ChastePoint<3> corner_after = mesh.GetNode(6)->GetPoint();
TS_ASSERT_DELTA(corner_after[0], 3.59782, 5e-5);
TS_ASSERT_DELTA(corner_after[1], 0.583418, 5e-5);
TS_ASSERT_DELTA(corner_after[2], 4.65889, 5e-5);
}