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


C++ PatchData::get_element_vertex_coordinates方法代码示例

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


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

示例1: test_get_corner_normals_infinite_domain

void PatchDataTestNormals::test_get_corner_normals_infinite_domain()
{
  MsqPrintError err(cout);
  
    // Element 0 is a quad parallel to and below the Z plane.
    // All corners of the element lie on the unit sphere and
    // thus the normal should be the same as the location.
  const size_t elem_index = 0;
  std::vector<Vector3D> coords;
  Vector3D normals[4];
  unboundedMesh.get_element_vertex_coordinates( elem_index, coords, err );
  CPPUNIT_ASSERT( !err );
  CPPUNIT_ASSERT( coords.size() == 4 /*quad*/ );
  unboundedMesh.get_domain_normals_at_corners( elem_index, normals, err );
  CPPUNIT_ASSERT( !err );
  for (size_t i = 0; i < 4; ++i)
  {
    ASSERT_VECTORS_EQUAL( coords[i], normals[i] );
  }
}
开发者ID:00liujj,项目名称:trilinos,代码行数:20,代码来源:PatchDataTestNormals.cpp

示例2: test_get_corner_normals_bounded_domain

void PatchDataTestNormals::test_get_corner_normals_bounded_domain()
{
  MsqPrintError err(cout);
  std::vector<Vector3D> coords;
  Vector3D normals[4];
  
    // Element 0 is a quad in the plane X=1/sqrt(2).  Two of
    // the vertices of this element lie on the lower bounding
    // curve of the cylinder, and the other two lie in the
    // Z=0 plane
  const size_t elem_index = 0;
  boundedMesh.get_element_vertex_coordinates( elem_index, coords, err );
  CPPUNIT_ASSERT( !err );
  CPPUNIT_ASSERT( coords.size() == 4 /*quad*/ );
  boundedMesh.get_domain_normals_at_corners( elem_index, normals, err );
  CPPUNIT_ASSERT( !err );
  for (size_t i = 0; i < 4; ++i)
  {
    coords[i][2] = 0; // project into Z plane
    ASSERT_VECTORS_EQUAL( coords[i], normals[i] );
  }
} 
开发者ID:00liujj,项目名称:trilinos,代码行数:22,代码来源:PatchDataTestNormals.cpp


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