MOAB: Mesh Oriented datABase  (version 5.2.1)
IdealElementTest.cpp File Reference

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"
+ Include dependency graph for IdealElementTest.cpp:

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)

Detailed Description

Test the ExtraData functionality of the PatchData class.

Author:
Jason Kraftcheck

Definition in file IdealElementTest.cpp.


Function Documentation

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;
    }
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines