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


C++ QualityMetricTester类代码示例

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


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

示例1: TMPQualityMetricTest

 TMPQualityMetricTest() : 
   tester( QualityMetricTester::ALL_FE_EXCEPT_SEPTAHEDRON, &settings ),
   e_weight( 2.7182818284590451 ),
   faux_pi(3.14159), faux_zero(0.0), faux_two(2.0),
   num_metric( &test_metric ),
   test_qm( &ideal, &num_metric ),
   test_qm_surf( &surf_target, &num_metric ),
   zero_qm( &ideal, &faux_zero ),
   weight_qm( &ideal, &e_weight, &test_metric ),
   center_qm( &ideal, &test_metric ),
   triCenter( centerOnly.get_mapping_function_2D(TRIANGLE) ),
   quadCenter( centerOnly.get_mapping_function_2D(QUADRILATERAL) ),
   tetCenter( centerOnly.get_mapping_function_3D(TETRAHEDRON) ),
   pyrCenter( centerOnly.get_mapping_function_3D(PYRAMID) ),
   priCenter( centerOnly.get_mapping_function_3D(PRISM) ),
   hexCenter( centerOnly.get_mapping_function_3D(HEXAHEDRON) )
 {  
   centerOnly.set_mapping_function( &triCenter );
   centerOnly.set_mapping_function( &quadCenter );
   centerOnly.set_mapping_function( &tetCenter );
   centerOnly.set_mapping_function( &pyrCenter );
   centerOnly.set_mapping_function( &priCenter );
   centerOnly.set_mapping_function( &hexCenter );
   tester.ideal_pyramid_base_equals_height( true );
 }
开发者ID:,项目名称:,代码行数:25,代码来源:

示例2: IdealWeightInverseMeanRatioTest

 IdealWeightInverseMeanRatioTest() 
   : tester(QualityMetricTester::ALL_FE_EXCEPT_SEPTAHEDRON)
   { tester.ideal_pyramid_base_equals_height( true ); }
开发者ID:bddavid,项目名称:mesquite,代码行数:3,代码来源:IdealWeightInverseMeanRatioTest.cpp

示例3: test_ideal_element_eval

 void test_ideal_element_eval()
 {
   tester.test_evaluate_unit_edge_element( &mMetric, TRIANGLE,      1.0 );
   tester.test_evaluate_unit_edge_element( &mMetric, QUADRILATERAL, 1.0 );
   tester.test_evaluate_unit_edge_element( &mMetric, TETRAHEDRON,   1.0 );
   tester.test_evaluate_unit_edge_element( &mMetric, PYRAMID,       1.0 );
   tester.test_evaluate_unit_edge_element( &mMetric, PRISM,         1.0 );
   tester.test_evaluate_unit_edge_element( &mMetric, HEXAHEDRON,    1.0 );
 }
开发者ID:bddavid,项目名称:mesquite,代码行数:9,代码来源:EdgeLengthMetricTest.cpp

示例4: get_nonideal_element

 void get_nonideal_element( EntityTopology type, PatchData& pd )
   {
     tester.get_nonideal_element( type, pd, true );
       // Callers assume surface elements are in XY plane.
       // Verify this assumption.
     if (TopologyInfo::dimension(type) == 2) {
       for (size_t i = 0; i < pd.num_nodes(); ++i) {
         CPPUNIT_ASSERT_DOUBLES_EQUAL( pd.vertex_by_index(i)[2], 0.0, 1e-6 );
       }
     }
   }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例5: test_ideal_element_eval

  void test_ideal_element_eval()
  {
    tester.test_evaluate_unit_tris_about_vertex( &mMetric, 1.0 );
    tester.test_evaluate_unit_quads_about_vertex( &mMetric, 1.0 );
    tester.test_evaluate_unit_hexes_about_vertex( &mMetric, 1.0 );

    tester.test_evaluate_unit_edge_element( &mMetric, TRIANGLE, 1.0 );
    tester.test_evaluate_unit_edge_element( &mMetric, QUADRILATERAL, 1.0 );
    tester.test_evaluate_unit_edge_element( &mMetric, TETRAHEDRON, 1.0 );
    tester.test_evaluate_unit_edge_element( &mMetric, HEXAHEDRON, 1.0 );
  }
