MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Test the ExtraData functionality of the PatchData class. More...
#include "Mesquite.hpp"
#include "IdealElements.hpp"
#include "TopologyInfo.hpp"
#include "MsqError.hpp"
#include "Vector3D.hpp"
#include "cppunit/extensions/HelperMacros.h"
Go to the source code of this file.
Classes | |
class | IdealElementTest |
Functions | |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (IdealElementTest,"IdealElementTest") | |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION (IdealElementTest,"Unit") | |
static double | distance_from_origin (unsigned n, const Vector3D *vtx) |
static bool | unit_edge_lengths (EntityTopology type, const Vector3D *coords) |
static bool | equal_edge_lengths (EntityTopology type, const Vector3D *coords) |
static void | get_edge_lengths (EntityTopology type, const Vector3D *coords, double &min, double &max) |
Test the ExtraData functionality of the PatchData class.
Definition in file IdealElementTest.cpp.
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION | ( | IdealElementTest | , |
"IdealElementTest" | |||
) |
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION | ( | IdealElementTest | , |
"Unit" | |||
) |
static double distance_from_origin | ( | unsigned | n, |
const Vector3D * | vtx | ||
) | [static] |
Definition at line 295 of file IdealElementTest.cpp.
References MBMesquite::Vector3D::length(), n, and moab::sum().
Referenced by IdealElementTest::test_side_height_pyr(), IdealElementTest::test_unit_edge_hex(), IdealElementTest::test_unit_edge_pyr(), IdealElementTest::test_unit_edge_quad(), IdealElementTest::test_unit_edge_tet(), IdealElementTest::test_unit_edge_tri(), IdealElementTest::test_unit_edge_wdg(), IdealElementTest::test_unit_height_pyr(), IdealElementTest::test_unit_hex(), IdealElementTest::test_unit_pyr(), IdealElementTest::test_unit_quad(), IdealElementTest::test_unit_tet(), IdealElementTest::test_unit_tri(), and IdealElementTest::test_unit_wdg().
static bool equal_edge_lengths | ( | EntityTopology | type, |
const Vector3D * | coords | ||
) | [static] |
Definition at line 288 of file IdealElementTest.cpp.
References get_edge_lengths().
Referenced by IdealElementTest::test_side_height_pyr(), IdealElementTest::test_unit_hex(), IdealElementTest::test_unit_pyr(), IdealElementTest::test_unit_quad(), IdealElementTest::test_unit_tet(), IdealElementTest::test_unit_tri(), and IdealElementTest::test_unit_wdg().
{ double min, max; get_edge_lengths( type, coords, min, max ); return ( max - min ) < 1e-6; }
static void get_edge_lengths | ( | EntityTopology | type, |
const Vector3D * | coords, | ||
double & | min, | ||
double & | max | ||
) | [static] |
Definition at line 265 of file IdealElementTest.cpp.
References CPPUNIT_ASSERT, MBMesquite::edges, MBMesquite::length(), and n.
Referenced by equal_edge_lengths(), and unit_edge_lengths().
{ MsqError err; unsigned n = TopologyInfo::edges( type ); min = HUGE_VAL; max = -HUGE_VAL; for( unsigned j = 0; j < n; ++j ) { const unsigned* edge = TopologyInfo::edge_vertices( type, j, err ); CPPUNIT_ASSERT( !err ); double len = ( coords[edge[0]] - coords[edge[1]] ).length(); if( min > len ) min = len; if( max < len ) max = len; } }
static bool unit_edge_lengths | ( | EntityTopology | type, |
const Vector3D * | coords | ||
) | [static] |
Definition at line 281 of file IdealElementTest.cpp.
References get_edge_lengths().
Referenced by IdealElementTest::test_unit_edge_hex(), IdealElementTest::test_unit_edge_pyr(), IdealElementTest::test_unit_edge_quad(), IdealElementTest::test_unit_edge_tet(), IdealElementTest::test_unit_edge_tri(), IdealElementTest::test_unit_edge_wdg(), and IdealElementTest::test_unit_height_pyr().
{ double min, max; get_edge_lengths( type, coords, min, max ); return fabs( 1.0 - min ) < 1e-6 && fabs( 1.0 - max ) < 1e-6; }