MOAB: Mesh Oriented datABase  (version 5.4.1)
HexLagrangeShapeTest.cpp File Reference
#include "Mesquite.hpp"
#include "HexLagrangeShape.hpp"
#include "TopologyInfo.hpp"
#include "MsqError.hpp"
#include "IdealElements.hpp"
#include "JacobianCalculator.hpp"
#include "UnitUtil.hpp"
#include <vector>
#include <algorithm>
#include <iostream>
#include <sstream>
+ Include dependency graph for HexLagrangeShapeTest.cpp:

Go to the source code of this file.

Classes

class  HexLagrangeShapeTest

Defines

#define ASSERT_VALUES_EQUAL(v1, v2, location)   ASSERT_MESSAGE( value_message( ( location ), ( v1 ), ( v2 ) ), test_value( ( v1 ), ( v2 ) ) )

Typedefs

typedef double(* f_t )(double)

Enumerations

enum  { XI = 0, ETA = 1, ZETA = 2 }

Functions

static bool test_value (double v1, double v2)
static CppUnit::Message value_message (unsigned location, double v1, double v2)
static bool test_value (MsqVector< 3 > v1, MsqVector< 3 > v2)
static CppUnit::Message value_message (unsigned location, MsqVector< 3 > v1, MsqVector< 3 > v2)
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (HexLagrangeShapeTest,"HexLagrangeShapeTest")
 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (HexLagrangeShapeTest,"Unit")
static double l21 (double xi)
static double l22 (double xi)
static double l23 (double xi)
static double dl21 (double xi)
static double dl22 (double xi)
static double dl23 (double xi)
static MsqVector< 3 > XI_corner (int i)
static MsqVector< 3 > XI_edge (int i)
static MsqVector< 3 > XI_face (int i)
static MsqVector< 3 > XI_elem ()
static double N (int i, MsqVector< 3 > xi)
static MsqVector< 3 > dN (int i, MsqVector< 3 > xi)
static void get_coeffs (MsqVector< 3 > xi, double coeffs_out[27])
static void get_derivs (MsqVector< 3 > xi, MsqVector< 3 > derivs_out[27])
static void check_valid_indices (const size_t *vertices, size_t num_vtx)
static void check_no_zeros (const MsqVector< 3 > *derivs, size_t num_vtx)
static void compare_coefficients (const double *coeffs, const size_t *indices, size_t num_coeff, const double *expected_coeffs, unsigned loc)
static void compare_derivatives (const size_t *vertices, size_t num_vtx, const MsqVector< 3 > *actual, const MsqVector< 3 > *expected, unsigned loc)

Variables

const double epsilon = 1e-6
const double min_xi = 0
const double max_xi = 1
const double mid_xi = 0.5 * ( min_xi + max_xi )
f_t l [4] = { 0, &l21, &l22, &l23 }
f_t dl [4] = { 0, &dl21, &dl22, &dl23 }
const int C [][3]
const double corners [8][3]

Detailed Description

Author:
Jason Kraftcheck

Definition in file HexLagrangeShapeTest.cpp.


Define Documentation

#define ASSERT_VALUES_EQUAL (   v1,
  v2,
  location 
)    ASSERT_MESSAGE( value_message( ( location ), ( v1 ), ( v2 ) ), test_value( ( v1 ), ( v2 ) ) )

Definition at line 49 of file HexLagrangeShapeTest.cpp.

Referenced by compare_coefficients(), and compare_derivatives().


Typedef Documentation

typedef double( * f_t)(double)

Definition at line 209 of file HexLagrangeShapeTest.cpp.


Enumeration Type Documentation

anonymous enum
Enumerator:
XI 
ETA 
ZETA 

Definition at line 171 of file HexLagrangeShapeTest.cpp.

{
    XI   = 0,
    ETA  = 1,
    ZETA = 2
};

Function Documentation

static void check_no_zeros ( const MsqVector< 3 > *  derivs,
size_t  num_vtx 
) [static]

Definition at line 324 of file HexLagrangeShapeTest.cpp.

References CPPUNIT_ASSERT, and MBMesquite::length().

Referenced by compare_derivatives().