开发者ID:haripandey,项目名称:trilinos,代码行数:11,代码来源:VertexConditionNumberTest.cpp

示例6: err

  void test_evaluate_2D_weight()
    {
      MsqPrintError err(cout);
      PatchData pd;
      bool rval;
      double value;

      QMType m( &ideal, &e_weight, &faux_pi );
      tester.get_ideal_element( TRIANGLE, true, pd );
      rval = m.evaluate( pd, 0, value, err );
      CPPUNIT_ASSERT(!MSQ_CHKERR(err));
      CPPUNIT_ASSERT(rval);
      CPPUNIT_ASSERT_DOUBLES_EQUAL( faux_pi.value*e_weight.value, value, DBL_EPSILON );
    }
开发者ID:,项目名称:,代码行数:14,代码来源:

示例7: test_surf_eval_ortho_quad

  void test_surf_eval_ortho_quad()
    {
      MsqPrintError err(cout);
      PatchData pd;
      bool rval;
      double value;

      QMType m( &surf_target, &faux_zero );
      faux_zero.count = 0;

      tester.get_ideal_element( QUADRILATERAL, true, pd );
      rval = m.evaluate( pd, 0, value, err );
      CPPUNIT_ASSERT(!MSQ_CHKERR(err));
      CPPUNIT_ASSERT(rval);
      CPPUNIT_ASSERT_EQUAL( 1, faux_zero.count );
      CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, col_dot_prod(faux_zero.last_A_2D), DBL_EPSILON );
    }  
开发者ID:,项目名称:,代码行数:17,代码来源:

示例8: test_valid_hessian

 void test_valid_hessian()
   { tester.test_symmetric_Hessian_diagonal_blocks( &mMetric ); }
开发者ID:bddavid,项目名称:mesquite,代码行数:2,代码来源:IdealWeightInverseMeanRatioTest.cpp

示例9: test_ideal_element_grad

 void test_ideal_element_grad()
   { tester.test_ideal_element_zero_gradient( &mMetric, false ); }
开发者ID:bddavid,项目名称:mesquite,代码行数:2,代码来源:IdealWeightInverseMeanRatioTest.cpp

示例10: test_scale_invariant

 void test_scale_invariant()
 {
   tester.test_scale_invariant( &mMetric );
 }
开发者ID:bddavid,项目名称:mesquite,代码行数:4,代码来源:IdealWeightInverseMeanRatioTest.cpp

示例11: test_eval_with_hessian_diagonal

 void test_eval_with_hessian_diagonal()
 {
   tester.compare_eval_with_diag_and_eval_with_hessian( &mMetric );
 }
开发者ID:bddavid,项目名称:mesquite,代码行数:4,代码来源:IdealWeightInverseMeanRatioTest.cpp

示例12: test_eval_with_gradient

 void test_eval_with_gradient()
 {
   tester.compare_eval_with_indices_and_eval_with_gradient( &mMetric );
   tester.compare_analytical_and_numerical_gradients( &mMetric );
 }
开发者ID:bddavid,项目名称:mesquite,代码行数:5,代码来源:IdealWeightInverseMeanRatioTest.cpp

示例13: test_get_evaluations

 void test_get_evaluations()
   { tester.test_get_vertex_evaluations( &mMetric ); }
开发者ID:bddavid,项目名称:mesquite,代码行数:2,代码来源:EdgeLengthQualityMetricTest.cpp

示例14: test_ideal_element_eval

 void test_ideal_element_eval()
 {
   tester.test_evaluate_unit_edge_tris_about_vertex( &mMetric, 6.0 );
   tester.test_evaluate_unit_quads_about_vertex( &mMetric, 4.0 );
   tester.test_evaluate_unit_hexes_about_vertex( &mMetric, 6.0 );
 }
开发者ID:bddavid,项目名称:mesquite,代码行数:6,代码来源:EdgeLengthQualityMetricTest.cpp

示例15: test_get_fixed_indices

 void test_get_fixed_indices()
   { tester.test_get_indices_fixed( &mMetric ); }
开发者ID:bddavid,项目名称:mesquite,代码行数:2,代码来源:IdealWeightInverseMeanRatioTest.cpp


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