本文整理汇总了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 );
}
示例2: IdealWeightInverseMeanRatioTest
IdealWeightInverseMeanRatioTest()
: tester(QualityMetricTester::ALL_FE_EXCEPT_SEPTAHEDRON)
{ tester.ideal_pyramid_base_equals_height( true ); }
示例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 );
}
示例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 );
}
}
}
示例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 );
}
示例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 );
}
示例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 );
}
示例8: test_valid_hessian
void test_valid_hessian()
{ tester.test_symmetric_Hessian_diagonal_blocks( &mMetric ); }
示例9: test_ideal_element_grad
void test_ideal_element_grad()
{ tester.test_ideal_element_zero_gradient( &mMetric, false ); }
示例10: test_scale_invariant
void test_scale_invariant()
{
tester.test_scale_invariant( &mMetric );
}
示例11: test_eval_with_hessian_diagonal
void test_eval_with_hessian_diagonal()
{
tester.compare_eval_with_diag_and_eval_with_hessian( &mMetric );
}
示例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 );
}
示例13: test_get_evaluations
void test_get_evaluations()
{ tester.test_get_vertex_evaluations( &mMetric ); }
示例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 );
}
示例15: test_get_fixed_indices
void test_get_fixed_indices()
{ tester.test_get_indices_fixed( &mMetric ); }