{
    for( unsigned i = 0; i < num_vtx; ++i )
    {
        CPPUNIT_ASSERT( length( derivs[i] ) > 1e-6 );
    }
}
static void check_valid_indices ( const size_t *  vertices,
size_t  num_vtx 
) [static]

Definition at line 309 of file HexLagrangeShapeTest.cpp.

References CPPUNIT_ASSERT.

Referenced by compare_derivatives().

{
    // check valid size of list (at least fout, at most all nodes)
    CPPUNIT_ASSERT( num_vtx <= 27 );
    CPPUNIT_ASSERT( num_vtx >= 4 );
    // make sure vertex indices are valid (in [0,26])
    size_t vertcopy[27];
    std::copy( vertices, vertices + num_vtx, vertcopy );
    std::sort( vertcopy, vertcopy + num_vtx );
    CPPUNIT_ASSERT( vertcopy[num_vtx - 1] <= 26 );  // max value less than 27
                                                    // make sure there are no duplicates in the list
    const size_t* iter = std::unique( vertcopy, vertcopy + num_vtx );
    CPPUNIT_ASSERT( iter == vertcopy + num_vtx );
}
static void compare_coefficients ( const double *  coeffs,
const size_t *  indices,
size_t  num_coeff,
const double *  expected_coeffs,
unsigned  loc 
) [static]

Definition at line 332 of file HexLagrangeShapeTest.cpp.

References ASSERT_VALUES_EQUAL.

Referenced by HexLagrangeShapeTest::test_corner_coeff(), HexLagrangeShapeTest::test_edge_coeff(), HexLagrangeShapeTest::test_face_coeff(), and HexLagrangeShapeTest::test_mid_coeff().

{
    // find the location in the returned list for each node
    size_t revidx[27];
    double test_vals[27];
    for( size_t i = 0; i < 27; ++i )
    {
        revidx[i]    = std::find( indices, indices + num_coeff, i ) - indices;
        test_vals[i] = ( revidx[i] == num_coeff ) ? 0.0 : coeffs[revidx[i]];
    }

    // compare expected and actual coefficient values
    ASSERT_VALUES_EQUAL( expected_coeffs[0], test_vals[0], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[1], test_vals[1], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[2], test_vals[2], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[3], test_vals[3], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[4], test_vals[4], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[5], test_vals[5], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[6], test_vals[6], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[7], test_vals[7], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[8], test_vals[8], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[9], test_vals[9], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[10], test_vals[10], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[11], test_vals[11], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[12], test_vals[12], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[13], test_vals[13], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[14], test_vals[14], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[15], test_vals[15], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[16], test_vals[16], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[17], test_vals[17], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[18], test_vals[18], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[19], test_vals[19], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[20], test_vals[20], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[21], test_vals[21], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[22], test_vals[22], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[23], test_vals[23], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[24], test_vals[24], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[25], test_vals[25], loc );
    ASSERT_VALUES_EQUAL( expected_coeffs[26], test_vals[26], loc );
}
static void compare_derivatives ( const size_t *  vertices,
size_t  num_vtx,
const MsqVector< 3 > *  actual,
const MsqVector< 3 > *  expected,
unsigned  loc 
) [static]

Definition at line 377 of file HexLagrangeShapeTest.cpp.

References ASSERT_VALUES_EQUAL, check_no_zeros(), check_valid_indices(), and CPPUNIT_ASSERT.

Referenced by HexLagrangeShapeTest::test_corner_derivs(), HexLagrangeShapeTest::test_edge_derivs(), HexLagrangeShapeTest::test_face_derivs(), and HexLagrangeShapeTest::test_mid_derivs().

{
    check_valid_indices( vertices, num_vtx );
    check_no_zeros( actual, num_vtx );

    // Input has values in dxi & deta & dzeta only for nodes in 'vertices'
    // Convert to values for every possible node, with zero's for
    // nodes that are not present.
    CPPUNIT_ASSERT( num_vtx <= 9 );
    MsqVector< 3 > expanded[27];
    std::fill( expanded, expanded + 27, MsqVector< 3 >( 0.0 ) );
    for( unsigned i = 0; i < num_vtx; ++i )
    {
        CPPUNIT_ASSERT( vertices[i] <= 26 );
        expanded[vertices[i]] = actual[i];
    }

    ASSERT_VALUES_EQUAL( expected[0], expanded[0], loc );
    ASSERT_VALUES_EQUAL( expected[1], expanded[1], loc );
    ASSERT_VALUES_EQUAL( expected[2], expanded[2], loc );
    ASSERT_VALUES_EQUAL( expected[3], expanded[3], loc );
    ASSERT_VALUES_EQUAL( expected[4], expanded[4], loc );
    ASSERT_VALUES_EQUAL( expected[5], expanded[5], loc );
    ASSERT_VALUES_EQUAL( expected[6], expanded[6], loc );
    ASSERT_VALUES_EQUAL( expected[7], expanded[7], loc );
    ASSERT_VALUES_EQUAL( expected[8], expanded[8], loc );
    ASSERT_VALUES_EQUAL( expected[9], expanded[9], loc );
    ASSERT_VALUES_EQUAL( expected[10], expanded[10], loc );
    ASSERT_VALUES_EQUAL( expected[11], expanded[11], loc );
    ASSERT_VALUES_EQUAL( expected[12], expanded[12], loc );
    ASSERT_VALUES_EQUAL( expected[13], expanded[13], loc );
    ASSERT_VALUES_EQUAL( expected[14], expanded[14], loc );
    ASSERT_VALUES_EQUAL( expected[15], expanded[15], loc );
    ASSERT_VALUES_EQUAL( expected[16], expanded[16], loc );
    ASSERT_VALUES_EQUAL( expected[17], expanded[17], loc );
    ASSERT_VALUES_EQUAL( expected[18], expanded[18], loc );
    ASSERT_VALUES_EQUAL( expected[19], expanded[19], loc );
    ASSERT_VALUES_EQUAL( expected[20], expanded[20], loc );
    ASSERT_VALUES_EQUAL( expected[21], expanded[21], loc );
    ASSERT_VALUES_EQUAL( expected[22], expanded[22], loc );
    ASSERT_VALUES_EQUAL( expected[23], expanded[23], loc );
    ASSERT_VALUES_EQUAL( expected[24], expanded[24], loc );
    ASSERT_VALUES_EQUAL( expected[25], expanded[25], loc );
    ASSERT_VALUES_EQUAL( expected[26], expanded[26], loc );
}
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION ( HexLagrangeShapeTest  ,
"HexLagrangeShapeTest"   
)
static double dl21 ( double  xi) [static]

Definition at line 196 of file HexLagrangeShapeTest.cpp.

{
    return 4 * xi - 3;
}
static double dl22 ( double  xi) [static]

Definition at line 200 of file HexLagrangeShapeTest.cpp.

References MBMesquite::xi.

{
    return 4 - 8 * xi;
}
static double dl23 ( double  xi) [static]

Definition at line 204 of file HexLagrangeShapeTest.cpp.

{
    return 4 * xi - 1;
}
static MsqVector< 3 > dN ( int  i,
MsqVector< 3 >  xi 
) [static]

Definition at line 287 of file HexLagrangeShapeTest.cpp.

References C, dl, ETA, l, XI, and ZETA.

Referenced by get_derivs().

{
    MsqVector< 3 > result;
    const int* c = C[i];
    result[XI]   = dl[c[XI]]( xi[XI] ) * l[c[ETA]]( xi[ETA] ) * l[c[ZETA]]( xi[ZETA] );
    result[ETA]  = l[c[XI]]( xi[XI] ) * dl[c[ETA]]( xi[ETA] ) * l[c[ZETA]]( xi[ZETA] );
    result[ZETA] = l[c[XI]]( xi[XI] ) * l[c[ETA]]( xi[ETA] ) * dl[c[ZETA]]( xi[ZETA] );
    return result;
}
static void get_coeffs ( MsqVector< 3 >  xi,
double  coeffs_out[27] 
) [static]

Definition at line 297 of file HexLagrangeShapeTest.cpp.

References N.

Referenced by HexLagrangeShapeTest::test_corner_coeff(), HexLagrangeShapeTest::test_edge_coeff(), HexLagrangeShapeTest::test_face_coeff(), and HexLagrangeShapeTest::test_mid_coeff().

{
    for( int i = 0; i < 27; ++i )
        coeffs_out[i] = N( i, xi );
}
static void get_derivs ( MsqVector< 3 >  xi,
MsqVector< 3 >  derivs_out[27] 
) [static]

Definition at line 303 of file HexLagrangeShapeTest.cpp.

References dN().

Referenced by HexLagrangeShapeTest::test_corner_derivs(), HexLagrangeShapeTest::test_edge_derivs(), HexLagrangeShapeTest::test_face_derivs(), and HexLagrangeShapeTest::test_mid_derivs().

{
    for( int i = 0; i < 27; ++i )
        derivs_out[i] = dN( i, xi );
}
static double l21 ( double  xi) [static]

Definition at line 183 of file HexLagrangeShapeTest.cpp.

{
    return ( 2 * xi - 1 ) * ( xi - 1 );
}
static double l22 ( double  xi) [static]

Definition at line 187 of file HexLagrangeShapeTest.cpp.

References MBMesquite::xi.

{
    return 4 * xi * ( 1 - xi );
}
static double l23 ( double  xi) [static]

Definition at line 191 of file HexLagrangeShapeTest.cpp.

{
    return xi * ( 2 * xi - 1 );
}
static double N ( int  i,
MsqVector< 3 >  xi 
) [static]

Definition at line 281 of file HexLagrangeShapeTest.cpp.

References C, ETA, l, XI, and ZETA.

{
    const int* c = C[i];
    return l[c[XI]]( xi[XI] ) * l[c[ETA]]( xi[ETA] ) * l[c[ZETA]]( xi[ZETA] );
}
static bool test_value ( MsqVector< 3 >  v1,
MsqVector< 3 >  v2 
) [static]

Definition at line 85 of file HexLagrangeShapeTest.cpp.

References epsilon, and MBMesquite::length().

{
    return length( v1 - v2 ) < epsilon;
}
static CppUnit::Message value_message ( unsigned  location,
double  v1,
double  v2 
) [inline, static]

Definition at line 57 of file HexLagrangeShapeTest.cpp.

{
    CppUnit::Message m( "equality assertion failed" );

    std::ostringstream buffer1;
    buffer1 << "Expected : " << v1;
    m.addDetail( buffer1.str() );

    std::ostringstream buffer2;
    buffer2 << "Actual   : " << v2;
    m.addDetail( buffer2.str() );

    std::ostringstream buffer3;
    buffer3 << "Location : ";
    if( location < 9 )
        buffer3 << "Corner " << location;
    else if( location < 20 )
        buffer3 << "Edge " << location - 8;
    else if( location < 26 )
        buffer3 << "Face " << location - 20;
    else if( location == 26 )
        buffer3 << "Mid-element";
    else
        buffer3 << "INVALID!!";
    m.addDetail( buffer3.str() );
    return m;
}
static CppUnit::Message value_message ( unsigned  location,
MsqVector< 3 >  v1,
MsqVector< 3 >  v2 
) [inline, static]

Definition at line 90 of file HexLagrangeShapeTest.cpp.

{
    CppUnit::Message m( "equality assertion failed" );

    std::ostringstream buffer1;
    buffer1 << "Expected : [" << v1[0] << ", " << v1[1] << ", " << v1[2] << "]";
    m.addDetail( buffer1.str() );

    std::ostringstream buffer2;
    buffer2 << "Actual   : [" << v2[0] << ", " << v2[1] << ", " << v2[2] << "]";
    m.addDetail( buffer2.str() );

    std::ostringstream buffer3;
    buffer3 << "Location : ";
    if( location < 9 )
        buffer3 << "Corner " << location;
    else if( location < 20 )
        buffer3 << "Edge " << location - 8;
    else if( location < 26 )
        buffer3 << "Face " << location - 20;
    else if( location == 26 )
        buffer3 << "Mid-element";
    else
        buffer3 << "INVALID!!";
    m.addDetail( buffer3.str() );
    return m;
}
static MsqVector< 3 > XI_corner ( int  i) [static]
static MsqVector< 3 > XI_edge ( int  i) [static]

Definition at line 258 of file HexLagrangeShapeTest.cpp.

References MBMesquite::HEXAHEDRON, and XI_corner().

Referenced by HexLagrangeShapeTest::test_edge_coeff(), and HexLagrangeShapeTest::test_edge_derivs().

{
    const unsigned* idx = TopologyInfo::edge_vertices( HEXAHEDRON, i );
    return 0.5 * ( XI_corner( idx[0] ) + XI_corner( idx[1] ) );
}
static MsqVector< 3 > XI_elem ( ) [static]

Definition at line 275 of file HexLagrangeShapeTest.cpp.

References mid_xi.

Referenced by HexLagrangeShapeTest::test_mid_coeff(), and HexLagrangeShapeTest::test_mid_derivs().

{
    const double vals[] = { mid_xi, mid_xi, mid_xi };
    return MsqVector< 3 >( vals );
}
static MsqVector< 3 > XI_face ( int  i) [static]

Definition at line 264 of file HexLagrangeShapeTest.cpp.

References MBMesquite::HEXAHEDRON, n, and XI_corner().

Referenced by HexLagrangeShapeTest::test_face_coeff(), and HexLagrangeShapeTest::test_face_derivs().

{
    unsigned n;
    const unsigned* idx   = TopologyInfo::face_vertices( HEXAHEDRON, i, n );
    MsqVector< 3 > result = XI_corner( idx[0] );
    for( unsigned j = 1; j < n; ++j )
        result += XI_corner( idx[j] );
    result *= 1.0 / n;
    return result;
}

Variable Documentation

const int C[][3]

Definition at line 212 of file HexLagrangeShapeTest.cpp.

Referenced by MBMesquite::MsqMatrix< R, C >::add_row(), MBMesquite::MsqMatrix< R, C >::assign_add_product(), MBMesquite::MsqMatrix< R, C >::assign_add_transpose(), MBMesquite::MsqMatrix< R, C >::assign_multiply_elements(), MBMesquite::MsqMatrix< R, C >::assign_product(), moab::IntxUtils::borderPointsOfCSinRLL(), moab::IntxUtils::borderPointsOfXinY2(), moab::MeshGeneration::BrickInstance(), MBMesquite::MsqMatrix< R, C >::diag(), dN(), moab::IntxUtils::EdgeIntxRllCs(), moab::IntxUtils::enforce_convexity(), gather_related_test(), ident_check(), iMOAB::iMOAB_CreateElements::iMOAB_CreateElements(), iMOAB::iMOAB_DefineTagStorage::iMOAB_DefineTagStorage(), iMOAB::iMOAB_DetermineGhostEntities::iMOAB_DetermineGhostEntities(), iMOAB::iMOAB_Finalize::iMOAB_Finalize(), iMOAB::iMOAB_GetBlockElementConnectivities::iMOAB_GetBlockElementConnectivities(), iMOAB::iMOAB_GetBlockInfo::iMOAB_GetBlockInfo(), iMOAB::iMOAB_GetDoubleTagStorage::iMOAB_GetDoubleTagStorage(), iMOAB::iMOAB_GetElementConnectivity::iMOAB_GetElementConnectivity(), iMOAB::iMOAB_GetElementID::iMOAB_GetElementID(), iMOAB::iMOAB_GetElementOwnership::iMOAB_GetElementOwnership(), iMOAB::iMOAB_GetIntTagStorage::iMOAB_GetIntTagStorage(), iMOAB::iMOAB_GetMeshInfo::iMOAB_GetMeshInfo(), iMOAB::iMOAB_GetNeighborElements::iMOAB_GetNeighborElements(), iMOAB::iMOAB_GetNeighborVertices::iMOAB_GetNeighborVertices(), iMOAB::iMOAB_GetPointerToSurfaceBC::iMOAB_GetPointerToSurfaceBC(), iMOAB::iMOAB_GetPointerToVertexBC::iMOAB_GetPointerToVertexBC(), iMOAB::iMOAB_GetVertexOwnership::iMOAB_GetVertexOwnership(), iMOAB::iMOAB_GetVisibleElementsInfo::iMOAB_GetVisibleElementsInfo(), iMOAB::iMOAB_GetVisibleVerticesCoordinates::iMOAB_GetVisibleVerticesCoordinates(), iMOAB::iMOAB_ReadHeaderInfo::iMOAB_ReadHeaderInfo(), iMOAB::iMOAB_RegisterApplication::iMOAB_RegisterApplication(), iMOAB::iMOAB_SetDoubleTagStorage::iMOAB_SetDoubleTagStorage(), iMOAB::iMOAB_SetDoubleTagStorageWithGid::iMOAB_SetDoubleTagStorageWithGid(), iMOAB::iMOAB_SetIntTagStorage::iMOAB_SetIntTagStorage(), iMOAB::iMOAB_WriteLocalMesh::iMOAB_WriteLocalMesh(), MBMesquite::inner_product(), MBMesquite::MsqMatrix< R, C >::make_minor(), mat_equal_check(), msq_mat_str(), mxm_cc(), mxm_cr(), mxm_rc(), N(), MBMesquite::MsqMatrix< 3, 3 >::operator()(), MBMesquite::operator*(), MBMesquite::MsqMatrix< R, C >::operator*=(), MBMesquite::MsqMatrix< R, C >::operator+=(), MBMesquite::operator-(), MBMesquite::MsqMatrix< R, C >::operator-=(), MBMesquite::MsqMatrix< R, C >::operator/=(), MBMesquite::operator<<(), MBMesquite::operator==(), MBMesquite::operator>>(), MBMesquite::MsqMatrixA< R, C >::operator[](), MBMesquite::outer(), MBMesquite::pmean_corner_hessians(), moab::SimplexTemplateRefiner::refine_3_simplex(), MBMesquite::MsqMatrix< 3, 3 >::row(), MBMesquite::MsqMatrix< 3, 3 >::set(), MBMesquite::MsqMatrix< R, C >::set(), MBMesquite::MsqMatrix< R, C >::set_columns(), MBMesquite::MsqMatrix< R, C >::set_row(), MBMesquite::MsqMatrix< R, C >::set_row_transpose(), MBMesquite::sqr_Frobenius(), MBMesquite::sum_corner_hessians(), MBMesquite::sum_sqr_corner_hessians(), SymMatrix3DTest::test_divide_eq(), test_great_arc_clat_intx(), test_great_arc_intx(), PMeanPMetricTest::test_hessian(), test_leaf_containing_point_bounded_tree(), test_leaf_containing_point_unbounded_tree(), SymMatrix3DTest::test_minus(), SymMatrix3DTest::test_minus_eq(), SymMatrix3DTest::test_minus_nonsym(), SymMatrix3DTest::test_multiply(), SymMatrix3DTest::test_nonsym_multiply(), SymMatrix3DTest::test_plus(), SymMatrix3DTest::test_plus_eq(), SymMatrix3DTest::test_plus_nonsym(), SymMatrix3DTest::test_scalar_multiply(), SymMatrix3DTest::test_times_eq(), MBMesquite::transpose(), and v_tet_aspect_ratio().

const double corners[8][3]
Initial value:
 { { min_xi, min_xi, min_xi }, { max_xi, min_xi, min_xi }, { max_xi, max_xi, min_xi },
                               { min_xi, max_xi, min_xi }, { min_xi, min_xi, max_xi }, { max_xi, min_xi, max_xi },
                               { max_xi, max_xi, max_xi }, { min_xi, max_xi, max_xi } }

Definition at line 249 of file HexLagrangeShapeTest.cpp.

Referenced by MBMesquite::append_elem_samples(), MBMesquite::ArrayMesh::ArrayMesh(), MBMesquite::average_corner_diagonals(), MBMesquite::AveragingQM::average_corner_gradients(), MBMesquite::AveragingQM::average_corner_hessians(), TopologyInfoTest::bad_type(), moab::GeomUtil::box_hex_overlap(), moab::GeomUtil::box_linear_elem_overlap(), moab::GeomUtil::box_tet_overlap(), moab::BoxPlaneIter::BoxPlaneIter(), moab::BSPTreeIter::calculate_polyhedron(), MBMesquite::MsqMeshEntity::check_element_orientation(), check_no_slaved_corners(), check_slaved_coords(), MBMesquite::MeshImplData::clear_element(), MBMesquite::MappingFunction::convert_connectivity_indices(), MBMesquite::MappingFunction::convert_connectivity_indices_impl(), MBMesquite::MeshImplData::copy_mesh(), MBMesquite::create_ideal_element_patch(), create_regular_mesh(), moab::ReadCGM::create_surface_facets(), moab::BSPTree::create_tree(), MBMesquite::derivatives_at_mid_elem(), LinearMappingFunctionTest::do_coeff_test(), LinearMappingFunctionTest::do_deriv_test(), LinearMappingFunctionTest::do_ideal_test(), MBMesquite::MeshImplData::element_topology(), MBMesquite::PatchData::fill(), find_face(), MBMesquite::find_skin(), MBMesquite::PatchData::get_adjacent_vertex_indices(), PatchDataTest::get_higher_order_vertices(), QualityMetricTester::get_ideal_element(), PatchDataTest::get_quad8_mesh_and_domain(), MBMesquite::PatchData::get_samples(), TopologyInfoTest::hex(), MBMesquite::Instruction::initialize_vertex_byte(), moab::BSPTreeIter::intersect_ray(), MBMesquite::SlaveBoundaryVertices::loop_over_mesh(), main(), SlaveBoundaryVerticesTest::make_mesh(), MBMesquite::MeshImpl::MeshImpl(), MBMesquite::next_vertex(), MBMesquite::PatchData::non_slave_node_set(), MBMesquite::MeshImplData::num_vertex_uses(), MBMesquite::pmean_corner_diagonals(), MBMesquite::pmean_corner_hessians(), MBMesquite::populate_data(), TopologyInfoTest::pyramid(), TopologyInfoTest::quad(), MBMesquite::QualityMetric::remove_fixed_diagonals(), MBMesquite::QualityMetric::remove_fixed_gradients(), MBMesquite::QualityMetric::remove_fixed_hessians(), MBMesquite::NodeSet::set_all_corner_nodes(), MBMesquite::MeshImpl::set_all_slaved_flags(), MBMesquite::MeshImplData::set_element(), MBMesquite::ArrayMesh::set_mesh(), moab::BSPTree::set_tree_box(), moab::CN::SubEntityNodeIndices(), MBMesquite::sum_corner_hessians(), MBMesquite::sum_sqr_corner_hessians(), TopologyInfoTest::test_adj(), test_box_iter_neighbors(), test_box_iterator(), test_box_tree_create(), MsqMeshEntityTest::test_check_element_orientation_linear(), NodeSetTest::test_clear_node(), test_construct_from_hex(), QuadLagrangeShapeTest::test_corner_coeff(), QuadLagrangeShapeTest::test_corner_derivs(), test_cut_with_plane(), QualityMetricTester::test_diagonal_with_fixed_vertex(), QualityMetricTester::test_get_indices_fixed(), QualityMetricTester::test_gradient_with_fixed_vertex(), QualityMetricTester::test_hessian_with_fixed_vertex(), test_leaf_containing_point_bounded_tree(), test_leaf_intersects_ray_common(), test_merge_leaf(), NodeSetTest::test_num_before(), TopologyInfoTest::test_poly(), VtkTest::test_read_quadratic(), TopologyInfoTest::test_rev_adj(), SlaveBoundaryVerticesTest::test_slaved_common(), test_sub_entity_nodes(), MsqMeshEntityTest::test_unsigned_area_common(), test_volume(), TopologyInfoTest::tet(), TopologyInfoTest::tri(), MBMesquite::MsqMeshEntity::vertex_count(), MBMesquite::vertices_in_topology(), moab::ReadVtk::vtk_create_structured_elems(), MBMesquite::MeshImpl::vtk_create_structured_elems(), TopologyInfoTest::wedge(), LinearMappingFunctionTest::xi_at_corners(), and XI_corner().

f_t dl[4] = { 0, &dl21, &dl22, &dl23 }

Definition at line 211 of file HexLagrangeShapeTest.cpp.

Referenced by check_mesh_is_tet(), and dN().

const double epsilon = 1e-6

Definition at line 48 of file HexLagrangeShapeTest.cpp.

const double max_xi = 1

Definition at line 179 of file HexLagrangeShapeTest.cpp.

const double mid_xi = 0.5 * ( min_xi + max_xi )

Definition at line 180 of file HexLagrangeShapeTest.cpp.

Referenced by MBMesquite::derivatives_at_corner(), and XI_elem().

const double min_xi = 0

Definition at line 178 of file HexLagrangeShapeTest.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines