[MOAB-dev] r3647 - in MOAB/trunk: examples/GeomSetHierarchy itaps/igeom itaps/imesh src src/io src/moab src/oldinc src/parallel test test/h5file test/io test/obb test/parallel tools tools/mbcoupler tools/mbzoltan tools/qvdual

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed Mar 17 15:58:51 CDT 2010


Author: kraftche
Date: 2010-03-17 15:58:51 -0500 (Wed, 17 Mar 2010)
New Revision: 3647

Added:
   MOAB/trunk/src/CN.cpp
   MOAB/trunk/src/moab/CN.hpp
   MOAB/trunk/src/oldinc/MBCN.hpp
Removed:
   MOAB/trunk/src/MBCN.cpp
   MOAB/trunk/src/moab/MBCN.hpp
Modified:
   MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp
   MOAB/trunk/itaps/igeom/GeomTopoUtil.cpp
   MOAB/trunk/itaps/imesh/iMeshP_MOAB.cpp
   MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
   MOAB/trunk/src/AEntityFactory.cpp
   MOAB/trunk/src/Core.cpp
   MOAB/trunk/src/DualTool.cpp
   MOAB/trunk/src/ElementSequence.hpp
   MOAB/trunk/src/GeomTopoTool.cpp
   MOAB/trunk/src/GeomUtil.cpp
   MOAB/trunk/src/HigherOrderFactory.cpp
   MOAB/trunk/src/MBCNArrays.hpp
   MOAB/trunk/src/Makefile.am
   MOAB/trunk/src/MeshSet.hpp
   MOAB/trunk/src/MeshTopoUtil.cpp
   MOAB/trunk/src/OrientedBox.cpp
   MOAB/trunk/src/OrientedBoxTreeTool.cpp
   MOAB/trunk/src/Range.cpp
   MOAB/trunk/src/ReadUtil.cpp
   MOAB/trunk/src/ScdElementData.cpp
   MOAB/trunk/src/ScdElementData.hpp
   MOAB/trunk/src/SequenceManager.cpp
   MOAB/trunk/src/Skinner.cpp
   MOAB/trunk/src/StructuredElementSeq.cpp
   MOAB/trunk/src/SweptElementData.cpp
   MOAB/trunk/src/SweptElementData.hpp
   MOAB/trunk/src/SweptElementSeq.cpp
   MOAB/trunk/src/TypeSequenceManager.cpp
   MOAB/trunk/src/UnstructuredElemSeq.cpp
   MOAB/trunk/src/Util.cpp
   MOAB/trunk/src/io/ExoIIUtil.cpp
   MOAB/trunk/src/io/ReadABAQUS.cpp
   MOAB/trunk/src/io/ReadCCMIO.cpp
   MOAB/trunk/src/io/ReadGmsh.cpp
   MOAB/trunk/src/io/ReadHDF5.cpp
   MOAB/trunk/src/io/ReadNASTRAN.cpp
   MOAB/trunk/src/io/ReadNCDF.cpp
   MOAB/trunk/src/io/ReadSms.cpp
   MOAB/trunk/src/io/Tqdcfr.cpp
   MOAB/trunk/src/io/WriteAns.cpp
   MOAB/trunk/src/io/WriteCCMIO.cpp
   MOAB/trunk/src/io/WriteGMV.cpp
   MOAB/trunk/src/io/WriteGmsh.cpp
   MOAB/trunk/src/io/WriteHDF5.cpp
   MOAB/trunk/src/io/WriteNCDF.cpp
   MOAB/trunk/src/io/WriteSLAC.cpp
   MOAB/trunk/src/io/WriteSTL.cpp
   MOAB/trunk/src/io/WriteSmf.cpp
   MOAB/trunk/src/io/WriteTemplate.cpp
   MOAB/trunk/src/io/WriteVtk.cpp
   MOAB/trunk/src/oldinc/Makefile.am
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/ReadParallel.cpp
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/test/MBTest.cpp
   MOAB/trunk/test/Makefile.am
   MOAB/trunk/test/Test_MBMeshSet.cpp
   MOAB/trunk/test/h5file/h5file_test.cpp
   MOAB/trunk/test/io/cub_file_test.cc
   MOAB/trunk/test/io/exodus_test.cc
   MOAB/trunk/test/io/gmsh_test.cc
   MOAB/trunk/test/io/nastran_test.cc
   MOAB/trunk/test/mbcn_test.cc
   MOAB/trunk/test/obb/obb_test.cpp
   MOAB/trunk/test/parallel/parallel_hdf5_test.cc
   MOAB/trunk/tools/SphereDecomp.cpp
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
   MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
   MOAB/trunk/tools/measure.hpp
   MOAB/trunk/tools/qvdual/DrawDual.cpp
   MOAB/trunk/tools/size.cpp
   MOAB/trunk/tools/skin.cpp
Log:
rename moab::MBCN as MOAB::CN and provide MBCN.hpp compatability header

Modified: MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp
===================================================================
--- MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/examples/GeomSetHierarchy/GeomSetHierarchy.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,6 +1,5 @@
 #include "moab/MBCore.hpp"
 #include "moab/MBRange.hpp"
-#include "moab/MBCN.hpp"
 #include <iostream>
 
 int main(int argc, char **argv) {

Modified: MOAB/trunk/itaps/igeom/GeomTopoUtil.cpp
===================================================================
--- MOAB/trunk/itaps/igeom/GeomTopoUtil.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/itaps/igeom/GeomTopoUtil.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -17,7 +17,7 @@
 #include "moab/Range.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/Interface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 #include <assert.h>
 #include <iostream>
@@ -192,7 +192,7 @@
         result = mdbImpl->get_connectivity( dents.front(), conn2, len2, true );
         if (MB_SUCCESS != result) return result;
         assert(len2 <= 4);
-        err = MBCN::SideNumber( TYPE_FROM_HANDLE(dp1ents[i]), conn3,
+        err = CN::SideNumber( TYPE_FROM_HANDLE(dp1ents[i]), conn3,
                                 conn2, len2, dim, num, sense, offset );
         if (err)
           return MB_FAILURE;

Modified: MOAB/trunk/itaps/imesh/iMeshP_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMeshP_MOAB.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/itaps/imesh/iMeshP_MOAB.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -2,7 +2,7 @@
 #include "iMesh_MOAB.hpp"
 #include "moab/Core.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MeshTopoUtil.hpp"
 #include "FileOptions.hpp"
 #include "moab/ParallelComm.hpp"
@@ -1480,7 +1480,7 @@
   if (entity_topo != iMesh_ALL_TOPOLOGIES)
     types.first = types.second = mb_topology_table[entity_topo];
   else if (entity_type != iBase_ALL_TYPES)
-    types = MBCN::TypeDimensionMap[entity_type];
+    types = CN::TypeDimensionMap[entity_type];
   else { 
     types.first = MBVERTEX; 
     types.second = MBENTITYSET; 

Modified: MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/itaps/imesh/iMesh_MOAB.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,7 +1,7 @@
 #include "iMesh_extensions.h"
 #include "moab/Core.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MeshTopoUtil.hpp"
 #include "FileOptions.hpp"
 #include "iMesh_MOAB.hpp"
@@ -653,7 +653,7 @@
       else if (iBase_ALL_TYPES == entity_type_requested) {
         adj_ents.clear();
         for (int dim = 0; dim < 4; ++dim) {
-          if (MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) == dim)
+          if (CN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) == dim)
             continue;
           result = MBI->get_adjacencies( entity_iter, 1, dim, false, adj_ents, Interface::UNION );
           if (MB_SUCCESS != result) {
@@ -1295,11 +1295,11 @@
     int num_ents = 0, num_verts;
     const EntityHandle *lower_ents;
     if (MBVERTEX != this_type) {
-      num_verts = MBCN::VerticesPerEntity(this_type);
+      num_verts = CN::VerticesPerEntity(this_type);
       num_ents = lower_order_entity_handles_size / num_verts;
       lower_ents = CONST_HANDLE_ARRAY_PTR(lower_order_entity_handles);
         // check that we have the right number of lower order entity handles
-      if (lower_order_entity_handles_size % MBCN::VerticesPerEntity(this_type) != 0) {
+      if (lower_order_entity_handles_size % CN::VerticesPerEntity(this_type) != 0) {
         ERROR(iBase_INVALID_ENTITY_COUNT, "iMesh_createEntArr: wrong # vertices for this entity type.");
        }
     }
@@ -2514,8 +2514,8 @@
     }
     else if (use_type && entity_type != iBase_ALL_TYPES) {
         // need to loop over all types of this dimension
-      for (EntityType tp = MBCN::TypeDimensionMap[entity_type].first;
-           tp <= MBCN::TypeDimensionMap[entity_type].second; tp++) {
+      for (EntityType tp = CN::TypeDimensionMap[entity_type].first;
+           tp <= CN::TypeDimensionMap[entity_type].second; tp++) {
         Range tmp_range;
         ErrorCode tmp_result = MBI->get_entities_by_type_and_tag(handle, type, (Tag*)tag_handles, 
                                                                    (const void* const *)tag_vals,
@@ -2585,7 +2585,7 @@
     RETURN(iBase_SUCCESS);
   }
 
-  void iMesh_MBCNType(/*in*/ const int imesh_entity_topology,
+  void iMesh_CNType(/*in*/ const int imesh_entity_topology,
                       /*out*/ int *mbcn_type) 
   {
     if (iMesh_POINT > imesh_entity_topology ||
@@ -2667,7 +2667,7 @@
   int num_connect;
   for (ent_it = entities.begin(); ent_it != entities.end(); ent_it++) {
     this_type = MBI->type_from_handle(*ent_it);
-    if ((-1 == req_dimension || req_dimension == MBCN::Dimension(this_type)) &&
+    if ((-1 == req_dimension || req_dimension == CN::Dimension(this_type)) &&
         (MBMAXTYPE == req_type || this_type == req_type)) {
       req_entities.insert(*ent_it);
       result = MBI->get_connectivity(*ent_it, connect, num_connect, false, 

Modified: MOAB/trunk/src/AEntityFactory.cpp
===================================================================
--- MOAB/trunk/src/AEntityFactory.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/AEntityFactory.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -20,7 +20,7 @@
 #include "moab/Core.hpp"
 #include "moab/Range.hpp"
 #include "Error.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MeshTopoUtil.hpp"
 #include "EntitySequence.hpp"
 #include "SequenceData.hpp"
@@ -95,7 +95,7 @@
 {
   // check for trivial case first
   const EntityType source_type = TYPE_FROM_HANDLE(source_entity);
-  const unsigned source_dimension = MBCN::Dimension(source_type);
+  const unsigned source_dimension = CN::Dimension(source_type);
 
   if (source_type >= MBENTITYSET || target_dimension < 1 || target_dimension > 3) {
     return MB_TYPE_OUT_OF_RANGE;
@@ -158,7 +158,7 @@
     return result;
 
   // find the meshsets in this vector 
-  DimensionPair dim_pair = MBCN::TypeDimensionMap[4];
+  DimensionPair dim_pair = CN::TypeDimensionMap[4];
   int dum;
   const EntityHandle* start_ent =
     std::lower_bound(adj_vec, adj_vec+num_adj, CREATE_HANDLE(dim_pair.first, MB_START_ID, dum));
@@ -260,12 +260,12 @@
       }
 
       if (0 == target_entity && 
-          thisMB->dimension_from_handle(source_entity) > MBCN::Dimension(target_type)+1) {
+          thisMB->dimension_from_handle(source_entity) > CN::Dimension(target_type)+1) {
           // still have multiple entities, and source dimension is two greater than target,
           // so there may not be any explicit adjacencies between the two; look for common
           // entities of the intermediate dimension
         MeshTopoUtil mtu(thisMB);
-        int intermed_dim = MBCN::Dimension(target_type)+1;
+        int intermed_dim = CN::Dimension(target_type)+1;
         for (dum = 0; dum < temp_vec_size; dum++) {
           if (0 != mtu.common_entity(temp_vec[dum], source_entity, intermed_dim)) {
             target_entity = temp_vec[dum];
@@ -310,7 +310,7 @@
   // see if we can get one node id to match
   assert(vertex_list_size > 0);
   int num_corner_verts = ((this_type == MBPOLYGON || this_type == MBPOLYHEDRON) ?
-                          num_this_vertices : MBCN::VerticesPerEntity(target_type));
+                          num_this_vertices : CN::VerticesPerEntity(target_type));
   const EntityHandle *iter = 
     std::find(this_vertices, (this_vertices+num_corner_verts), vertex_list[0]);
   if(iter == (this_vertices+num_corner_verts))
@@ -434,7 +434,7 @@
 
   if (base_type == MBENTITYSET) 
     return thisMB->clear_meshset(&base_entity, 1);
-  const int base_ent_dim = MBCN::Dimension( base_type );
+  const int base_ent_dim = CN::Dimension( base_type );
 
     // Remove adjacencies from element vertices back to 
     // this element.  Also check any elements adjacent
@@ -458,7 +458,7 @@
         if (adjvect[j] == base_entity)
           remove_this = true;
         
-        if (MBCN::Dimension(TYPE_FROM_HANDLE(adjvect[j])) != base_ent_dim 
+        if (CN::Dimension(TYPE_FROM_HANDLE(adjvect[j])) != base_ent_dim 
          && explicitly_adjacent( adjvect[j], base_entity )) 
           remove_adjacency( adjvect[j], base_entity );
       }
@@ -581,7 +581,7 @@
                                              std::vector<EntityHandle> &target_entities )
 {
   const EntityType source_type = TYPE_FROM_HANDLE(source_entity);
-  const unsigned source_dimension = MBCN::Dimension(source_type);
+  const unsigned source_dimension = CN::Dimension(source_type);
 
   ErrorCode result;
   if (target_dimension == 4) { //get meshsets 'source' is in
@@ -674,10 +674,10 @@
       std::vector<EntityHandle> tmp_ents;
       
       start_ent = std::lower_bound(adj_vec->begin(), adj_vec->end(), 
-                         FIRST_HANDLE(MBCN::TypeDimensionMap[target_dimension+1].first));
+                         FIRST_HANDLE(CN::TypeDimensionMap[target_dimension+1].first));
 
       end_ent = std::lower_bound(start_ent, adj_vec->end(), 
-                         LAST_HANDLE(MBCN::TypeDimensionMap[3].second));
+                         LAST_HANDLE(CN::TypeDimensionMap[3].second));
       
       std::vector<EntityHandle> elems(start_ent, end_ent);
  
@@ -689,7 +689,7 @@
       }
   }
     
-  DimensionPair dim_pair = MBCN::TypeDimensionMap[target_dimension];
+  DimensionPair dim_pair = CN::TypeDimensionMap[target_dimension];
   start_ent = std::lower_bound(adj_vec->begin(), adj_vec->end(), FIRST_HANDLE(dim_pair.first ));
   end_ent   = std::lower_bound(start_ent,        adj_vec->end(), LAST_HANDLE (dim_pair.second));
   target_entities.insert( target_entities.end(), start_ent, end_ent );
@@ -725,15 +725,15 @@
   if (MB_SUCCESS != result) return result;
 
   int has_mid_nodes[4];
-  MBCN::HasMidNodes(source_type, num_verts, has_mid_nodes);
+  CN::HasMidNodes(source_type, num_verts, has_mid_nodes);
   
   std::vector<int> index_list;
-  int num_sub_ents = MBCN::NumSubEntities(source_type, target_dimension);
+  int num_sub_ents = CN::NumSubEntities(source_type, target_dimension);
   
   for( int j=0; j<num_sub_ents; j++)
   {
-    const MBCN::ConnMap &cmap = 
-      MBCN::mConnectivityMap[source_type][target_dimension-1];
+    const CN::ConnMap &cmap = 
+      CN::mConnectivityMap[source_type][target_dimension-1];
   
     int verts_per_sub = cmap.num_corners_per_sub_element[j];
 
@@ -746,11 +746,11 @@
         // has edge mid-nodes; for each edge, get the right mid-node and put in vertices
         // first get the edge indices
       index_list.clear();
-      int int_result = MBCN::AdjacentSubEntities(source_type, &j, 1, 
+      int int_result = CN::AdjacentSubEntities(source_type, &j, 1, 
                                                    target_dimension, 1, index_list);
       if (0 != int_result) return MB_FAILURE;
       for (unsigned int k = 0; k < index_list.size(); k++) {
-        int tmp_index = MBCN::HONodeIndex(source_type, num_verts, 1,
+        int tmp_index = CN::HONodeIndex(source_type, num_verts, 1,
                                             index_list[k]);
         if (tmp_index >= (int) num_verts) return MB_INDEX_OUT_OF_RANGE;
 
@@ -761,7 +761,7 @@
       // get the ho nodes for the target dimension
     if (has_mid_nodes[target_dimension]) {
         // get the ho node index for this subfacet
-      int tmp_index = MBCN::HONodeIndex(source_type, num_verts,
+      int tmp_index = CN::HONodeIndex(source_type, num_verts,
                                           target_dimension, j);
       if (tmp_index >= num_verts) return MB_INDEX_OUT_OF_RANGE;
       vertex_array[verts_per_sub++] = vertices[tmp_index];
@@ -903,7 +903,7 @@
     // Handle ranges
   const size_t in_size = target_entities.size();
   const EntityType src_type = TYPE_FROM_HANDLE(source_entity);
-  DimensionPair target_types = MBCN::TypeDimensionMap[target_dimension];
+  DimensionPair target_types = CN::TypeDimensionMap[target_dimension];
   const EntityHandle src_beg_handle = CREATE_HANDLE( src_type, 0 );
   const EntityHandle src_end_handle = CREATE_HANDLE( src_type+1, 0 );
   const EntityHandle tgt_beg_handle = CREATE_HANDLE( target_types.first, 0 );
@@ -923,7 +923,7 @@
 
     // create necessary entities. this only makes sense if there exists of a
     // dimension greater than the target dimension.
-  if (create_if_missing && target_dimension < 3 && MBCN::Dimension(src_type) < 2) {
+  if (create_if_missing && target_dimension < 3 && CN::Dimension(src_type) < 2) {
     for (size_t i = 0; i < conn_len; ++i) {
       rval = get_adjacency_ptr( conn[i], vtx_adj );
       if (MB_SUCCESS != rval)
@@ -932,7 +932,7 @@
 
       std::vector<EntityHandle> tmp2, tmp(*vtx_adj); // copy in case adjacency vector is changed
       for (size_t j = 0; j < tmp.size(); ++j) {
-        if (MBCN::Dimension(TYPE_FROM_HANDLE(tmp[j])) <= (int)target_dimension)
+        if (CN::Dimension(TYPE_FROM_HANDLE(tmp[j])) <= (int)target_dimension)
           continue;
         if (TYPE_FROM_HANDLE(tmp[j]) == MBENTITYSET)
           break;
@@ -1025,7 +1025,7 @@
   
   // If target dimension is 3 and source dimension is 1, also need to
   // check for explicit adjacencies to intermediate faces
-  if (MBCN::Dimension(src_type) > 1 || target_dimension < 3)
+  if (CN::Dimension(src_type) > 1 || target_dimension < 3)
     return MB_SUCCESS;
   
     // Get faces adjacent to each element and check for explict 
@@ -1152,8 +1152,8 @@
     else if (adj_vec == NULL)
       return MB_SUCCESS;
 
-    DimensionPair dim_pair_dp1 = MBCN::TypeDimensionMap[MBCN::Dimension(source_type)+1],
-      dim_pair_td = MBCN::TypeDimensionMap[target_dimension];
+    DimensionPair dim_pair_dp1 = CN::TypeDimensionMap[CN::Dimension(source_type)+1],
+      dim_pair_td = CN::TypeDimensionMap[target_dimension];
     int dum;
 
     Range tmp_ents, target_ents;
@@ -1246,7 +1246,7 @@
 ErrorCode AEntityFactory::merge_adjust_adjacencies(EntityHandle entity_to_keep,
                                                      EntityHandle entity_to_remove) 
 {
-  int ent_dim = MBCN::Dimension(TYPE_FROM_HANDLE(entity_to_keep));
+  int ent_dim = CN::Dimension(TYPE_FROM_HANDLE(entity_to_keep));
   ErrorCode result;
   
     // check for newly-formed equivalent entities, and create explicit adjacencies
@@ -1353,7 +1353,7 @@
       
       
       //   . if # vertices != number of corner vertices + 1, continue
-      if (MBCN::VerticesPerEntity(TYPE_FROM_HANDLE(*rit_rm))+1 != (int) all_verts.size()) continue;
+      if (CN::VerticesPerEntity(TYPE_FROM_HANDLE(*rit_rm))+1 != (int) all_verts.size()) continue;
       
       //   . for the two entities adjacent to kept & removed entity:
       result = create_explicit_adjs(*rit_rm);

Copied: MOAB/trunk/src/CN.cpp (from rev 3646, MOAB/trunk/src/MBCN.cpp)
===================================================================
--- MOAB/trunk/src/CN.cpp	                        (rev 0)
+++ MOAB/trunk/src/CN.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -0,0 +1,1049 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ * 
+ * Copyright 2004 Sandia Corporation.  Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
+ * retains certain rights in this software.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ */
+
+#include "moab/CN.hpp"
+#include "MBCNArrays.hpp"
+#include "MBCN.h"
+#include <assert.h>
+#include <string.h>
+
+namespace moab {
+
+const char *CN::entityTypeNames[] = {
+    "Vertex",
+    "Edge",
+    "Tri",
+    "Quad",
+    "Polygon",
+    "Tet",
+    "Pyramid",
+    "Prism",
+    "Knife",
+    "Hex",
+    "Polyhedron",
+    "EntitySet",
+    "MaxType"
+};
+
+short int CN::numberBasis = 0;
+
+const DimensionPair CN::TypeDimensionMap[] = 
+{
+    DimensionPair(MBVERTEX,   MBVERTEX), 
+    DimensionPair(MBEDGE,     MBEDGE), 
+    DimensionPair(MBTRI,     MBPOLYGON),
+    DimensionPair(MBTET,     MBPOLYHEDRON),
+    DimensionPair(MBENTITYSET, MBENTITYSET), 
+    DimensionPair(MBMAXTYPE, MBMAXTYPE)
+};
+
+short CN::increasingInts[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 
+                                10,11,12,13,14,15,16,17,18,19,
+                                20,21,22,23,24,25,26,27,28,29,
+                                30,31,32,33,34,35,36,37,38,39 };
+
+  //! set the basis of the numbering system; may or may not do things besides setting the
+//! member variable
+void CN::SetBasis(const int in_basis) 
+{
+  numberBasis = in_basis;
+}
+
+//! return a type for the given name
+EntityType CN::EntityTypeFromName(const char *name)
+{
+  for (EntityType i = MBVERTEX; i < MBMAXTYPE; i++) {
+    if (0 == strcmp(name, entityTypeNames[i]))
+      return i;
+  }
+  
+  return MBMAXTYPE;
+}
+
+void CN::SubEntityNodeIndices( const EntityType this_topo, 
+                                 const int num_nodes,
+                                 const int sub_dimension,
+                                 const int sub_index,
+                                 EntityType& subentity_topo,
+                                 int& num_sub_entity_nodes,
+                                 int sub_entity_conn[] )
+{
+    // If asked for a node, the special case...
+  if (sub_dimension == 0) {
+    assert( sub_index < num_nodes );
+    subentity_topo = MBVERTEX;
+    num_sub_entity_nodes = 1;
+    sub_entity_conn[0] = sub_index;
+    return;
+  }
+  
+  const int ho_bits = HasMidNodes( this_topo, num_nodes );
+  subentity_topo = SubEntityType(this_topo, sub_dimension, sub_index);
+  num_sub_entity_nodes = VerticesPerEntity(subentity_topo);
+  const short* corners = mConnectivityMap[this_topo][sub_dimension-1].conn[sub_index];
+  std::copy( corners, corners+num_sub_entity_nodes, sub_entity_conn );
+  
+  int sub_sub_corners[MB_MAX_SUB_ENTITY_VERTICES];
+  int side, sense, offset;
+  for (int dim = 1; dim <= sub_dimension; ++dim) {
+    if (!(ho_bits & (1<<dim)))
+      continue;
+    
+    const short num_mid = NumSubEntities( subentity_topo, dim );
+    for (int i = 0; i < num_mid; ++i) {
+      const EntityType sub_sub_topo = SubEntityType( subentity_topo, dim, i );
+      const int sub_sub_num_vert = VerticesPerEntity( sub_sub_topo );
+      SubEntityVertexIndices( subentity_topo, dim, i, sub_sub_corners );
+
+      for (int j = 0; j < sub_sub_num_vert; ++j)
+        sub_sub_corners[j] = corners[sub_sub_corners[j]];
+      SideNumber( this_topo, sub_sub_corners, sub_sub_num_vert, dim, side, sense, offset );
+      sub_entity_conn[num_sub_entity_nodes++] = HONodeIndex( this_topo, num_nodes, dim, side );
+    }
+  }
+}
+
+
+//! return the vertices of the specified sub entity
+//! \param parent_conn Connectivity of parent entity
+//! \param parent_type Entity type of parent entity
+//! \param sub_dimension Dimension of sub-entity being queried
+//! \param sub_index Index of sub-entity being queried
+//! \param sub_entity_conn Connectivity of sub-entity, based on parent_conn and canonical
+//!           ordering for parent_type
+//! \param num_sub_vertices Number of vertices in sub-entity
+void CN::SubEntityConn(const void *parent_conn, const EntityType parent_type,
+                         const int sub_dimension,
+                         const int sub_index,
+                         void *sub_entity_conn, int &num_sub_vertices) 
+{
+  static int sub_indices[MB_MAX_SUB_ENTITY_VERTICES];
+  
+  SubEntityVertexIndices(parent_type, sub_dimension, sub_index, sub_indices);
+  
+  num_sub_vertices = VerticesPerEntity(SubEntityType(parent_type, sub_dimension, sub_index));
+  void **parent_conn_ptr = static_cast<void **>(const_cast<void *>(parent_conn));
+  void **sub_conn_ptr = static_cast<void **>(sub_entity_conn);
+  for (int i = 0; i < num_sub_vertices; i++)
+    sub_conn_ptr[i] = parent_conn_ptr[sub_indices[i]];
+}
+
+//! given an entity and a target dimension & side number, get that entity
+short int CN::AdjacentSubEntities(const EntityType this_type,
+                              const int *source_indices,
+                              const int num_source_indices,
+                              const int source_dim,
+                              const int target_dim,
+                              std::vector<int> &index_list,
+                              const int operation_type)
+{
+    // first get all the vertex indices
+  std::vector<int> tmp_indices;
+  const int* it1 = source_indices;
+
+  assert(source_dim >= 0 && source_dim <= 3 &&
+         target_dim >= 0 && target_dim <= 3 &&
+           // make sure we're not stepping off the end of the array; 
+         ((source_dim > 0 && 
+           *it1 < mConnectivityMap[this_type][source_dim-1].num_sub_elements) ||
+          (source_dim == 0 && 
+           *it1 < mConnectivityMap[this_type][Dimension(this_type)-1].num_corners_per_sub_element[0])) && 
+         *it1 >= 0);
+
+
+#define MUC CN::mUpConnMap[this_type][source_dim][target_dim]
+
+    // if we're looking for the vertices of a single side, return them in
+    // the canonical ordering; otherwise, return them in sorted order
+  if (num_source_indices == 1 && 0 == target_dim && source_dim != target_dim) {
+
+      // element of mConnectivityMap should be for this type and for one
+      // less than source_dim, which should give the connectivity of that sub element
+    const ConnMap &cm = mConnectivityMap[this_type][source_dim-1];
+    std::copy(cm.conn[source_indices[0]],
+              cm.conn[source_indices[0]]+cm.num_corners_per_sub_element[source_indices[0]],
+              std::back_inserter(index_list));
+    return 0;
+  }
+              
+    // now go through source indices, folding adjacencies into target list
+  for (it1 = source_indices; it1 != source_indices+num_source_indices; it1++) {
+      // *it1 is the side index
+      // at start of iteration, index_list has the target list
+
+      // if a union, or first iteration and index list was empty, copy the list
+    if (operation_type == CN::UNION || 
+        (it1 == source_indices && index_list.empty())) {
+      std::copy(MUC.targets_per_source_element[*it1],
+                MUC.targets_per_source_element[*it1]+
+                MUC.num_targets_per_source_element[*it1],
+                std::back_inserter(index_list));
+    }
+    else {
+        // else we're intersecting, and have a non-empty list; intersect with this target list
+      tmp_indices.clear();
+      std::set_intersection(MUC.targets_per_source_element[*it1],
+                            MUC.targets_per_source_element[*it1]+
+                            MUC.num_targets_per_source_element[*it1],
+                            index_list.begin(), index_list.end(),
+                            std::back_inserter(tmp_indices));
+      index_list.swap(tmp_indices);
+
+        // if we're at this point and the list is empty, the intersection will be NULL;
+        // return if so
+      if (index_list.empty()) return 0;
+    }
+  }
+  
+  if (operation_type == CN::UNION && num_source_indices != 1) {
+      // need to sort then unique the list
+    std::sort(index_list.begin(), index_list.end());
+    index_list.erase(std::unique(index_list.begin(), index_list.end()), 
+                     index_list.end());
+  }
+  
+  return 0;
+}
+
+template <typename T> 
+short int side_number(const T *parent_conn, 
+                const EntityType parent_type,
+                const T *child_conn,
+                const int child_num_verts,
+                const int child_dim,
+                int &side_no,
+                int &sense,
+                int &offset)
+{
+  int parent_num_verts = CN::VerticesPerEntity(parent_type);
+  int side_indices[8]; 
+  assert(sizeof(side_indices)/sizeof(side_indices[0]) >= (size_t)child_num_verts);
+  
+  for (int i = 0; i < child_num_verts; i++) {
+    side_indices[i] = std::find(parent_conn, parent_conn+parent_num_verts, child_conn[i]) - parent_conn;
+    if (side_indices[i] == parent_num_verts) 
+      return -1;
+  }
+  
+  return CN::SideNumber(parent_type, &side_indices[0], child_num_verts,
+                    child_dim, side_no, sense, offset);
+}
+
+short int CN::SideNumber(const EntityType parent_type, const int *parent_conn, 
+                     const int *child_conn, const int child_num_verts,
+                     const int child_dim,
+                     int &side_no, int &sense, int &offset) 
+{
+  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
+                     child_dim, side_no, sense, offset);
+}
+
+short int CN::SideNumber(const EntityType parent_type, const unsigned int *parent_conn, 
+                     const unsigned int *child_conn, const int child_num_verts,
+                     const int child_dim,
+                     int &side_no, int &sense, int &offset)
+{
+  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
+                     child_dim, side_no, sense, offset);
+}
+short int CN::SideNumber(const EntityType parent_type, const long *parent_conn, 
+                     const long *child_conn, const int child_num_verts,
+                     const int child_dim,
+                     int &side_no, int &sense, int &offset)
+{
+  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
+                     child_dim, side_no, sense, offset);
+}
+short int CN::SideNumber(const EntityType parent_type, const unsigned long *parent_conn, 
+                     const unsigned long *child_conn, const int child_num_verts,
+                     const int child_dim,
+                     int &side_no, int &sense, int &offset)
+{
+  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
+                     child_dim, side_no, sense, offset);
+}
+short int CN::SideNumber(const EntityType parent_type, void * const *parent_conn, 
+                     void * const *child_conn, const int child_num_verts,
+                     const int child_dim,
+                     int &side_no, int &sense, int &offset)
+{
+  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
+                     child_dim, side_no, sense, offset);
+}
+
+short int CN::SideNumber( const EntityType parent_type,
+                      const int *child_conn_indices,
+                      const int child_num_verts,
+                      const int child_dim,
+                      int &side_no,
+                      int &sense,
+                      int &offset )
+{
+  int parent_dim = Dimension(parent_type);
+  int parent_num_verts = VerticesPerEntity(parent_type);
+
+    // degenerate case (vertex), output == input
+  if (child_dim == 0) {
+    if (child_num_verts != 1)
+      return -1;
+    side_no = *child_conn_indices;
+    sense = offset = 0;
+  }
+    
+    // given a parent and child element, find the corresponding side number
+
+    // dim_diff should be -1, 0 or 1 (same dimension, one less dimension, two less, resp.)
+  if (child_dim > parent_dim || child_dim < 0)
+    return -1;
+
+    // different types of same dimension won't be the same
+  if (parent_dim == child_dim &&
+      parent_num_verts != child_num_verts) {
+    side_no = -1;
+    sense = 0;
+    return 0;
+  }
+
+    // loop over the sub-elements, comparing to child connectivity
+  int sub_conn_indices[10];
+  for (int i = 0; i < NumSubEntities(parent_type, child_dim); i++) {
+    int sub_size = VerticesPerEntity(SubEntityType(parent_type, child_dim, i));
+    if (sub_size != child_num_verts) 
+      continue;
+
+    SubEntityVertexIndices(parent_type, child_dim, i, sub_conn_indices);
+    bool they_match = ConnectivityMatch(child_conn_indices, 
+                                        sub_conn_indices, sub_size, 
+                                        sense, offset);
+    if (they_match) {
+      side_no = i;
+      return 0;
+    }
+  }
+
+    // if we've gotten here, we don't match
+  side_no = -1;
+
+    // return value is still success, we didn't have any fatal errors or anything
+  return 0;
+}
+
+  //! return the dimension and index of the opposite side, given parent entity type and child 
+  //! dimension and index.  This function is only defined for certain types of parent/child types:
+  //! (Parent, Child dim->Opposite dim): 
+  //!  (Tri, 1->0), (Tri, 0->1), (Quad, 1->1), (Quad, 0->0), 
+  //!  (Tet, 2->0), (Tet, 1->1), (Tet, 0->2),
+  //!  (Hex, 2->2), (Hex, 1->1)(diagonally across element), (Hex, 0->0) (diagonally across element)
+  //! All other parent types and child dimensions return an error.
+  //!
+  //! \param parent_type The type of parent element
+  //! \param child_type The type of child element
+  //! \param child_index The index of the child element
+  //! \param opposite_index The index of the opposite element
+  //! \return status Returns 0 if successful, -1 if not
+short int CN::OppositeSide(const EntityType parent_type,
+                       const int child_index,
+                       const int child_dim,
+                       int &opposite_index,
+                       int &opposite_dim) 
+{
+  switch (parent_type) {
+    case MBEDGE:
+        if (0 != child_dim) return -1;
+        else opposite_index = 1-child_index;
+        opposite_dim = 0;
+        break;
+      
+    case MBTRI:
+        switch (child_dim) {
+          case 0:
+              opposite_dim = 1;
+              opposite_index = (child_index+1)%3;
+              break;
+          case 1:
+              opposite_dim = 0;
+              opposite_index = (child_index+2)%3;
+              break;
+          default:
+              return -1;
+        }
+        break;
+
+    case MBQUAD:
+        switch (child_dim) {
+          case 0:
+          case 1:
+              opposite_dim = child_dim;
+              opposite_index = (child_index+2)%4;
+              break;
+          default:
+              return -1;
+        }
+        break;
+      
+    case MBTET:
+        switch (child_dim) {
+          case 0:
+              opposite_dim = 2;
+              opposite_index = (child_index+1)%3 + 2*(child_index/3);
+              break;
+          case 1:
+              opposite_dim = 1;
+              opposite_index = child_index < 3 
+                             ? 3 + (child_index + 2)%3
+                             : (child_index + 1)%3;
+              break;
+          case 2:
+              opposite_dim = 0;
+              opposite_index = (child_index+2)%3 + child_index/3;
+              break;
+          default:
+              return -1;
+        }
+        break;
+    case MBHEX:
+      opposite_dim = child_dim;
+      switch (child_dim) {
+        case 0:
+          opposite_index = child_index < 4 
+                         ? 4 + (child_index + 2) % 4
+                         : (child_index - 2) % 4;
+          break;
+        case 1:
+          opposite_index = 4*(2-child_index/4) + (child_index+2)%4;
+          break;
+        case 2:
+          opposite_index = child_index < 4 
+                         ? (child_index + 2) % 4
+                         : 9 - child_index;
+          break;
+        default:
+          return -1;
+      }
+      break;
+        
+      
+    default:
+        return -1;
+  }
+  
+  return 0;
+}
+
+template <typename T> 
+inline bool connectivity_match( const T* conn1_i,
+                                       const T* conn2_i,
+                                       const int num_vertices,
+                                       int& direct, int& offset )
+{
+
+  bool they_match;
+  
+    // special test for 2 handles, since we don't want to wrap the list in this
+    // case
+  if (num_vertices == 2) {
+    they_match = false;
+    if (conn1_i[0] == conn2_i[0] && conn1_i[1] == conn2_i[1]) {
+      direct = 1;
+      they_match = true;
+      offset = 0;
+    }
+    else if (conn1_i[0] == conn2_i[1] && conn1_i[1] == conn2_i[0]) {
+      they_match = true;
+      direct = -1;
+      offset = 1;
+    }
+  }
+
+  else {
+    const T *iter;
+    iter = std::find(&conn2_i[0], &conn2_i[num_vertices], conn1_i[0]);
+    if(iter == &conn2_i[num_vertices])
+      return false;
+
+    they_match = true;
+
+    offset = iter - conn2_i;
+    int i;
+
+      // first compare forward
+    for(i = 1; i<num_vertices; ++i)
+    {
+      if(conn1_i[i] != conn2_i[(offset+i)%num_vertices])
+      {
+        they_match = false;
+        break;
+      }
+    }
+  
+    if(they_match == true)
+    {
+      direct = 1;
+      return they_match;
+    }
+  
+    they_match = true;
+  
+      // then compare reverse
+    for(i = 1; i<num_vertices; i++)
+    {
+      if(conn1_i[i] != conn2_i[(offset+num_vertices-i)%num_vertices])
+      {
+        they_match = false;
+        break;
+      }
+    }
+    if (they_match)
+    {
+      direct = -1;
+    }
+  }
+
+  return they_match;
+}
+
+
+bool CN::ConnectivityMatch( const int *conn1_i,
+                              const int *conn2_i,
+                              const int num_vertices,
+                              int &direct, int &offset )
+{
+  return connectivity_match<int>(conn1_i, conn2_i, num_vertices, direct, offset );
+}
+
+bool CN::ConnectivityMatch( const unsigned int *conn1_i,
+                              const unsigned int *conn2_i,
+                              const int num_vertices,
+                              int &direct, int &offset )
+{
+  return connectivity_match<unsigned int>(conn1_i, conn2_i, num_vertices, direct, offset );
+}
+
+bool CN::ConnectivityMatch( const long *conn1_i,
+                              const long *conn2_i,
+                              const int num_vertices,
+                              int &direct, int &offset )
+{
+  return connectivity_match<long>(conn1_i, conn2_i, num_vertices, direct, offset );
+}
+
+bool CN::ConnectivityMatch( const unsigned long *conn1_i,
+                              const unsigned long *conn2_i,
+                              const int num_vertices,
+                              int &direct, int &offset )
+{
+  return connectivity_match<unsigned long>(conn1_i, conn2_i, num_vertices, direct, offset );
+}
+
+bool CN::ConnectivityMatch( void* const *conn1_i,
+                              void* const *conn2_i,
+                              const int num_vertices,
+                              int &direct, int &offset )
+{
+  return connectivity_match<void*>(conn1_i, conn2_i, num_vertices, direct, offset );
+}
+
+
+
+  //! for an entity of this type and a specified subfacet (dimension and index), return
+  //! the index of the higher order node for that entity in this entity's connectivity array
+short int CN::HONodeIndex(const EntityType this_type, const int num_verts,
+                      const int subfacet_dim, const int subfacet_index) 
+{
+  int i;
+  int has_mids[4];
+  HasMidNodes(this_type, num_verts, has_mids);
+
+    // if we have no mid nodes on the subfacet_dim, we have no index
+  if (subfacet_index != -1 && !has_mids[subfacet_dim]) return -1;
+
+    // put start index at last index (one less than the number of vertices 
+    // plus the index basis)
+  int index = VerticesPerEntity(this_type) - 1 + numberBasis;
+
+    // for each subfacet dimension less than the target subfacet dim which has mid nodes, 
+    // add the number of subfacets of that dimension to the index
+  for (i = 1; i < subfacet_dim; i++)
+    if (has_mids[i]) index += NumSubEntities(this_type, i);
+    
+
+    // now add the index of this subfacet, or one if we're asking about the entity as a whole
+  if (subfacet_index == -1 && has_mids[subfacet_dim])
+      // want the index of the last ho node on this subfacet
+    index += NumSubEntities(this_type, subfacet_dim);
+  
+  else if (subfacet_index != -1 && has_mids[subfacet_dim])
+    index += subfacet_index + 1 - numberBasis;
+
+    // that's it
+  return index;
+}
+
+  //! given data about an element and a vertex in that element, return the dimension
+  //! and index of the sub-entity that the vertex resolves.  If it does not resolve a
+  //! sub-entity, either because it's a corner node or it's not in the element, -1 is
+  //! returned in both return values
+void CN::HONodeParent( EntityType elem_type,
+                         int num_verts, 
+                         int ho_index,
+                         int& parent_dim,
+                         int& parent_index )
+{
+    // begin with error values
+  parent_dim = parent_index = -1;
+     
+    // given the number of verts and the element type, get the hasmidnodes solution
+  int has_mids[4];
+  HasMidNodes(elem_type, num_verts, has_mids);
+
+  int index = VerticesPerEntity(elem_type)-1;
+  const int dim = Dimension(elem_type);
+
+    // keep a running sum of the ho node indices for this type of element, and stop
+    // when you get to the dimension which has the ho node
+  for (int i = 1; i < dim; i++) {
+    if (has_mids[i]) {
+      if (ho_index <= index + NumSubEntities(elem_type, i)) {
+          // the ho_index resolves an entity of dimension i, so set the return values
+          // and break out of the loop
+        parent_dim = i;
+        parent_index = ho_index - index - 1;
+        return;
+      }
+      else {
+        index += NumSubEntities(elem_type, i);
+      } 
+    }
+  }
+  
+    // mid region node case  
+  if( has_mids[dim] && ho_index == index+1 ) {
+    parent_dim = dim;
+    parent_index = 0; 
+  }
+}
+
+} // namespace moab
+
+
+using moab::CN;
+using moab::EntityType;
+
+  //! get the basis of the numbering system
+void MBCN_GetBasis(int *rval) {*rval = CN::GetBasis();}
+  
+  //! set the basis of the numbering system
+void MBCN_SetBasis(const int in_basis) {CN::SetBasis(in_basis);}
+
+  //! return the string type name for this type
+void MBCN_EntityTypeName(const int this_type, char *rval, int rval_len) 
+{
+  const char *rval_tmp = CN::EntityTypeName((EntityType)this_type);
+  int rval_len_tmp = strlen(rval_tmp);
+  rval_len_tmp = (rval_len_tmp < rval_len ? rval_len_tmp : rval_len);
+  strncpy(rval, rval_tmp, rval_len_tmp);
+}
+  
+  //! given a name, find the corresponding entity type
+void MBCN_EntityTypeFromName(const char *name, int *rval) 
+{
+  *rval = CN::EntityTypeFromName(name);
+}
+  
+  //! return the topological entity dimension
+void MBCN_Dimension(const int t, int *rval) 
+{
+  *rval = CN::Dimension((EntityType)t);
+}
+
+  //! return the number of (corner) vertices contained in the specified type.  
+void MBCN_VerticesPerEntity(const int t, int *rval) 
+{
+  *rval = CN::VerticesPerEntity((EntityType)t);
+}
+  
+  //! return the number of sub-entities bounding the entity.
+void MBCN_NumSubEntities(const int t, const int d, int *rval) 
+{
+  *rval = CN::NumSubEntities((EntityType)t, d);
+}
+
+  //! return the type of a particular sub-entity.
+  //! \param this_type Type of entity for which sub-entity type is being queried
+  //! \param sub_dimension Topological dimension of sub-entity whose type is being queried
+  //! \param index Index of sub-entity whose type is being queried
+  //! \return type Entity type of sub-entity with specified dimension and index
+void MBCN_SubEntityType(const int this_type,
+                        const int sub_dimension,
+                        const int index, int *rval) 
+
+{
+  
+  *rval = CN::SubEntityType((EntityType)this_type, sub_dimension, index);
+
+}
+
+  
+  //! return the vertex indices of the specified sub-entity.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param sub_dimension Dimension of sub-entity
+  //! \param sub_index Index of sub-entity
+  //! \param sub_entity_conn Connectivity of sub-entity (returned to calling function)
+void MBCN_SubEntityVertexIndices(const int this_type, 
+                                 const int sub_dimension,
+                                 const int sub_index,
+                                 int sub_entity_conn[]) 
+{
+  CN::SubEntityVertexIndices((EntityType)this_type, sub_dimension, 
+                               sub_index, sub_entity_conn);
+}
+
+  //! return the vertices of the specified sub entity
+  //! \param parent_conn Connectivity of parent entity
+  //! \param parent_type Entity type of parent entity
+  //! \param sub_dimension Dimension of sub-entity being queried
+  //! \param sub_index Index of sub-entity being queried
+  //! \param sub_entity_conn Connectivity of sub-entity, based on parent_conn and canonical
+  //!           ordering for parent_type
+  //! \param num_sub_vertices Number of vertices in sub-entity
+//  void MBCN_SubEntityConn(const void *parent_conn, const int parent_type,
+//                            const int sub_dimension,
+//                            const int sub_index,
+//                            void *sub_entity_conn, int &num_sub_vertices) {return CN::SubEntityConn();}
+
+  //! For a specified set of sides of given dimension, return the intersection 
+  //! or union of all sides of specified target dimension adjacent to those sides.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param source_indices Indices of sides being queried
+  //! \param num_source_indices Number of entries in <em>source_indices</em>
+  //! \param source_dim Dimension of source entity
+  //! \param target_dim Dimension of target entity
+  //! \param index_list Indices of target entities (returned)
+  //! \param operation_type Specify either CN::INTERSECT (0) or CN::UNION (1) to get intersection
+  //!        or union of target entity lists over source entities
+void MBCN_AdjacentSubEntities(const int this_type,
+                              const int *source_indices,
+                              const int num_source_indices,
+                              const int source_dim,
+                              const int target_dim,
+                              int *index_list,
+                              int *num_indices,
+                              const int operation_type, int *rval) 
+{
+  std::vector<int> tmp_index_list;
+  *rval = CN::AdjacentSubEntities((EntityType)this_type, source_indices, 
+                                    num_source_indices, source_dim, target_dim, 
+                                    tmp_index_list, operation_type);
+  std::copy(tmp_index_list.begin(), tmp_index_list.end(), index_list);
+  *num_indices = tmp_index_list.size();
+}
+
+  //! return the side index represented in the input sub-entity connectivity
+  //! \param parent_type Entity type of parent entity
+  //! \param child_conn_indices Child connectivity to query, specified as indices
+  //!                           into the connectivity list of the parent.
+  //! \param child_num_verts Number of values in <em>child_conn_indices</em>
+  //! \param child_dim Dimension of child entity being queried
+  //! \param side_no Side number of child entity (returned)
+  //! \param sense Sense of child entity with respect to order in <em>child_conn</em> (returned)
+  //! \param offset Offset of <em>child_conn</em> with respect to canonical ordering data (returned)
+  //! \return status Returns zero if successful, -1 if not
+void MBCN_SideNumber(const int parent_type,
+                     const int *child_conn_indices, const int child_num_verts,
+                     const int child_dim,
+                     int *side_no, int *sense, int *offset) 
+{
+  CN::SideNumber((EntityType)parent_type, child_conn_indices, child_num_verts, child_dim,
+                   *side_no, *sense, *offset);
+}
+
+void MBCN_SideNumberInt(const int *parent_conn, const EntityType parent_type,
+                        const int *child_conn, const int child_num_verts,
+                        const int child_dim,
+                        int *side_no, int *sense, int *offset) 
+{
+  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
+              child_dim, *side_no, *sense, *offset);
+}
+
+void MBCN_SideNumberUint(const unsigned int *parent_conn, const EntityType parent_type,
+                         const unsigned int *child_conn, const int child_num_verts,
+                         const int child_dim,
+                         int *side_no, int *sense, int *offset)
+{
+  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
+              child_dim, *side_no, *sense, *offset);
+}
+
+void MBCN_SideNumberLong(const long *parent_conn, const EntityType parent_type,
+                         const long *child_conn, const int child_num_verts,
+                         const int child_dim,
+                         int *side_no, int *sense, int *offset)
+{
+  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
+              child_dim, *side_no, *sense, *offset);
+}
+
+void MBCN_SideNumberUlong(const unsigned long *parent_conn, const EntityType parent_type,
+                          const unsigned long *child_conn, const int child_num_verts,
+                          const int child_dim,
+                          int *side_no, int *sense, int *offset)
+{
+  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
+              child_dim, *side_no, *sense, *offset);
+}
+
+void MBCN_SideNumberVoid(void * const *parent_conn, const EntityType parent_type,
+                         void * const *child_conn, const int child_num_verts,
+                         const int child_dim,
+                         int *side_no, int *sense, int *offset)
+{
+  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
+              child_dim, *side_no, *sense, *offset);
+}
+
+  //! return the dimension and index of the opposite side, given parent entity type and child 
+  //! dimension and index.  This function is only defined for certain types of parent/child types:
+  //! (Parent, Child dim->Opposite dim): 
+  //!  (Tri, 1->0), (Tri, 0->1), (Quad, 1->1), (Quad, 0->0), 
+  //!  (Tet, 2->0), (Tet, 1->1), (Tet, 0->2),
+  //!  (Hex, 2->2), (Hex, 1->1)(diagonally across element), (Hex, 0->0) (diagonally across element)
+  //! All other parent types and child dimensions return an error.
+  //!
+  //! \param parent_type The type of parent element
+  //! \param child_type The type of child element
+  //! \param child_index The index of the child element
+  //! \param opposite_index The index of the opposite element
+  //! \return status Returns 0 if successful, -1 if not
+void MBCN_OppositeSide(const int parent_type,
+                       const int child_index,
+                       const int child_dim,
+                       int *opposite_index,
+                       int *opposite_dim, int *rval) 
+{
+  *rval = CN::OppositeSide((EntityType)parent_type, child_index, child_dim, 
+                             *opposite_index, *opposite_dim);
+}
+
+  //! given two connectivity arrays, determine whether or not they represent the same entity.
+  //! \param conn1 Connectivity array of first entity
+  //! \param conn2 Connectivity array of second entity
+  //! \param num_vertices Number of entries in <em>conn1</em> and <em>conn2</em>
+  //! \param direct If positive, entities have the same sense (returned)
+  //! \param offset Offset of <em>conn2</em>'s first vertex in <em>conn1</em>
+  //! \return int Returns true if <em>conn1</em> and <em>conn2</em> match
+void MBCN_ConnectivityMatchInt(const int *conn1,
+                               const int *conn2,
+                               const int num_vertices,
+                               int *direct, int *offset, int *rval) 
+{
+  *rval = CN::ConnectivityMatch(conn1, conn2, num_vertices, 
+                                  *direct, *offset);
+}
+
+void MBCN_ConnectivityMatchUint(const unsigned int *conn1,
+                                const unsigned int *conn2,
+                                const int num_vertices,
+                                int *direct, int *offset, int *rval) 
+{
+  *rval = CN::ConnectivityMatch(conn1, conn2, num_vertices, 
+                                  *direct, *offset);
+}
+
+void MBCN_ConnectivityMatchLong(const long* conn1,
+                                const long* conn2,
+                                const int num_vertices,
+                                int* direct, int* offset , int *rval) 
+{
+  *rval = CN::ConnectivityMatch(conn1, conn2, num_vertices, 
+                                  *direct, *offset);
+}
+
+void MBCN_ConnectivityMatchUlong(const unsigned long* conn1,
+                                 const unsigned long* conn2,
+                                 const int num_vertices,
+                                 int *direct, int* offset , int *rval) 
+{
+  *rval = CN::ConnectivityMatch(conn1, conn2, num_vertices, 
+                                  *direct, *offset);
+}
+
+void MBCN_ConnectivityMatchVoid(void* const* conn1,
+                                void* const* conn2,
+                                const int num_vertices,
+                                int* direct, int* offset , int *rval) 
+{
+  *rval = CN::ConnectivityMatch(conn1, conn2, num_vertices, 
+                                  *direct, *offset);
+}
+
+  //! true if entities of a given type and number of nodes indicates mid edge nodes are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \return int Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
+  //!  mid-edge nodes are likely
+void MBCN_HasMidEdgeNodes(const int this_type, 
+                          const int num_verts, int *rval) 
+{
+  *rval = CN::HasMidEdgeNodes((EntityType)this_type, num_verts);
+}
+
+  //! true if entities of a given type and number of nodes indicates mid face nodes are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \return int Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
+  //!  mid-face nodes are likely
+void MBCN_HasMidFaceNodes(const int this_type, 
+                          const int num_verts, int *rval) 
+{
+  *rval = CN::HasMidFaceNodes((EntityType)this_type, num_verts);
+}
+
+  //! true if entities of a given type and number of nodes indicates mid region nodes are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \return int Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
+  //!  mid-region nodes are likely
+void MBCN_HasMidRegionNodes(const int this_type, 
+                            const int num_verts, int *rval) 
+{
+  *rval = CN::HasMidRegionNodes((EntityType)this_type, num_verts);
+}
+
+  //! true if entities of a given type and number of nodes indicates mid edge/face/region nodes 
+  //! are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \param mid_nodes If <em>mid_nodes[i], i=1..3</em> is true, indicates that mid-edge 
+  //!    (i=1), mid-face (i=2), and/or mid-region (i=3) nodes are likely
+void MBCN_HasMidNodes(const int this_type, 
+                      const int num_verts, 
+                      int mid_nodes[4]) 
+{
+  return CN::HasMidNodes((EntityType)this_type, num_verts, mid_nodes);
+}
+
+  //! given data about an element and a vertex in that element, return the dimension
+  //! and index of the sub-entity that the vertex resolves.  If it does not resolve a
+  //! sub-entity, either because it's a corner node or it's not in the element, -1 is
+  //! returned in both return values.
+  //! \param elem_type Type of entity being queried
+  //! \param num_nodes The number of nodes in the element connectivity
+  //! \param ho_node_index The position of the HO node in the connectivity list (zero based)
+  //! \param parent_dim Dimension of sub-entity high-order node resolves (returned)
+  //! \param parent_index Index of sub-entity high-order node resolves (returned)
+void MBCN_HONodeParent( int elem_type,
+                        int num_nodes, 
+                        int ho_node_index,
+                        int *parent_dim, 
+                        int *parent_index ) 
+{
+  return CN::HONodeParent((EntityType)elem_type, num_nodes, ho_node_index, 
+                            *parent_dim, *parent_index);
+}
+
+  //! for an entity of this type with num_verts vertices, and a specified subfacet 
+  //! (dimension and index), return the index of the higher order node for that entity 
+  //! in this entity's connectivity array
+  //! \param this_type Type of entity being queried
+  //! \param num_verts Number of vertices for the entity being queried
+  //! \param subfacet_dim Dimension of sub-entity being queried
+  //! \param subfacet_index Index of sub-entity being queried
+  //! \return index Index of sub-entity's higher-order node
+void MBCN_HONodeIndex(const int this_type, const int num_verts,
+                      const int subfacet_dim, const int subfacet_index, int *rval) 
+
+{
+  
+  *rval = CN::HONodeIndex((EntityType)this_type, num_verts, subfacet_dim, subfacet_index);
+
+}
+
+namespace moab {
+
+template <typename T> 
+inline int permute_this(EntityType t,
+                        const int dim,
+                        T* conn,
+                        const int indices_per_ent,
+                        const int num_entries) 
+{
+  T tmp_conn[MB_MAX_SUB_ENTITIES];
+  assert(indices_per_ent <= CN::permuteVec[t][dim][MB_MAX_SUB_ENTITIES]);
+  if (indices_per_ent > CN::permuteVec[t][dim][MB_MAX_SUB_ENTITIES]) return 1;
+  short int *tvec = CN::permuteVec[t][dim];
+  T *pvec = conn;
+  for (int j = 0; j < num_entries; j++) {
+    for (int i = 0; i < indices_per_ent; i++)
+      tmp_conn[tvec[i]] = pvec[i];
+    memcpy(pvec, tmp_conn, indices_per_ent*sizeof(T));
+    pvec += indices_per_ent;
+  }
+
+  return 0;
+}
+
+template <typename T> 
+inline int rev_permute_this(EntityType t,
+                            const int dim,
+                            T* conn,
+                            const int indices_per_ent,
+                            const int num_entries) 
+{
+  T tmp_conn[MB_MAX_SUB_ENTITIES];
+  assert(indices_per_ent <= CN::revPermuteVec[t][dim][MB_MAX_SUB_ENTITIES]);
+  if (indices_per_ent > CN::revPermuteVec[t][dim][MB_MAX_SUB_ENTITIES]) return 1;
+  short int *tvec = CN::revPermuteVec[t][dim];
+  T *pvec = conn;
+  for (int j = 0; j < num_entries; j++) {
+    for (int i = 0; i < indices_per_ent; i++)
+      tmp_conn[i] = pvec[tvec[i]];
+    memcpy(pvec, tmp_conn, indices_per_ent*sizeof(T));
+    pvec += indices_per_ent;
+  }
+
+  return 0;
+}
+
+//! Permute this vector
+inline int CN::permuteThis(const EntityType t, const int dim, int *pvec, 
+                             const int num_indices, const int num_entries) 
+{return permute_this(t, dim, pvec, num_indices, num_entries);}
+inline int CN::permuteThis(const EntityType t, const int dim, unsigned int *pvec, 
+                             const int num_indices, const int num_entries) 
+{return permute_this(t, dim, pvec, num_indices, num_entries);}
+inline int CN::permuteThis(const EntityType t, const int dim, long *pvec, 
+                             const int num_indices, const int num_entries) 
+{return permute_this(t, dim, pvec, num_indices, num_entries);}
+inline int CN::permuteThis(const EntityType t, const int dim, void **pvec, 
+                             const int num_indices, const int num_entries) 
+{return permute_this(t, dim, pvec, num_indices, num_entries);}
+
+//! Reverse permute this vector
+inline int CN::revPermuteThis(const EntityType t, const int dim, int *pvec, 
+                             const int num_indices, const int num_entries) 
+{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
+inline int CN::revPermuteThis(const EntityType t, const int dim, unsigned int *pvec, 
+                             const int num_indices, const int num_entries) 
+{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
+inline int CN::revPermuteThis(const EntityType t, const int dim, long *pvec, 
+                             const int num_indices, const int num_entries) 
+{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
+inline int CN::revPermuteThis(const EntityType t, const int dim, void **pvec, 
+                             const int num_indices, const int num_entries) 
+{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
+
+  
+} // namespace moab

Modified: MOAB/trunk/src/Core.cpp
===================================================================
--- MOAB/trunk/src/Core.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/Core.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -34,7 +34,7 @@
 #include "AEntityFactory.hpp"
 #include "ReadUtil.hpp"
 #include "WriteUtil.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/HigherOrderFactory.hpp"
 #include "SequenceManager.hpp"
 #include "Error.hpp"
@@ -338,7 +338,7 @@
 
 int Core::dimension_from_handle(const EntityHandle handle) const
 {
-  return MBCN::Dimension(TYPE_FROM_HANDLE(handle));
+  return CN::Dimension(TYPE_FROM_HANDLE(handle));
 }
 
 //! load mesh from data in file
@@ -921,7 +921,7 @@
   ErrorCode result = get_entities_by_type(0, type, this_range);
   
   int num_ents = this_range.size();
-  connect.reserve(num_ents*MBCN::VerticesPerEntity(type));
+  connect.reserve(num_ents*CN::VerticesPerEntity(type));
   
     // now loop over these entities, getting connectivity for each
   for (Range::iterator this_it = this_range.begin(); 
@@ -1082,7 +1082,7 @@
     remaining -= count;
     temp_vec.clear();
     for (size_t j = 0; j < count; ++i, ++j) {
-      if (MBCN::Dimension(TYPE_FROM_HANDLE(*i)) == to_dimension) {
+      if (CN::Dimension(TYPE_FROM_HANDLE(*i)) == to_dimension) {
         temp_vec.push_back(*i);
       }
       else if (to_dimension == 0 && TYPE_FROM_HANDLE(*i) != MBPOLYHEDRON) {
@@ -1135,7 +1135,7 @@
     // input list), we begin with the adjacencies for the first entity.
   if (adj_entities.empty()) {
     EntityType type = TYPE_FROM_HANDLE(*begin);
-    if (to_dimension == MBCN::Dimension(type)) 
+    if (to_dimension == CN::Dimension(type)) 
       adj_entities.push_back(*begin); 
     else if(to_dimension == 0 && type != MBPOLYHEDRON)
       result = mb->get_connectivity(&(*begin), 1, adj_entities);
@@ -1154,7 +1154,7 @@
 
       // get the next set of adjacencies
     EntityType type = TYPE_FROM_HANDLE(*from_it);
-    if (to_dimension == MBCN::Dimension(type)) 
+    if (to_dimension == CN::Dimension(type)) 
       temp_vec.push_back(*from_it); 
     else if(to_dimension == 0 && type != MBPOLYHEDRON)
       result = mb->get_connectivity(&(*from_it), 1, temp_vec);
@@ -1437,8 +1437,8 @@
     result = MB_SUCCESS;
   } 
   else {
-    for (EntityType this_type = MBCN::TypeDimensionMap[dimension].first;
-         this_type <= MBCN::TypeDimensionMap[dimension].second;
+    for (EntityType this_type = CN::TypeDimensionMap[dimension].first;
+         this_type <= CN::TypeDimensionMap[dimension].second;
          this_type++) {
       sequence_manager()->get_entities( this_type, entities );
     }
@@ -1466,8 +1466,8 @@
     result = MB_SUCCESS;
   } 
   else {
-    for (EntityType this_type = MBCN::TypeDimensionMap[dimension].first;
-         this_type <= MBCN::TypeDimensionMap[dimension].second;
+    for (EntityType this_type = CN::TypeDimensionMap[dimension].first;
+         this_type <= CN::TypeDimensionMap[dimension].second;
          this_type++) {
       sequence_manager()->get_entities( this_type, entities );
     }
@@ -1614,8 +1614,8 @@
  
   if (!meshset) {
     number = 0;
-    for (EntityType this_type = MBCN::TypeDimensionMap[dim].first;
-         this_type <= MBCN::TypeDimensionMap[dim].second;
+    for (EntityType this_type = CN::TypeDimensionMap[dim].first;
+         this_type <= CN::TypeDimensionMap[dim].second;
          this_type++) {
       number += sequence_manager()->get_number_entities( this_type );
     }
@@ -2025,7 +2025,7 @@
                                    EntityHandle &handle)
 {
     // make sure we have enough vertices for this entity type
-  if(num_nodes < MBCN::VerticesPerEntity(type))
+  if(num_nodes < CN::VerticesPerEntity(type))
     return MB_FAILURE;
   
   ErrorCode status = sequence_manager()->create_element(type, connectivity, num_nodes, handle);
@@ -2096,7 +2096,7 @@
   
     // If auto_merge is not set, all sub-entities should
     // be merged if the entities are to be merged.
-  int ent_dim = MBCN::Dimension(type_to_keep);
+  int ent_dim = CN::Dimension(type_to_keep);
   if(ent_dim > 0)
   {
     std::vector<EntityHandle> conn, conn2;
@@ -2112,7 +2112,7 @@
     int dum1, dum2;
     if(!auto_merge && 
        (conn.size() != conn2.size() ||
-        !MBCN::ConnectivityMatch(&conn[0], &conn2[0], conn.size(), dum1, dum2)))
+        !CN::ConnectivityMatch(&conn[0], &conn2[0], conn.size(), dum1, dum2)))
       return MB_FAILURE;
   }
 
@@ -2193,7 +2193,7 @@
     std::cout << "Number of entities per type: " << std::endl;
     for (EntityType this_type = MBVERTEX; this_type < MBMAXTYPE; this_type++) {
       result = get_number_entities_by_type(0, this_type, num_ents);
-      std::cout << MBCN::EntityTypeName(this_type) << ": " << num_ents << std::endl;
+      std::cout << CN::EntityTypeName(this_type) << ": " << num_ents << std::endl;
     }
     std::cout << std::endl;
 
@@ -2227,7 +2227,7 @@
     ErrorCode tmp_result;
     for (int i = 0; i < num_entities; i++) {
       EntityType this_type = TYPE_FROM_HANDLE(entities[i]);
-      std::cout << MBCN::EntityTypeName(this_type) << " " 
+      std::cout << CN::EntityTypeName(this_type) << " " 
                 << ID_FROM_HANDLE(entities[i]) << ":" << endl;
 
       tmp_result = (const_cast<Core*>(this))->list_entity(entities[i]);
@@ -2244,7 +2244,7 @@
   
   for (Range::const_iterator rit = temp_range.begin(); rit != temp_range.end(); rit++) {
     EntityType this_type = TYPE_FROM_HANDLE(*rit);
-    std::cout << MBCN::EntityTypeName(this_type) << " " << ID_FROM_HANDLE(*rit) << ":" << endl;
+    std::cout << CN::EntityTypeName(this_type) << " " << ID_FROM_HANDLE(*rit) << ":" << endl;
 
     tmp_result = (const_cast<Core*>(this))->list_entity(*rit);
     if (MB_SUCCESS != tmp_result) result = tmp_result;
@@ -2286,7 +2286,7 @@
   bool some = false;
   int multiple = 0;
   for (int dim = 0; dim <= 3; dim++) {
-    if (dim == MBCN::Dimension(this_type)) continue;
+    if (dim == CN::Dimension(this_type)) continue;
     adj_vec.clear();
       // use const_cast here 'cuz we're in a const function and we're passing 'false' for
       // create_if_missing, so we know we won't change anything
@@ -2295,7 +2295,7 @@
     for (HandleVec::iterator adj_it = adj_vec.begin(); adj_it != adj_vec.end(); adj_it++) {
       if (adj_it != adj_vec.begin()) std::cout << ", ";
       else std::cout << "   ";
-      std::cout << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*adj_it)) << " " << ID_FROM_HANDLE(*adj_it);
+      std::cout << CN::EntityTypeName(TYPE_FROM_HANDLE(*adj_it)) << " " << ID_FROM_HANDLE(*adj_it);
     }
     if (!adj_vec.empty()) {
       std::cout << std::endl;
@@ -2312,7 +2312,7 @@
     std::cout << "  Explicit adjacencies: ";
     for (int i = 0; i < num_exp; i++) {
       if (i != 0) std::cout << ", ";
-      std::cout << MBCN::EntityTypeName(TYPE_FROM_HANDLE(explicit_adjs[i])) << " " 
+      std::cout << CN::EntityTypeName(TYPE_FROM_HANDLE(explicit_adjs[i])) << " " 
                 << ID_FROM_HANDLE(explicit_adjs[i]);
     }
     std::cout << std::endl;
@@ -2347,7 +2347,7 @@
   int num_parent_vertices, num_child_vertices;
   ErrorCode result = get_connectivity(parent, parent_conn, num_parent_vertices, true);
   if (MB_NOT_IMPLEMENTED == result) {
-    static std::vector<EntityHandle> tmp_connect(MBCN::MAX_NODES_PER_ELEMENT);
+    static std::vector<EntityHandle> tmp_connect(CN::MAX_NODES_PER_ELEMENT);
     result = get_connectivity(parent, parent_conn, num_parent_vertices, true, &tmp_connect);
   }
   if (MB_SUCCESS != result) return result;
@@ -2386,9 +2386,9 @@
       }
     }
     
-    int temp_result = MBCN::SideNumber(TYPE_FROM_HANDLE(parent),
+    int temp_result = CN::SideNumber(TYPE_FROM_HANDLE(parent),
                                        child_conn_indices, num_child_vertices, 
-                                       MBCN::Dimension(TYPE_FROM_HANDLE(child)), 
+                                       CN::Dimension(TYPE_FROM_HANDLE(child)), 
                                        side_number, sense, offset);
     return (0 == temp_result ? MB_SUCCESS : MB_FAILURE);
   }
@@ -2404,7 +2404,7 @@
       return MB_SUCCESS;
     }
     else if (TYPE_FROM_HANDLE(child) == MBPOLYGON) {
-      bool match = MBCN::ConnectivityMatch(parent_conn, child_conn,
+      bool match = CN::ConnectivityMatch(parent_conn, child_conn,
                                            num_parent_vertices,
                                            sense, offset);
       side_number = 0;
@@ -2444,31 +2444,31 @@
 
     // find whether this entity has ho nodes
   int mid_nodes[4];
-  MBCN::HasMidNodes(parent_type, num_parent_vertices, mid_nodes);
+  CN::HasMidNodes(parent_type, num_parent_vertices, mid_nodes);
 
     // check whether this entity has mid nodes on this dimension subfacet; 
     // use dimension-1 because vertices don't have mid nodes
-  if (!mid_nodes[MBCN::Dimension(subfacet_type)]) return MB_SUCCESS;
+  if (!mid_nodes[CN::Dimension(subfacet_type)]) return MB_SUCCESS;
 
     // ok, we have mid nodes; now must compute expected index in connectivity array; 
     // ho nodes stored for edges, faces then entity
 
     // offset starts with # corner vertices
-  int offset = MBCN::VerticesPerEntity(parent_type);
+  int offset = CN::VerticesPerEntity(parent_type);
   int i;
 
-  for (i = 0; i < MBCN::Dimension(subfacet_type)-1; i++)
+  for (i = 0; i < CN::Dimension(subfacet_type)-1; i++)
       // for each dimension lower than that of the subfacet we're looking for, 
       // if this entity has midnodes in that dimension, increment offset by # 
       // of subfacets of that dimension; use dimension-1 in loop because 
       // canon numbering table only has 2 positions, for edges and faces;
-    if (mid_nodes[i+1]) offset += MBCN::mConnectivityMap[parent_type][i].num_sub_elements;
+    if (mid_nodes[i+1]) offset += CN::mConnectivityMap[parent_type][i].num_sub_elements;
 
     // now add the index of this subfacet; only need to if it's not the highest dimension
   if (subfacet_type != parent_type) {
 
       // find indices into parent_conn for each entry in child_conn
-    unsigned subfacet_size = MBCN::VerticesPerEntity(subfacet_type);
+    unsigned subfacet_size = CN::VerticesPerEntity(subfacet_type);
     int subfacet_indices[10];
     assert(subfacet_size <= sizeof(subfacet_indices)/sizeof(subfacet_indices[0]));
     for (unsigned i = 0; i < subfacet_size; ++i) {
@@ -2481,7 +2481,7 @@
 
     int dum, side_no, temp_offset;
     int temp_result = 
-      MBCN::SideNumber(  parent_type, subfacet_indices, 
+      CN::SideNumber(  parent_type, subfacet_indices, 
                          subfacet_size, subfacet_type,
                          side_no, dum, temp_offset);
     if(temp_result != 0) return MB_FAILURE;
@@ -2526,7 +2526,7 @@
   std::vector<int> vertex_indices;
 
   int temp_result = 
-    MBCN::AdjacentSubEntities(source_type, &side_number, 1, dim, 0, vertex_indices);
+    CN::AdjacentSubEntities(source_type, &side_number, 1, dim, 0, vertex_indices);
   if (0 != temp_result) return MB_FAILURE;
     // now get the actual vertices
   for (unsigned int i = 0; i < vertex_indices.size(); i++)
@@ -2541,7 +2541,7 @@
   if (!target_ents.empty() &&
       TYPE_FROM_HANDLE(*(target_ents.begin())) != MBVERTEX &&
       TYPE_FROM_HANDLE(*(target_ents.begin())) != 
-      MBCN::mConnectivityMap[source_type][dim-1].target_type[side_number])
+      CN::mConnectivityMap[source_type][dim-1].target_type[side_number])
     return MB_ENTITY_NOT_FOUND;
 
   if (!target_ents.empty()) target_entity = *(target_ents.begin());
@@ -3113,7 +3113,7 @@
   for (int i = 0; i < num_ents; i++) {
     EntityHandle this_ent = ents[i];
     std::ostringstream ent_str;
-    ent_str << MBCN::EntityTypeName(TYPE_FROM_HANDLE(this_ent)) << " "
+    ent_str << CN::EntityTypeName(TYPE_FROM_HANDLE(this_ent)) << " "
             << ID_FROM_HANDLE(this_ent) << ": ";
     int this_dim = dimension_from_handle(this_ent);
 
@@ -3148,7 +3148,7 @@
         tmp_result = sequence_manager()->find(*rit, seq);
         if(seq == 0 || tmp_result != MB_SUCCESS) {
           oss << ent_str.str() << 
-            "Adjacent entity " << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*rit)) << " "
+            "Adjacent entity " << CN::EntityTypeName(TYPE_FROM_HANDLE(*rit)) << " "
               << ID_FROM_HANDLE(*rit) << " is invalid." << std::endl;
           result = tmp_result;
         }
@@ -3158,7 +3158,7 @@
           if (MB_SUCCESS != tmp_result) {
             oss << ent_str.str() 
                 << "Failed to get reverse adjacency from " 
-                << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*rit)) << " "
+                << CN::EntityTypeName(TYPE_FROM_HANDLE(*rit)) << " "
                 << ID_FROM_HANDLE(*rit);
             if (MB_MULTIPLE_ENTITIES_FOUND == tmp_result)
               oss << " (MULTIPLE)" << std::endl;
@@ -3168,7 +3168,7 @@
           else if (rev_adjs.find(this_ent) == rev_adjs.end()) {
             oss << ent_str.str() 
                 << "Failed to find adjacency to this entity from " 
-                << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*rit)) << " "
+                << CN::EntityTypeName(TYPE_FROM_HANDLE(*rit)) << " "
                 << ID_FROM_HANDLE(*rit) << "." << std::endl;
             result = tmp_result;
           }
@@ -3444,7 +3444,7 @@
       for (int j = 0; j < nadj; ++j) {
         if (TYPE_FROM_HANDLE(adj[j]) != pt) {
           pt = TYPE_FROM_HANDLE(adj[j]);
-          printf("  %s", pt >= MBMAXTYPE ? "INVALID TYPE" : MBCN::EntityTypeName(pt) );
+          printf("  %s", pt >= MBMAXTYPE ? "INVALID TYPE" : CN::EntityTypeName(pt) );
         }
         printf(" %d", (int)ID_FROM_HANDLE(adj[j]));
       }
@@ -3469,7 +3469,7 @@
       clen = strlen("Connectivity");
     std::vector<char> dashes( clen, '-' );
     dashes.push_back( '\0' );
-    printf( "  %7s ID %-*s Adjacencies\n", MBCN::EntityTypeName(t), clen, "Connectivity" );
+    printf( "  %7s ID %-*s Adjacencies\n", CN::EntityTypeName(t), clen, "Connectivity" );
     printf( "  ---------- %s -----------...\n", &dashes[0] );
     
     std::vector<EntityHandle> storage;
@@ -3503,7 +3503,7 @@
         for (int j = 0; j < nadj; ++j) {
           if (TYPE_FROM_HANDLE(adj[j]) != pt) {
             pt = TYPE_FROM_HANDLE(adj[j]);
-            printf("  %s", pt >= MBMAXTYPE ? "INVALID TYPE" : MBCN::EntityTypeName(pt) );
+            printf("  %s", pt >= MBMAXTYPE ? "INVALID TYPE" : CN::EntityTypeName(pt) );
           }
           printf(" %d", (int)ID_FROM_HANDLE(adj[j]));
         }

Modified: MOAB/trunk/src/DualTool.cpp
===================================================================
--- MOAB/trunk/src/DualTool.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/DualTool.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -23,7 +23,7 @@
 #include "moab/Core.hpp"
 #include "moab/MeshTopoUtil.hpp"
 #include "AEntityFactory.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <string>
 #include <algorithm>
 #include <iostream>
@@ -203,8 +203,8 @@
   if (all_regions.empty()) return MB_SUCCESS;
   
     // make sure they're all regions
-  assert(3 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_regions.begin())) &&
-         3 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_regions.rbegin())));
+  assert(3 == CN::Dimension(TYPE_FROM_HANDLE(*all_regions.begin())) &&
+         3 == CN::Dimension(TYPE_FROM_HANDLE(*all_regions.rbegin())));
   
   Range::const_iterator rit;
   EntityHandle dual_ent;
@@ -294,8 +294,8 @@
   if (all_faces.empty()) return MB_SUCCESS;
   
     // make sure they're all faces
-  assert(2 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_faces.begin())) &&
-         2 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_faces.rbegin())));
+  assert(2 == CN::Dimension(TYPE_FROM_HANDLE(*all_faces.begin())) &&
+         2 == CN::Dimension(TYPE_FROM_HANDLE(*all_faces.rbegin())));
   
   Range::const_iterator rit;
   EntityHandle dual_ent;
@@ -376,8 +376,8 @@
   if (all_edges.empty()) return MB_SUCCESS;
   
     // make sure they're all edges
-  assert(1 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_edges.begin())) &&
-         1 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_edges.rbegin())));
+  assert(1 == CN::Dimension(TYPE_FROM_HANDLE(*all_edges.begin())) &&
+         1 == CN::Dimension(TYPE_FROM_HANDLE(*all_edges.rbegin())));
   
   Range::const_iterator rit;
   EntityHandle dual_ent;
@@ -581,8 +581,8 @@
   if (all_verts.empty()) return MB_SUCCESS;
   
     // make sure they're all edges
-  assert(0 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_verts.begin())) &&
-         0 == MBCN::Dimension(TYPE_FROM_HANDLE(*all_verts.rbegin())));
+  assert(0 == CN::Dimension(TYPE_FROM_HANDLE(*all_verts.begin())) &&
+         0 == CN::Dimension(TYPE_FROM_HANDLE(*all_verts.rbegin())));
   
   Range::const_iterator rit;
   EntityHandle dual_ent;
@@ -2531,12 +2531,12 @@
   ErrorCode result = MB_SUCCESS, tmp_result;
   for (Range::const_iterator iter = entities.begin(); iter != entities.end(); iter++) {
     EntityType this_type = TYPE_FROM_HANDLE(*iter);
-    std::cout << MBCN::EntityTypeName(this_type) << " " << ID_FROM_HANDLE(*iter) << ":" << std::endl;
+    std::cout << CN::EntityTypeName(this_type) << " " << ID_FROM_HANDLE(*iter) << ":" << std::endl;
 
     EntityHandle dual_ent = get_dual_entity(*iter);
     if (0 != dual_ent) {
       std::cout << "Dual to " 
-                << MBCN::EntityTypeName(mbImpl->type_from_handle(dual_ent)) << " "
+                << CN::EntityTypeName(mbImpl->type_from_handle(dual_ent)) << " "
                 << mbImpl->id_from_handle(dual_ent) << std::endl;
     }
 
@@ -3143,7 +3143,7 @@
   }
   
     // for each primal entity of dimension pd
-#define PRENT(ent) MBCN::EntityTypeName(TYPE_FROM_HANDLE(ent)) << " " \
+#define PRENT(ent) CN::EntityTypeName(TYPE_FROM_HANDLE(ent)) << " " \
         << ID_FROM_HANDLE(ent) 
   ErrorCode overall_result = MB_SUCCESS;
   for (int pd = 1; pd <= 3; pd++) {

Modified: MOAB/trunk/src/ElementSequence.hpp
===================================================================
--- MOAB/trunk/src/ElementSequence.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/ElementSequence.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -3,7 +3,7 @@
 
 #include "EntitySequence.hpp"
 #include "SequenceData.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 namespace moab {
 
@@ -64,15 +64,15 @@
 
 inline bool
 ElementSequence::has_mid_edge_nodes() const
-  { return MBCN::HasMidEdgeNodes( type(), nodes_per_element() ); }
+  { return CN::HasMidEdgeNodes( type(), nodes_per_element() ); }
 
 inline bool
 ElementSequence::has_mid_face_nodes() const
-  { return MBCN::HasMidFaceNodes( type(), nodes_per_element() ); }
+  { return CN::HasMidFaceNodes( type(), nodes_per_element() ); }
 
 inline bool
 ElementSequence::has_mid_volume_nodes() const
-  { return MBCN::HasMidRegionNodes( type(), nodes_per_element() ); }
+  { return CN::HasMidRegionNodes( type(), nodes_per_element() ); }
   
 } // namespace moab
 

Modified: MOAB/trunk/src/GeomTopoTool.cpp
===================================================================
--- MOAB/trunk/src/GeomTopoTool.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/GeomTopoTool.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -17,7 +17,7 @@
 #include "moab/Range.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/Interface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 #include <assert.h>
 #include <iostream>
@@ -284,7 +284,7 @@
         result = mdbImpl->get_connectivity( dents.front(), conn2, len2, true );
         if (MB_SUCCESS != result) return result;
         assert(len2 <= 4);
-        err = MBCN::SideNumber( TYPE_FROM_HANDLE(dp1ents[i]), conn3,
+        err = CN::SideNumber( TYPE_FROM_HANDLE(dp1ents[i]), conn3,
                                 conn2, len2, dim, num, sense, offset );
         if (err)
           return MB_FAILURE;

Modified: MOAB/trunk/src/GeomUtil.cpp
===================================================================
--- MOAB/trunk/src/GeomUtil.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/GeomUtil.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -19,7 +19,7 @@
  */
 
 #include "moab/CartVect.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/GeomUtil.hpp"
 #include "Matrix3.hpp"
 #include <cmath>
@@ -389,7 +389,7 @@
                               const CartVect& box_halfdims )
 {
   CartVect corners[8];
-  const unsigned num_corner = MBCN::VerticesPerEntity( type );
+  const unsigned num_corner = CN::VerticesPerEntity( type );
   assert( num_corner <= sizeof(corners)/sizeof(corners[0]) );
   for (unsigned i = 0; i < num_corner; ++i)
     corners[i] = elem_corners[i] - box_center;
@@ -416,7 +416,7 @@
   int indices[4]; // element edge/face vertex indices
   
     // test box face normals (principal axes)
-  const unsigned num_corner = MBCN::VerticesPerEntity( type );
+  const unsigned num_corner = CN::VerticesPerEntity( type );
   int not_less[3] = { num_corner, num_corner, num_corner }; 
   int not_greater[3] = { num_corner, num_corner, num_corner };
   int not_inside;
@@ -459,10 +459,10 @@
     // Edge directions for box are principal axis, so 
     // for each element edge, check along the cross-product
     // of that edge with each of the tree principal axes.
-  const unsigned num_edge = MBCN::NumSubEntities( type, 1 );
+  const unsigned num_edge = CN::NumSubEntities( type, 1 );
   for (e = 0; e < num_edge; ++e) { // for each element edge
       // get which element vertices bound the edge
-    MBCN::SubEntityVertexIndices( type, 1, e, indices );
+    CN::SubEntityVertexIndices( type, 1, e, indices );
 
       // X-Axis
 
@@ -527,10 +527,10 @@
   
   
     // test element face normals
-  const unsigned num_face = MBCN::NumSubEntities( type, 2 );
+  const unsigned num_face = CN::NumSubEntities( type, 2 );
   for (f = 0; f < num_face; ++f) {
-    MBCN::SubEntityVertexIndices( type, 2, f, indices );
-    switch (MBCN::SubEntityType( type, 2, f )) {
+    CN::SubEntityVertexIndices( type, 2, f, indices );
+    switch (CN::SubEntityType( type, 2, f )) {
       case MBTRI:
         norm = tri_norm( elem_corners[indices[0]], 
                          elem_corners[indices[1]], 

Modified: MOAB/trunk/src/HigherOrderFactory.cpp
===================================================================
--- MOAB/trunk/src/HigherOrderFactory.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/HigherOrderFactory.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -28,7 +28,7 @@
 #include "VertexSequence.hpp"
 #include "AEntityFactory.hpp"
 #include "moab/Core.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <assert.h>
 #include <algorithm>
 
@@ -52,9 +52,9 @@
 
   for(EntityType i=MBVERTEX; i<MBMAXTYPE; i++)
   {
-    const MBCN::ConnMap& canon_map = MBCN::mConnectivityMap[i][0];
+    const CN::ConnMap& canon_map = CN::mConnectivityMap[i][0];
     unsigned char (&this_map)[8][8] = mNodeMap[i];
-    int num_node = MBCN::VerticesPerEntity(i);
+    int num_node = CN::VerticesPerEntity(i);
     for(int j=0; j<canon_map.num_sub_elements; j++)
     {
       unsigned char x = canon_map.conn[j][0];
@@ -159,11 +159,11 @@
   }
 
     // calculate number of nodes in target configuration
-  unsigned nodes_per_elem = MBCN::VerticesPerEntity( seq->type() );
+  unsigned nodes_per_elem = CN::VerticesPerEntity( seq->type() );
   if (mid_edge_nodes)
-    nodes_per_elem += (seq->type() == MBEDGE) ? 1 : MBCN::NumSubEntities( seq->type(), 1 );
+    nodes_per_elem += (seq->type() == MBEDGE) ? 1 : CN::NumSubEntities( seq->type(), 1 );
   if (mid_face_nodes)
-    nodes_per_elem += (MBCN::Dimension(seq->type()) == 2) ? 1 : MBCN::NumSubEntities( seq->type(), 2 );
+    nodes_per_elem += (CN::Dimension(seq->type()) == 2) ? 1 : CN::NumSubEntities( seq->type(), 2 );
   if (mid_volume_nodes) 
     nodes_per_elem += 1;
   
@@ -268,10 +268,10 @@
   int edge_factor = seq->has_mid_edge_nodes() ? 1 : 0;
   int face_factor = seq->has_mid_face_nodes() ? 1 : 0;
   // offset by number of higher order nodes on edges if they exist
-  int num_corner_nodes = MBCN::VerticesPerEntity(this_type);
+  int num_corner_nodes = CN::VerticesPerEntity(this_type);
   int new_node_index = num_corner_nodes;
-  new_node_index += edge_factor * MBCN::mConnectivityMap[this_type][0].num_sub_elements;
-  new_node_index += face_factor * MBCN::mConnectivityMap[this_type][1].num_sub_elements;
+  new_node_index += edge_factor * CN::mConnectivityMap[this_type][0].num_sub_elements;
+  new_node_index += face_factor * CN::mConnectivityMap[this_type][1].num_sub_elements;
 
   EntityHandle* element = seq->get_connectivity_array();
   EntityHandle curr_handle = seq->start_handle();
@@ -315,12 +315,12 @@
 {
   EntityType this_type = seq->type();
   SequenceManager* seq_manager = mMB->sequence_manager();
-  int num_vertices = MBCN::VerticesPerEntity(this_type);
-  int num_edges = MBCN::mConnectivityMap[this_type][0].num_sub_elements;
+  int num_vertices = CN::VerticesPerEntity(this_type);
+  int num_edges = CN::mConnectivityMap[this_type][0].num_sub_elements;
   num_edges = seq->has_mid_edge_nodes() ? num_edges : 0;
-  int num_faces = MBCN::mConnectivityMap[this_type][1].num_sub_elements;
+  int num_faces = CN::mConnectivityMap[this_type][1].num_sub_elements;
 
-  const MBCN::ConnMap& entity_faces = MBCN::mConnectivityMap[this_type][1];
+  const CN::ConnMap& entity_faces = CN::mConnectivityMap[this_type][1];
 
   EntityHandle* element = seq->get_connectivity_array();
   EntityHandle curr_handle = seq->start_handle();
@@ -399,10 +399,10 @@
   SequenceManager* seq_manager = mMB->sequence_manager();
 
   // offset by number of corner nodes
-  int num_vertices = MBCN::VerticesPerEntity(this_type);
-  int num_edges = MBCN::mConnectivityMap[this_type][0].num_sub_elements;
+  int num_vertices = CN::VerticesPerEntity(this_type);
+  int num_edges = CN::mConnectivityMap[this_type][0].num_sub_elements;
 
-  const MBCN::ConnMap& entity_edges = MBCN::mConnectivityMap[this_type][0];
+  const CN::ConnMap& entity_edges = CN::mConnectivityMap[this_type][0];
   
   EntityHandle* element = seq->get_connectivity_array();
   EntityHandle curr_handle = seq->start_handle();
@@ -502,7 +502,7 @@
     }
     mMB->get_connectivity(*iter, conn, conn_size);
     // if this entity has mid edge nodes
-    if(MBCN::HasMidEdgeNodes(this_type, conn_size))
+    if(CN::HasMidEdgeNodes(this_type, conn_size))
     {
       // find out at which index the mid node should be at
       int first_node = std::find(conn, conn+conn_size, corner1) - conn;
@@ -562,14 +562,14 @@
       ++iter;
       continue;
     }
-    const MBCN::ConnMap& entity_faces = MBCN::mConnectivityMap[this_type][1];
+    const CN::ConnMap& entity_faces = CN::mConnectivityMap[this_type][1];
     mMB->get_connectivity(*iter, conn, conn_size);
-    int offset = MBCN::VerticesPerEntity(this_type);
-    if(MBCN::HasMidEdgeNodes(this_type, conn_size))
-      offset += MBCN::mConnectivityMap[this_type][0].num_sub_elements;
+    int offset = CN::VerticesPerEntity(this_type);
+    if(CN::HasMidEdgeNodes(this_type, conn_size))
+      offset += CN::mConnectivityMap[this_type][0].num_sub_elements;
 
     // if this entity has mid face nodes
-    if(MBCN::HasMidFaceNodes(this_type, conn_size))
+    if(CN::HasMidFaceNodes(this_type, conn_size))
     {
       int k;
       int indexes[4];
@@ -579,7 +579,7 @@
       // find out at which index the mid node should be at
       for(k=0; k<entity_faces.num_sub_elements; k++)
       {
-        if(MBCN::VerticesPerEntity(entity_faces.target_type[k]) != num_nodes)
+        if(CN::VerticesPerEntity(entity_faces.target_type[k]) != num_nodes)
           continue;
 
         int* pivot = std::find(indexes, indexes+num_nodes, entity_faces.conn[k][0]);
@@ -636,7 +636,7 @@
 ErrorCode 
 HigherOrderFactory::copy_corner_nodes( ElementSequence* src, ElementSequence* dst )
 {
-  unsigned num_corners = MBCN::VerticesPerEntity( src->type() );
+  unsigned num_corners = CN::VerticesPerEntity( src->type() );
   return copy_nodes( src, dst, num_corners, 0, 0 );
 }
 
@@ -646,8 +646,8 @@
   if (!src->has_mid_edge_nodes() || !dst->has_mid_edge_nodes())
     return MB_FAILURE;
   
-  unsigned num_corners = MBCN::VerticesPerEntity( src->type() );
-  unsigned num_edges = (src->type() == MBEDGE) ? 1 : MBCN::NumSubEntities( src->type(), 1 );
+  unsigned num_corners = CN::VerticesPerEntity( src->type() );
+  unsigned num_edges = (src->type() == MBEDGE) ? 1 : CN::NumSubEntities( src->type(), 1 );
   return copy_nodes( src, dst, num_edges, num_corners, num_corners );
 }
 
@@ -657,13 +657,13 @@
   if (!src->has_mid_face_nodes() || !dst->has_mid_face_nodes())
     return MB_FAILURE;
   
-  unsigned src_offset = MBCN::VerticesPerEntity( src->type() );
+  unsigned src_offset = CN::VerticesPerEntity( src->type() );
   unsigned dst_offset = src_offset;
   if (src->has_mid_edge_nodes())
-    src_offset += MBCN::NumSubEntities( src->type(), 1 );
+    src_offset += CN::NumSubEntities( src->type(), 1 );
   if (dst->has_mid_edge_nodes())
-    dst_offset += MBCN::NumSubEntities( dst->type(), 1 );
-  unsigned num_faces = (MBCN::Dimension(src->type()) == 2) ? 1 : MBCN::NumSubEntities( src->type(), 2 );
+    dst_offset += CN::NumSubEntities( dst->type(), 1 );
+  unsigned num_faces = (CN::Dimension(src->type()) == 2) ? 1 : CN::NumSubEntities( src->type(), 2 );
   return copy_nodes( src, dst, num_faces, src_offset, dst_offset );
 }
 
@@ -674,16 +674,16 @@
   if (!src->has_mid_volume_nodes() || !dst->has_mid_volume_nodes())
     return MB_FAILURE;
   
-  unsigned src_offset = MBCN::VerticesPerEntity( src->type() );
+  unsigned src_offset = CN::VerticesPerEntity( src->type() );
   unsigned dst_offset = src_offset;
   if (src->has_mid_edge_nodes())
-    src_offset += MBCN::NumSubEntities( src->type(), 1 );
+    src_offset += CN::NumSubEntities( src->type(), 1 );
   if (dst->has_mid_edge_nodes())
-    dst_offset += MBCN::NumSubEntities( dst->type(), 1 );
+    dst_offset += CN::NumSubEntities( dst->type(), 1 );
   if (src->has_mid_face_nodes())
-    src_offset += MBCN::NumSubEntities( src->type(), 2 );
+    src_offset += CN::NumSubEntities( src->type(), 2 );
   if (dst->has_mid_face_nodes())
-    dst_offset += MBCN::NumSubEntities( dst->type(), 2 );
+    dst_offset += CN::NumSubEntities( dst->type(), 2 );
   return copy_nodes( src, dst, 1, src_offset, dst_offset );
 }
 
@@ -733,8 +733,8 @@
     offset = 2;
   }
   else {
-    count = MBCN::NumSubEntities( seq->type(), 1 );
-    offset = MBCN::VerticesPerEntity( seq->type() );
+    count = CN::NumSubEntities( seq->type(), 1 );
+    offset = CN::VerticesPerEntity( seq->type() );
   }
   
   return remove_ho_nodes( seq, start, end, count, offset, deletable_nodes );
@@ -748,13 +748,13 @@
                                            Tag deletable_nodes )
 {
   int count;
-  if (MBCN::Dimension(seq->type()) == 2)
+  if (CN::Dimension(seq->type()) == 2)
     count = 1;
   else 
-    count = MBCN::NumSubEntities( seq->type(), 2 );
-  int offset = MBCN::VerticesPerEntity( seq->type() );
+    count = CN::NumSubEntities( seq->type(), 2 );
+  int offset = CN::VerticesPerEntity( seq->type() );
   if (seq->has_mid_edge_nodes())
-    offset += MBCN::NumSubEntities( seq->type(), 1 );
+    offset += CN::NumSubEntities( seq->type(), 1 );
   
   return remove_ho_nodes( seq, start, end, count, offset, deletable_nodes );
 }
@@ -765,11 +765,11 @@
                                              EntityHandle end,
                                              Tag deletable_nodes )
 {
-  int offset = MBCN::VerticesPerEntity( seq->type() );
+  int offset = CN::VerticesPerEntity( seq->type() );
   if (seq->has_mid_edge_nodes())
-    offset += MBCN::NumSubEntities( seq->type(), 1 );
+    offset += CN::NumSubEntities( seq->type(), 1 );
   if (seq->has_mid_face_nodes())
-    offset += MBCN::NumSubEntities( seq->type(), 2 );
+    offset += CN::NumSubEntities( seq->type(), 2 );
   
   return remove_ho_nodes( seq, start, end, 1, offset, deletable_nodes );
 }
@@ -837,7 +837,7 @@
 
   //tells us if higher order node is on 
   int dimension, side_number; 
-  MBCN::HONodeParent( this_type, seq->nodes_per_element(),
+  CN::HONodeParent( this_type, seq->nodes_per_element(),
                       conn_index, dimension, side_number );  
 
   //it MUST be a higher-order node

Deleted: MOAB/trunk/src/MBCN.cpp
===================================================================
--- MOAB/trunk/src/MBCN.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/MBCN.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,1049 +0,0 @@
-/**
- * MOAB, a Mesh-Oriented datABase, is a software component for creating,
- * storing and accessing finite element mesh data.
- * 
- * Copyright 2004 Sandia Corporation.  Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
- * retains certain rights in this software.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- */
-
-#include "moab/MBCN.hpp"
-#include "MBCNArrays.hpp"
-#include "MBCN.h"
-#include <assert.h>
-#include <string.h>
-
-namespace moab {
-
-const char *MBCN::entityTypeNames[] = {
-    "Vertex",
-    "Edge",
-    "Tri",
-    "Quad",
-    "Polygon",
-    "Tet",
-    "Pyramid",
-    "Prism",
-    "Knife",
-    "Hex",
-    "Polyhedron",
-    "EntitySet",
-    "MaxType"
-};
-
-short int MBCN::numberBasis = 0;
-
-const DimensionPair MBCN::TypeDimensionMap[] = 
-{
-    DimensionPair(MBVERTEX,   MBVERTEX), 
-    DimensionPair(MBEDGE,     MBEDGE), 
-    DimensionPair(MBTRI,     MBPOLYGON),
-    DimensionPair(MBTET,     MBPOLYHEDRON),
-    DimensionPair(MBENTITYSET, MBENTITYSET), 
-    DimensionPair(MBMAXTYPE, MBMAXTYPE)
-};
-
-short MBCN::increasingInts[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 
-                                10,11,12,13,14,15,16,17,18,19,
-                                20,21,22,23,24,25,26,27,28,29,
-                                30,31,32,33,34,35,36,37,38,39 };
-
-  //! set the basis of the numbering system; may or may not do things besides setting the
-//! member variable
-void MBCN::SetBasis(const int in_basis) 
-{
-  numberBasis = in_basis;
-}
-
-//! return a type for the given name
-EntityType MBCN::EntityTypeFromName(const char *name)
-{
-  for (EntityType i = MBVERTEX; i < MBMAXTYPE; i++) {
-    if (0 == strcmp(name, entityTypeNames[i]))
-      return i;
-  }
-  
-  return MBMAXTYPE;
-}
-
-void MBCN::SubEntityNodeIndices( const EntityType this_topo, 
-                                 const int num_nodes,
-                                 const int sub_dimension,
-                                 const int sub_index,
-                                 EntityType& subentity_topo,
-                                 int& num_sub_entity_nodes,
-                                 int sub_entity_conn[] )
-{
-    // If asked for a node, the special case...
-  if (sub_dimension == 0) {
-    assert( sub_index < num_nodes );
-    subentity_topo = MBVERTEX;
-    num_sub_entity_nodes = 1;
-    sub_entity_conn[0] = sub_index;
-    return;
-  }
-  
-  const int ho_bits = HasMidNodes( this_topo, num_nodes );
-  subentity_topo = SubEntityType(this_topo, sub_dimension, sub_index);
-  num_sub_entity_nodes = VerticesPerEntity(subentity_topo);
-  const short* corners = mConnectivityMap[this_topo][sub_dimension-1].conn[sub_index];
-  std::copy( corners, corners+num_sub_entity_nodes, sub_entity_conn );
-  
-  int sub_sub_corners[MB_MAX_SUB_ENTITY_VERTICES];
-  int side, sense, offset;
-  for (int dim = 1; dim <= sub_dimension; ++dim) {
-    if (!(ho_bits & (1<<dim)))
-      continue;
-    
-    const short num_mid = NumSubEntities( subentity_topo, dim );
-    for (int i = 0; i < num_mid; ++i) {
-      const EntityType sub_sub_topo = SubEntityType( subentity_topo, dim, i );
-      const int sub_sub_num_vert = VerticesPerEntity( sub_sub_topo );
-      SubEntityVertexIndices( subentity_topo, dim, i, sub_sub_corners );
-
-      for (int j = 0; j < sub_sub_num_vert; ++j)
-        sub_sub_corners[j] = corners[sub_sub_corners[j]];
-      SideNumber( this_topo, sub_sub_corners, sub_sub_num_vert, dim, side, sense, offset );
-      sub_entity_conn[num_sub_entity_nodes++] = HONodeIndex( this_topo, num_nodes, dim, side );
-    }
-  }
-}
-
-
-//! return the vertices of the specified sub entity
-//! \param parent_conn Connectivity of parent entity
-//! \param parent_type Entity type of parent entity
-//! \param sub_dimension Dimension of sub-entity being queried
-//! \param sub_index Index of sub-entity being queried
-//! \param sub_entity_conn Connectivity of sub-entity, based on parent_conn and canonical
-//!           ordering for parent_type
-//! \param num_sub_vertices Number of vertices in sub-entity
-void MBCN::SubEntityConn(const void *parent_conn, const EntityType parent_type,
-                         const int sub_dimension,
-                         const int sub_index,
-                         void *sub_entity_conn, int &num_sub_vertices) 
-{
-  static int sub_indices[MB_MAX_SUB_ENTITY_VERTICES];
-  
-  SubEntityVertexIndices(parent_type, sub_dimension, sub_index, sub_indices);
-  
-  num_sub_vertices = VerticesPerEntity(SubEntityType(parent_type, sub_dimension, sub_index));
-  void **parent_conn_ptr = static_cast<void **>(const_cast<void *>(parent_conn));
-  void **sub_conn_ptr = static_cast<void **>(sub_entity_conn);
-  for (int i = 0; i < num_sub_vertices; i++)
-    sub_conn_ptr[i] = parent_conn_ptr[sub_indices[i]];
-}
-
-//! given an entity and a target dimension & side number, get that entity
-short int MBCN::AdjacentSubEntities(const EntityType this_type,
-                              const int *source_indices,
-                              const int num_source_indices,
-                              const int source_dim,
-                              const int target_dim,
-                              std::vector<int> &index_list,
-                              const int operation_type)
-{
-    // first get all the vertex indices
-  std::vector<int> tmp_indices;
-  const int* it1 = source_indices;
-
-  assert(source_dim >= 0 && source_dim <= 3 &&
-         target_dim >= 0 && target_dim <= 3 &&
-           // make sure we're not stepping off the end of the array; 
-         ((source_dim > 0 && 
-           *it1 < mConnectivityMap[this_type][source_dim-1].num_sub_elements) ||
-          (source_dim == 0 && 
-           *it1 < mConnectivityMap[this_type][Dimension(this_type)-1].num_corners_per_sub_element[0])) && 
-         *it1 >= 0);
-
-
-#define MUC MBCN::mUpConnMap[this_type][source_dim][target_dim]
-
-    // if we're looking for the vertices of a single side, return them in
-    // the canonical ordering; otherwise, return them in sorted order
-  if (num_source_indices == 1 && 0 == target_dim && source_dim != target_dim) {
-
-      // element of mConnectivityMap should be for this type and for one
-      // less than source_dim, which should give the connectivity of that sub element
-    const ConnMap &cm = mConnectivityMap[this_type][source_dim-1];
-    std::copy(cm.conn[source_indices[0]],
-              cm.conn[source_indices[0]]+cm.num_corners_per_sub_element[source_indices[0]],
-              std::back_inserter(index_list));
-    return 0;
-  }
-              
-    // now go through source indices, folding adjacencies into target list
-  for (it1 = source_indices; it1 != source_indices+num_source_indices; it1++) {
-      // *it1 is the side index
-      // at start of iteration, index_list has the target list
-
-      // if a union, or first iteration and index list was empty, copy the list
-    if (operation_type == MBCN::UNION || 
-        (it1 == source_indices && index_list.empty())) {
-      std::copy(MUC.targets_per_source_element[*it1],
-                MUC.targets_per_source_element[*it1]+
-                MUC.num_targets_per_source_element[*it1],
-                std::back_inserter(index_list));
-    }
-    else {
-        // else we're intersecting, and have a non-empty list; intersect with this target list
-      tmp_indices.clear();
-      std::set_intersection(MUC.targets_per_source_element[*it1],
-                            MUC.targets_per_source_element[*it1]+
-                            MUC.num_targets_per_source_element[*it1],
-                            index_list.begin(), index_list.end(),
-                            std::back_inserter(tmp_indices));
-      index_list.swap(tmp_indices);
-
-        // if we're at this point and the list is empty, the intersection will be NULL;
-        // return if so
-      if (index_list.empty()) return 0;
-    }
-  }
-  
-  if (operation_type == MBCN::UNION && num_source_indices != 1) {
-      // need to sort then unique the list
-    std::sort(index_list.begin(), index_list.end());
-    index_list.erase(std::unique(index_list.begin(), index_list.end()), 
-                     index_list.end());
-  }
-  
-  return 0;
-}
-
-template <typename T> 
-short int side_number(const T *parent_conn, 
-                const EntityType parent_type,
-                const T *child_conn,
-                const int child_num_verts,
-                const int child_dim,
-                int &side_no,
-                int &sense,
-                int &offset)
-{
-  int parent_num_verts = MBCN::VerticesPerEntity(parent_type);
-  int side_indices[8]; 
-  assert(sizeof(side_indices)/sizeof(side_indices[0]) >= (size_t)child_num_verts);
-  
-  for (int i = 0; i < child_num_verts; i++) {
-    side_indices[i] = std::find(parent_conn, parent_conn+parent_num_verts, child_conn[i]) - parent_conn;
-    if (side_indices[i] == parent_num_verts) 
-      return -1;
-  }
-  
-  return MBCN::SideNumber(parent_type, &side_indices[0], child_num_verts,
-                    child_dim, side_no, sense, offset);
-}
-
-short int MBCN::SideNumber(const EntityType parent_type, const int *parent_conn, 
-                     const int *child_conn, const int child_num_verts,
-                     const int child_dim,
-                     int &side_no, int &sense, int &offset) 
-{
-  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
-                     child_dim, side_no, sense, offset);
-}
-
-short int MBCN::SideNumber(const EntityType parent_type, const unsigned int *parent_conn, 
-                     const unsigned int *child_conn, const int child_num_verts,
-                     const int child_dim,
-                     int &side_no, int &sense, int &offset)
-{
-  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
-                     child_dim, side_no, sense, offset);
-}
-short int MBCN::SideNumber(const EntityType parent_type, const long *parent_conn, 
-                     const long *child_conn, const int child_num_verts,
-                     const int child_dim,
-                     int &side_no, int &sense, int &offset)
-{
-  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
-                     child_dim, side_no, sense, offset);
-}
-short int MBCN::SideNumber(const EntityType parent_type, const unsigned long *parent_conn, 
-                     const unsigned long *child_conn, const int child_num_verts,
-                     const int child_dim,
-                     int &side_no, int &sense, int &offset)
-{
-  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
-                     child_dim, side_no, sense, offset);
-}
-short int MBCN::SideNumber(const EntityType parent_type, void * const *parent_conn, 
-                     void * const *child_conn, const int child_num_verts,
-                     const int child_dim,
-                     int &side_no, int &sense, int &offset)
-{
-  return side_number(parent_conn, parent_type, child_conn, child_num_verts,
-                     child_dim, side_no, sense, offset);
-}
-
-short int MBCN::SideNumber( const EntityType parent_type,
-                      const int *child_conn_indices,
-                      const int child_num_verts,
-                      const int child_dim,
-                      int &side_no,
-                      int &sense,
-                      int &offset )
-{
-  int parent_dim = Dimension(parent_type);
-  int parent_num_verts = VerticesPerEntity(parent_type);
-
-    // degenerate case (vertex), output == input
-  if (child_dim == 0) {
-    if (child_num_verts != 1)
-      return -1;
-    side_no = *child_conn_indices;
-    sense = offset = 0;
-  }
-    
-    // given a parent and child element, find the corresponding side number
-
-    // dim_diff should be -1, 0 or 1 (same dimension, one less dimension, two less, resp.)
-  if (child_dim > parent_dim || child_dim < 0)
-    return -1;
-
-    // different types of same dimension won't be the same
-  if (parent_dim == child_dim &&
-      parent_num_verts != child_num_verts) {
-    side_no = -1;
-    sense = 0;
-    return 0;
-  }
-
-    // loop over the sub-elements, comparing to child connectivity
-  int sub_conn_indices[10];
-  for (int i = 0; i < NumSubEntities(parent_type, child_dim); i++) {
-    int sub_size = VerticesPerEntity(SubEntityType(parent_type, child_dim, i));
-    if (sub_size != child_num_verts) 
-      continue;
-
-    SubEntityVertexIndices(parent_type, child_dim, i, sub_conn_indices);
-    bool they_match = ConnectivityMatch(child_conn_indices, 
-                                        sub_conn_indices, sub_size, 
-                                        sense, offset);
-    if (they_match) {
-      side_no = i;
-      return 0;
-    }
-  }
-
-    // if we've gotten here, we don't match
-  side_no = -1;
-
-    // return value is still success, we didn't have any fatal errors or anything
-  return 0;
-}
-
-  //! return the dimension and index of the opposite side, given parent entity type and child 
-  //! dimension and index.  This function is only defined for certain types of parent/child types:
-  //! (Parent, Child dim->Opposite dim): 
-  //!  (Tri, 1->0), (Tri, 0->1), (Quad, 1->1), (Quad, 0->0), 
-  //!  (Tet, 2->0), (Tet, 1->1), (Tet, 0->2),
-  //!  (Hex, 2->2), (Hex, 1->1)(diagonally across element), (Hex, 0->0) (diagonally across element)
-  //! All other parent types and child dimensions return an error.
-  //!
-  //! \param parent_type The type of parent element
-  //! \param child_type The type of child element
-  //! \param child_index The index of the child element
-  //! \param opposite_index The index of the opposite element
-  //! \return status Returns 0 if successful, -1 if not
-short int MBCN::OppositeSide(const EntityType parent_type,
-                       const int child_index,
-                       const int child_dim,
-                       int &opposite_index,
-                       int &opposite_dim) 
-{
-  switch (parent_type) {
-    case MBEDGE:
-        if (0 != child_dim) return -1;
-        else opposite_index = 1-child_index;
-        opposite_dim = 0;
-        break;
-      
-    case MBTRI:
-        switch (child_dim) {
-          case 0:
-              opposite_dim = 1;
-              opposite_index = (child_index+1)%3;
-              break;
-          case 1:
-              opposite_dim = 0;
-              opposite_index = (child_index+2)%3;
-              break;
-          default:
-              return -1;
-        }
-        break;
-
-    case MBQUAD:
-        switch (child_dim) {
-          case 0:
-          case 1:
-              opposite_dim = child_dim;
-              opposite_index = (child_index+2)%4;
-              break;
-          default:
-              return -1;
-        }
-        break;
-      
-    case MBTET:
-        switch (child_dim) {
-          case 0:
-              opposite_dim = 2;
-              opposite_index = (child_index+1)%3 + 2*(child_index/3);
-              break;
-          case 1:
-              opposite_dim = 1;
-              opposite_index = child_index < 3 
-                             ? 3 + (child_index + 2)%3
-                             : (child_index + 1)%3;
-              break;
-          case 2:
-              opposite_dim = 0;
-              opposite_index = (child_index+2)%3 + child_index/3;
-              break;
-          default:
-              return -1;
-        }
-        break;
-    case MBHEX:
-      opposite_dim = child_dim;
-      switch (child_dim) {
-        case 0:
-          opposite_index = child_index < 4 
-                         ? 4 + (child_index + 2) % 4
-                         : (child_index - 2) % 4;
-          break;
-        case 1:
-          opposite_index = 4*(2-child_index/4) + (child_index+2)%4;
-          break;
-        case 2:
-          opposite_index = child_index < 4 
-                         ? (child_index + 2) % 4
-                         : 9 - child_index;
-          break;
-        default:
-          return -1;
-      }
-      break;
-        
-      
-    default:
-        return -1;
-  }
-  
-  return 0;
-}
-
-template <typename T> 
-inline bool connectivity_match( const T* conn1_i,
-                                       const T* conn2_i,
-                                       const int num_vertices,
-                                       int& direct, int& offset )
-{
-
-  bool they_match;
-  
-    // special test for 2 handles, since we don't want to wrap the list in this
-    // case
-  if (num_vertices == 2) {
-    they_match = false;
-    if (conn1_i[0] == conn2_i[0] && conn1_i[1] == conn2_i[1]) {
-      direct = 1;
-      they_match = true;
-      offset = 0;
-    }
-    else if (conn1_i[0] == conn2_i[1] && conn1_i[1] == conn2_i[0]) {
-      they_match = true;
-      direct = -1;
-      offset = 1;
-    }
-  }
-
-  else {
-    const T *iter;
-    iter = std::find(&conn2_i[0], &conn2_i[num_vertices], conn1_i[0]);
-    if(iter == &conn2_i[num_vertices])
-      return false;
-
-    they_match = true;
-
-    offset = iter - conn2_i;
-    int i;
-
-      // first compare forward
-    for(i = 1; i<num_vertices; ++i)
-    {
-      if(conn1_i[i] != conn2_i[(offset+i)%num_vertices])
-      {
-        they_match = false;
-        break;
-      }
-    }
-  
-    if(they_match == true)
-    {
-      direct = 1;
-      return they_match;
-    }
-  
-    they_match = true;
-  
-      // then compare reverse
-    for(i = 1; i<num_vertices; i++)
-    {
-      if(conn1_i[i] != conn2_i[(offset+num_vertices-i)%num_vertices])
-      {
-        they_match = false;
-        break;
-      }
-    }
-    if (they_match)
-    {
-      direct = -1;
-    }
-  }
-
-  return they_match;
-}
-
-
-bool MBCN::ConnectivityMatch( const int *conn1_i,
-                              const int *conn2_i,
-                              const int num_vertices,
-                              int &direct, int &offset )
-{
-  return connectivity_match<int>(conn1_i, conn2_i, num_vertices, direct, offset );
-}
-
-bool MBCN::ConnectivityMatch( const unsigned int *conn1_i,
-                              const unsigned int *conn2_i,
-                              const int num_vertices,
-                              int &direct, int &offset )
-{
-  return connectivity_match<unsigned int>(conn1_i, conn2_i, num_vertices, direct, offset );
-}
-
-bool MBCN::ConnectivityMatch( const long *conn1_i,
-                              const long *conn2_i,
-                              const int num_vertices,
-                              int &direct, int &offset )
-{
-  return connectivity_match<long>(conn1_i, conn2_i, num_vertices, direct, offset );
-}
-
-bool MBCN::ConnectivityMatch( const unsigned long *conn1_i,
-                              const unsigned long *conn2_i,
-                              const int num_vertices,
-                              int &direct, int &offset )
-{
-  return connectivity_match<unsigned long>(conn1_i, conn2_i, num_vertices, direct, offset );
-}
-
-bool MBCN::ConnectivityMatch( void* const *conn1_i,
-                              void* const *conn2_i,
-                              const int num_vertices,
-                              int &direct, int &offset )
-{
-  return connectivity_match<void*>(conn1_i, conn2_i, num_vertices, direct, offset );
-}
-
-
-
-  //! for an entity of this type and a specified subfacet (dimension and index), return
-  //! the index of the higher order node for that entity in this entity's connectivity array
-short int MBCN::HONodeIndex(const EntityType this_type, const int num_verts,
-                      const int subfacet_dim, const int subfacet_index) 
-{
-  int i;
-  int has_mids[4];
-  HasMidNodes(this_type, num_verts, has_mids);
-
-    // if we have no mid nodes on the subfacet_dim, we have no index
-  if (subfacet_index != -1 && !has_mids[subfacet_dim]) return -1;
-
-    // put start index at last index (one less than the number of vertices 
-    // plus the index basis)
-  int index = VerticesPerEntity(this_type) - 1 + numberBasis;
-
-    // for each subfacet dimension less than the target subfacet dim which has mid nodes, 
-    // add the number of subfacets of that dimension to the index
-  for (i = 1; i < subfacet_dim; i++)
-    if (has_mids[i]) index += NumSubEntities(this_type, i);
-    
-
-    // now add the index of this subfacet, or one if we're asking about the entity as a whole
-  if (subfacet_index == -1 && has_mids[subfacet_dim])
-      // want the index of the last ho node on this subfacet
-    index += NumSubEntities(this_type, subfacet_dim);
-  
-  else if (subfacet_index != -1 && has_mids[subfacet_dim])
-    index += subfacet_index + 1 - numberBasis;
-
-    // that's it
-  return index;
-}
-
-  //! given data about an element and a vertex in that element, return the dimension
-  //! and index of the sub-entity that the vertex resolves.  If it does not resolve a
-  //! sub-entity, either because it's a corner node or it's not in the element, -1 is
-  //! returned in both return values
-void MBCN::HONodeParent( EntityType elem_type,
-                         int num_verts, 
-                         int ho_index,
-                         int& parent_dim,
-                         int& parent_index )
-{
-    // begin with error values
-  parent_dim = parent_index = -1;
-     
-    // given the number of verts and the element type, get the hasmidnodes solution
-  int has_mids[4];
-  HasMidNodes(elem_type, num_verts, has_mids);
-
-  int index = VerticesPerEntity(elem_type)-1;
-  const int dim = Dimension(elem_type);
-
-    // keep a running sum of the ho node indices for this type of element, and stop
-    // when you get to the dimension which has the ho node
-  for (int i = 1; i < dim; i++) {
-    if (has_mids[i]) {
-      if (ho_index <= index + NumSubEntities(elem_type, i)) {
-          // the ho_index resolves an entity of dimension i, so set the return values
-          // and break out of the loop
-        parent_dim = i;
-        parent_index = ho_index - index - 1;
-        return;
-      }
-      else {
-        index += NumSubEntities(elem_type, i);
-      } 
-    }
-  }
-  
-    // mid region node case  
-  if( has_mids[dim] && ho_index == index+1 ) {
-    parent_dim = dim;
-    parent_index = 0; 
-  }
-}
-
-} // namespace moab
-
-
-using moab::MBCN;
-using moab::EntityType;
-
-  //! get the basis of the numbering system
-void MBCN_GetBasis(int *rval) {*rval = MBCN::GetBasis();}
-  
-  //! set the basis of the numbering system
-void MBCN_SetBasis(const int in_basis) {MBCN::SetBasis(in_basis);}
-
-  //! return the string type name for this type
-void MBCN_EntityTypeName(const int this_type, char *rval, int rval_len) 
-{
-  const char *rval_tmp = MBCN::EntityTypeName((EntityType)this_type);
-  int rval_len_tmp = strlen(rval_tmp);
-  rval_len_tmp = (rval_len_tmp < rval_len ? rval_len_tmp : rval_len);
-  strncpy(rval, rval_tmp, rval_len_tmp);
-}
-  
-  //! given a name, find the corresponding entity type
-void MBCN_EntityTypeFromName(const char *name, int *rval) 
-{
-  *rval = MBCN::EntityTypeFromName(name);
-}
-  
-  //! return the topological entity dimension
-void MBCN_Dimension(const int t, int *rval) 
-{
-  *rval = MBCN::Dimension((EntityType)t);
-}
-
-  //! return the number of (corner) vertices contained in the specified type.  
-void MBCN_VerticesPerEntity(const int t, int *rval) 
-{
-  *rval = MBCN::VerticesPerEntity((EntityType)t);
-}
-  
-  //! return the number of sub-entities bounding the entity.
-void MBCN_NumSubEntities(const int t, const int d, int *rval) 
-{
-  *rval = MBCN::NumSubEntities((EntityType)t, d);
-}
-
-  //! return the type of a particular sub-entity.
-  //! \param this_type Type of entity for which sub-entity type is being queried
-  //! \param sub_dimension Topological dimension of sub-entity whose type is being queried
-  //! \param index Index of sub-entity whose type is being queried
-  //! \return type Entity type of sub-entity with specified dimension and index
-void MBCN_SubEntityType(const int this_type,
-                        const int sub_dimension,
-                        const int index, int *rval) 
-
-{
-  
-  *rval = MBCN::SubEntityType((EntityType)this_type, sub_dimension, index);
-
-}
-
-  
-  //! return the vertex indices of the specified sub-entity.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param sub_dimension Dimension of sub-entity
-  //! \param sub_index Index of sub-entity
-  //! \param sub_entity_conn Connectivity of sub-entity (returned to calling function)
-void MBCN_SubEntityVertexIndices(const int this_type, 
-                                 const int sub_dimension,
-                                 const int sub_index,
-                                 int sub_entity_conn[]) 
-{
-  MBCN::SubEntityVertexIndices((EntityType)this_type, sub_dimension, 
-                               sub_index, sub_entity_conn);
-}
-
-  //! return the vertices of the specified sub entity
-  //! \param parent_conn Connectivity of parent entity
-  //! \param parent_type Entity type of parent entity
-  //! \param sub_dimension Dimension of sub-entity being queried
-  //! \param sub_index Index of sub-entity being queried
-  //! \param sub_entity_conn Connectivity of sub-entity, based on parent_conn and canonical
-  //!           ordering for parent_type
-  //! \param num_sub_vertices Number of vertices in sub-entity
-//  void MBCN_SubEntityConn(const void *parent_conn, const int parent_type,
-//                            const int sub_dimension,
-//                            const int sub_index,
-//                            void *sub_entity_conn, int &num_sub_vertices) {return MBCN::SubEntityConn();}
-
-  //! For a specified set of sides of given dimension, return the intersection 
-  //! or union of all sides of specified target dimension adjacent to those sides.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param source_indices Indices of sides being queried
-  //! \param num_source_indices Number of entries in <em>source_indices</em>
-  //! \param source_dim Dimension of source entity
-  //! \param target_dim Dimension of target entity
-  //! \param index_list Indices of target entities (returned)
-  //! \param operation_type Specify either MBCN::INTERSECT (0) or MBCN::UNION (1) to get intersection
-  //!        or union of target entity lists over source entities
-void MBCN_AdjacentSubEntities(const int this_type,
-                              const int *source_indices,
-                              const int num_source_indices,
-                              const int source_dim,
-                              const int target_dim,
-                              int *index_list,
-                              int *num_indices,
-                              const int operation_type, int *rval) 
-{
-  std::vector<int> tmp_index_list;
-  *rval = MBCN::AdjacentSubEntities((EntityType)this_type, source_indices, 
-                                    num_source_indices, source_dim, target_dim, 
-                                    tmp_index_list, operation_type);
-  std::copy(tmp_index_list.begin(), tmp_index_list.end(), index_list);
-  *num_indices = tmp_index_list.size();
-}
-
-  //! return the side index represented in the input sub-entity connectivity
-  //! \param parent_type Entity type of parent entity
-  //! \param child_conn_indices Child connectivity to query, specified as indices
-  //!                           into the connectivity list of the parent.
-  //! \param child_num_verts Number of values in <em>child_conn_indices</em>
-  //! \param child_dim Dimension of child entity being queried
-  //! \param side_no Side number of child entity (returned)
-  //! \param sense Sense of child entity with respect to order in <em>child_conn</em> (returned)
-  //! \param offset Offset of <em>child_conn</em> with respect to canonical ordering data (returned)
-  //! \return status Returns zero if successful, -1 if not
-void MBCN_SideNumber(const int parent_type,
-                     const int *child_conn_indices, const int child_num_verts,
-                     const int child_dim,
-                     int *side_no, int *sense, int *offset) 
-{
-  MBCN::SideNumber((EntityType)parent_type, child_conn_indices, child_num_verts, child_dim,
-                   *side_no, *sense, *offset);
-}
-
-void MBCN_SideNumberInt(const int *parent_conn, const EntityType parent_type,
-                        const int *child_conn, const int child_num_verts,
-                        const int child_dim,
-                        int *side_no, int *sense, int *offset) 
-{
-  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
-              child_dim, *side_no, *sense, *offset);
-}
-
-void MBCN_SideNumberUint(const unsigned int *parent_conn, const EntityType parent_type,
-                         const unsigned int *child_conn, const int child_num_verts,
-                         const int child_dim,
-                         int *side_no, int *sense, int *offset)
-{
-  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
-              child_dim, *side_no, *sense, *offset);
-}
-
-void MBCN_SideNumberLong(const long *parent_conn, const EntityType parent_type,
-                         const long *child_conn, const int child_num_verts,
-                         const int child_dim,
-                         int *side_no, int *sense, int *offset)
-{
-  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
-              child_dim, *side_no, *sense, *offset);
-}
-
-void MBCN_SideNumberUlong(const unsigned long *parent_conn, const EntityType parent_type,
-                          const unsigned long *child_conn, const int child_num_verts,
-                          const int child_dim,
-                          int *side_no, int *sense, int *offset)
-{
-  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
-              child_dim, *side_no, *sense, *offset);
-}
-
-void MBCN_SideNumberVoid(void * const *parent_conn, const EntityType parent_type,
-                         void * const *child_conn, const int child_num_verts,
-                         const int child_dim,
-                         int *side_no, int *sense, int *offset)
-{
-  moab::side_number(parent_conn, parent_type, child_conn, child_num_verts, 
-              child_dim, *side_no, *sense, *offset);
-}
-
-  //! return the dimension and index of the opposite side, given parent entity type and child 
-  //! dimension and index.  This function is only defined for certain types of parent/child types:
-  //! (Parent, Child dim->Opposite dim): 
-  //!  (Tri, 1->0), (Tri, 0->1), (Quad, 1->1), (Quad, 0->0), 
-  //!  (Tet, 2->0), (Tet, 1->1), (Tet, 0->2),
-  //!  (Hex, 2->2), (Hex, 1->1)(diagonally across element), (Hex, 0->0) (diagonally across element)
-  //! All other parent types and child dimensions return an error.
-  //!
-  //! \param parent_type The type of parent element
-  //! \param child_type The type of child element
-  //! \param child_index The index of the child element
-  //! \param opposite_index The index of the opposite element
-  //! \return status Returns 0 if successful, -1 if not
-void MBCN_OppositeSide(const int parent_type,
-                       const int child_index,
-                       const int child_dim,
-                       int *opposite_index,
-                       int *opposite_dim, int *rval) 
-{
-  *rval = MBCN::OppositeSide((EntityType)parent_type, child_index, child_dim, 
-                             *opposite_index, *opposite_dim);
-}
-
-  //! given two connectivity arrays, determine whether or not they represent the same entity.
-  //! \param conn1 Connectivity array of first entity
-  //! \param conn2 Connectivity array of second entity
-  //! \param num_vertices Number of entries in <em>conn1</em> and <em>conn2</em>
-  //! \param direct If positive, entities have the same sense (returned)
-  //! \param offset Offset of <em>conn2</em>'s first vertex in <em>conn1</em>
-  //! \return int Returns true if <em>conn1</em> and <em>conn2</em> match
-void MBCN_ConnectivityMatchInt(const int *conn1,
-                               const int *conn2,
-                               const int num_vertices,
-                               int *direct, int *offset, int *rval) 
-{
-  *rval = MBCN::ConnectivityMatch(conn1, conn2, num_vertices, 
-                                  *direct, *offset);
-}
-
-void MBCN_ConnectivityMatchUint(const unsigned int *conn1,
-                                const unsigned int *conn2,
-                                const int num_vertices,
-                                int *direct, int *offset, int *rval) 
-{
-  *rval = MBCN::ConnectivityMatch(conn1, conn2, num_vertices, 
-                                  *direct, *offset);
-}
-
-void MBCN_ConnectivityMatchLong(const long* conn1,
-                                const long* conn2,
-                                const int num_vertices,
-                                int* direct, int* offset , int *rval) 
-{
-  *rval = MBCN::ConnectivityMatch(conn1, conn2, num_vertices, 
-                                  *direct, *offset);
-}
-
-void MBCN_ConnectivityMatchUlong(const unsigned long* conn1,
-                                 const unsigned long* conn2,
-                                 const int num_vertices,
-                                 int *direct, int* offset , int *rval) 
-{
-  *rval = MBCN::ConnectivityMatch(conn1, conn2, num_vertices, 
-                                  *direct, *offset);
-}
-
-void MBCN_ConnectivityMatchVoid(void* const* conn1,
-                                void* const* conn2,
-                                const int num_vertices,
-                                int* direct, int* offset , int *rval) 
-{
-  *rval = MBCN::ConnectivityMatch(conn1, conn2, num_vertices, 
-                                  *direct, *offset);
-}
-
-  //! true if entities of a given type and number of nodes indicates mid edge nodes are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \return int Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
-  //!  mid-edge nodes are likely
-void MBCN_HasMidEdgeNodes(const int this_type, 
-                          const int num_verts, int *rval) 
-{
-  *rval = MBCN::HasMidEdgeNodes((EntityType)this_type, num_verts);
-}
-
-  //! true if entities of a given type and number of nodes indicates mid face nodes are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \return int Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
-  //!  mid-face nodes are likely
-void MBCN_HasMidFaceNodes(const int this_type, 
-                          const int num_verts, int *rval) 
-{
-  *rval = MBCN::HasMidFaceNodes((EntityType)this_type, num_verts);
-}
-
-  //! true if entities of a given type and number of nodes indicates mid region nodes are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \return int Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
-  //!  mid-region nodes are likely
-void MBCN_HasMidRegionNodes(const int this_type, 
-                            const int num_verts, int *rval) 
-{
-  *rval = MBCN::HasMidRegionNodes((EntityType)this_type, num_verts);
-}
-
-  //! true if entities of a given type and number of nodes indicates mid edge/face/region nodes 
-  //! are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \param mid_nodes If <em>mid_nodes[i], i=1..3</em> is true, indicates that mid-edge 
-  //!    (i=1), mid-face (i=2), and/or mid-region (i=3) nodes are likely
-void MBCN_HasMidNodes(const int this_type, 
-                      const int num_verts, 
-                      int mid_nodes[4]) 
-{
-  return MBCN::HasMidNodes((EntityType)this_type, num_verts, mid_nodes);
-}
-
-  //! given data about an element and a vertex in that element, return the dimension
-  //! and index of the sub-entity that the vertex resolves.  If it does not resolve a
-  //! sub-entity, either because it's a corner node or it's not in the element, -1 is
-  //! returned in both return values.
-  //! \param elem_type Type of entity being queried
-  //! \param num_nodes The number of nodes in the element connectivity
-  //! \param ho_node_index The position of the HO node in the connectivity list (zero based)
-  //! \param parent_dim Dimension of sub-entity high-order node resolves (returned)
-  //! \param parent_index Index of sub-entity high-order node resolves (returned)
-void MBCN_HONodeParent( int elem_type,
-                        int num_nodes, 
-                        int ho_node_index,
-                        int *parent_dim, 
-                        int *parent_index ) 
-{
-  return MBCN::HONodeParent((EntityType)elem_type, num_nodes, ho_node_index, 
-                            *parent_dim, *parent_index);
-}
-
-  //! for an entity of this type with num_verts vertices, and a specified subfacet 
-  //! (dimension and index), return the index of the higher order node for that entity 
-  //! in this entity's connectivity array
-  //! \param this_type Type of entity being queried
-  //! \param num_verts Number of vertices for the entity being queried
-  //! \param subfacet_dim Dimension of sub-entity being queried
-  //! \param subfacet_index Index of sub-entity being queried
-  //! \return index Index of sub-entity's higher-order node
-void MBCN_HONodeIndex(const int this_type, const int num_verts,
-                      const int subfacet_dim, const int subfacet_index, int *rval) 
-
-{
-  
-  *rval = MBCN::HONodeIndex((EntityType)this_type, num_verts, subfacet_dim, subfacet_index);
-
-}
-
-namespace moab {
-
-template <typename T> 
-inline int permute_this(EntityType t,
-                        const int dim,
-                        T* conn,
-                        const int indices_per_ent,
-                        const int num_entries) 
-{
-  T tmp_conn[MB_MAX_SUB_ENTITIES];
-  assert(indices_per_ent <= MBCN::permuteVec[t][dim][MB_MAX_SUB_ENTITIES]);
-  if (indices_per_ent > MBCN::permuteVec[t][dim][MB_MAX_SUB_ENTITIES]) return 1;
-  short int *tvec = MBCN::permuteVec[t][dim];
-  T *pvec = conn;
-  for (int j = 0; j < num_entries; j++) {
-    for (int i = 0; i < indices_per_ent; i++)
-      tmp_conn[tvec[i]] = pvec[i];
-    memcpy(pvec, tmp_conn, indices_per_ent*sizeof(T));
-    pvec += indices_per_ent;
-  }
-
-  return 0;
-}
-
-template <typename T> 
-inline int rev_permute_this(EntityType t,
-                            const int dim,
-                            T* conn,
-                            const int indices_per_ent,
-                            const int num_entries) 
-{
-  T tmp_conn[MB_MAX_SUB_ENTITIES];
-  assert(indices_per_ent <= MBCN::revPermuteVec[t][dim][MB_MAX_SUB_ENTITIES]);
-  if (indices_per_ent > MBCN::revPermuteVec[t][dim][MB_MAX_SUB_ENTITIES]) return 1;
-  short int *tvec = MBCN::revPermuteVec[t][dim];
-  T *pvec = conn;
-  for (int j = 0; j < num_entries; j++) {
-    for (int i = 0; i < indices_per_ent; i++)
-      tmp_conn[i] = pvec[tvec[i]];
-    memcpy(pvec, tmp_conn, indices_per_ent*sizeof(T));
-    pvec += indices_per_ent;
-  }
-
-  return 0;
-}
-
-//! Permute this vector
-inline int MBCN::permuteThis(const EntityType t, const int dim, int *pvec, 
-                             const int num_indices, const int num_entries) 
-{return permute_this(t, dim, pvec, num_indices, num_entries);}
-inline int MBCN::permuteThis(const EntityType t, const int dim, unsigned int *pvec, 
-                             const int num_indices, const int num_entries) 
-{return permute_this(t, dim, pvec, num_indices, num_entries);}
-inline int MBCN::permuteThis(const EntityType t, const int dim, long *pvec, 
-                             const int num_indices, const int num_entries) 
-{return permute_this(t, dim, pvec, num_indices, num_entries);}
-inline int MBCN::permuteThis(const EntityType t, const int dim, void **pvec, 
-                             const int num_indices, const int num_entries) 
-{return permute_this(t, dim, pvec, num_indices, num_entries);}
-
-//! Reverse permute this vector
-inline int MBCN::revPermuteThis(const EntityType t, const int dim, int *pvec, 
-                             const int num_indices, const int num_entries) 
-{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
-inline int MBCN::revPermuteThis(const EntityType t, const int dim, unsigned int *pvec, 
-                             const int num_indices, const int num_entries) 
-{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
-inline int MBCN::revPermuteThis(const EntityType t, const int dim, long *pvec, 
-                             const int num_indices, const int num_entries) 
-{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
-inline int MBCN::revPermuteThis(const EntityType t, const int dim, void **pvec, 
-                             const int num_indices, const int num_entries) 
-{return rev_permute_this(t, dim, pvec, num_indices, num_entries);}
-
-  
-} // namespace moab

Modified: MOAB/trunk/src/MBCNArrays.hpp
===================================================================
--- MOAB/trunk/src/MBCNArrays.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/MBCNArrays.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -19,7 +19,7 @@
 
 namespace moab {
 
-const MBCN::ConnMap MBCN::mConnectivityMap[MBMAXTYPE][3] =
+const CN::ConnMap CN::mConnectivityMap[MBMAXTYPE][3] =
 {
     // vertex-edge
   {{ 0, 0 , {0}, 
@@ -159,7 +159,7 @@
     // maxtype
 };
 
-const MBCN::UpConnMap MBCN::mUpConnMap[MBMAXTYPE][4][4] =
+const CN::UpConnMap CN::mUpConnMap[MBMAXTYPE][4][4] =
 {
   { // type MBVERTEX
     {{{1}, {{0}} }, {{0}, {{0}} }, {{0}, {{0}} }, {{0}, {{0}} }}, // source dim 0
@@ -692,10 +692,10 @@
     {{{0}, {{0}} }, {{0}, {{0}} }, {{0}, {{0}} }} // source dim 3
   } // end type MBENTITYSET
 };
-const unsigned char E = MBCN::MID_EDGE_BIT;
-const unsigned char F = MBCN::MID_FACE_BIT;
-const unsigned char R = MBCN::MID_REGION_BIT;
-const unsigned char MBCN::midNodesPerType[MBMAXTYPE][MAX_NODES_PER_ELEMENT+1] = {
+const unsigned char E = CN::MID_EDGE_BIT;
+const unsigned char F = CN::MID_FACE_BIT;
+const unsigned char R = CN::MID_REGION_BIT;
+const unsigned char CN::midNodesPerType[MBMAXTYPE][MAX_NODES_PER_ELEMENT+1] = {
 // vertex
   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
 // edge

Modified: MOAB/trunk/src/Makefile.am
===================================================================
--- MOAB/trunk/src/Makefile.am	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/Makefile.am	2010-03-17 20:58:51 UTC (rev 3647)
@@ -50,7 +50,7 @@
   AxisBox.cpp \
   AxisBox.hpp \
   BSPTree.cpp \
-  MBCN.cpp \
+  CN.cpp \
   MBCNArrays.hpp \
   CartVect.cpp \
   Matrix3.cpp \
@@ -122,7 +122,7 @@
   moab/HomXform.hpp \
   moab/AdaptiveKDTree.hpp \
   moab/BSPTree.hpp \
-  moab/MBCN.hpp \
+  moab/CN.hpp \
   moab/CartVect.hpp \
   moab/Core.hpp \
   moab/EntityType.hpp \

Modified: MOAB/trunk/src/MeshSet.hpp
===================================================================
--- MOAB/trunk/src/MeshSet.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/MeshSet.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -8,7 +8,7 @@
 #include "moab/Interface.hpp"
 #include "Internals.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 #include <assert.h>
 #include <vector>
@@ -230,15 +230,15 @@
 public:
     /** get dimension of enity */
   static inline int DIM_FROM_HANDLE( EntityHandle h )
-    { return MBCN::Dimension( TYPE_FROM_HANDLE( h ) ); }
+    { return CN::Dimension( TYPE_FROM_HANDLE( h ) ); }
   
     /** Get smallest possible handle with specified dimension (first handle for first type of dimension) */
   static inline EntityHandle FIRST_OF_DIM( int dim )
-    { return FIRST_HANDLE( MBCN::TypeDimensionMap[dim].first ); }
+    { return FIRST_HANDLE( CN::TypeDimensionMap[dim].first ); }
   
     /** Get largest possible handle with specified dimension (largest handle for last type of dimension) */
   static inline EntityHandle LAST_OF_DIM( int dim )
-    { return LAST_HANDLE( MBCN::TypeDimensionMap[dim].second ); }
+    { return LAST_HANDLE( CN::TypeDimensionMap[dim].second ); }
 
     /** functor: test if handle is not of type */
   struct not_type_test {

Modified: MOAB/trunk/src/MeshTopoUtil.cpp
===================================================================
--- MOAB/trunk/src/MeshTopoUtil.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/MeshTopoUtil.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -21,7 +21,7 @@
 #include "moab/Range.hpp"
 #include "Internals.hpp"
 #include "moab/Interface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 #include <assert.h>
 
@@ -460,7 +460,7 @@
   
   if (from_type >= MBENTITYSET) return MB_FAILURE;
 
-  int from_dim = MBCN::Dimension(from_type);
+  int from_dim = CN::Dimension(from_type);
   
   Range to_ents;
 
@@ -470,14 +470,14 @@
       // looping over each sub-entity of dimension bridge_dim...
     EntityHandle bridge_verts[MB_MAX_SUB_ENTITIES];
     int bridge_indices[MB_MAX_SUB_ENTITIES];
-    for (int i = 0; i < MBCN::NumSubEntities(from_type, bridge_dim); i++) {
+    for (int i = 0; i < CN::NumSubEntities(from_type, bridge_dim); i++) {
 
         // get the vertices making up this sub-entity
-      int num_bridge_verts = MBCN::VerticesPerEntity( MBCN::SubEntityType( from_type, bridge_dim, i ) );
-      MBCN::SubEntityVertexIndices( from_type, bridge_dim, i, bridge_indices );
+      int num_bridge_verts = CN::VerticesPerEntity( CN::SubEntityType( from_type, bridge_dim, i ) );
+      CN::SubEntityVertexIndices( from_type, bridge_dim, i, bridge_indices );
       for (int j = 0; j < num_bridge_verts; ++j)
         bridge_verts[j]= connect[bridge_indices[j]];
-      //MBCN::SubEntityConn(connect, from_type, bridge_dim, i, &bridge_verts[0], num_bridge_verts);
+      //CN::SubEntityConn(connect, from_type, bridge_dim, i, &bridge_verts[0], num_bridge_verts);
     
         // get the to_dim entities adjacent
       to_ents.clear();
@@ -524,7 +524,7 @@
 
   //! return the opposite side entity given a parent and bounding entity.
   //! This function is only defined for certain types of parent/child types;
-  //! See MBCN.hpp::OppositeSide for details.
+  //! See CN.hpp::OppositeSide for details.
   //!
   //! \param parent The parent element
   //! \param child The child element
@@ -539,9 +539,9 @@
                                            offset, sense);
   if (MB_SUCCESS != result) return result;
   
-    // get the child index from MBCN
+    // get the child index from CN
   int opposite_index, opposite_dim;
-  int status = MBCN::OppositeSide(mbImpl->type_from_handle(parent),
+  int status = CN::OppositeSide(mbImpl->type_from_handle(parent),
                                   side_no, mbImpl->dimension_from_handle(child),
                                   opposite_index, opposite_dim);
   if (0 != status) return MB_FAILURE;
@@ -610,7 +610,7 @@
     bool valid_up_adjs = true;
     for (int dim = 1; dim <= 3; dim++) {
       tmp_result = mbImpl->get_adjacencies(entities+i, 1, dim, false, up_adjs[dim]); TC;
-      if (dim > MBCN::Dimension(TYPE_FROM_HANDLE(entities[i])) && up_adjs[dim].size() > 2) {
+      if (dim > CN::Dimension(TYPE_FROM_HANDLE(entities[i])) && up_adjs[dim].size() > 2) {
         valid_up_adjs = false;
         break;
       }
@@ -627,9 +627,9 @@
       // adjs to distinguish them; don't need to check if there's already one there,
       // 'cuz add_adjacency does that for us
     for (int dim = 1; dim <= 3; dim++) {
-      if (up_adjs[dim].empty() || dim == MBCN::Dimension(TYPE_FROM_HANDLE(entities[i]))) continue;
+      if (up_adjs[dim].empty() || dim == CN::Dimension(TYPE_FROM_HANDLE(entities[i]))) continue;
 
-      if (dim < MBCN::Dimension(TYPE_FROM_HANDLE(entities[i]))) {
+      if (dim < CN::Dimension(TYPE_FROM_HANDLE(entities[i]))) {
           // adjacencies from other entities to this one; if any of those are equivalent entities,
           // need to make explicit adjacency to new entity too
         for (Range::iterator rit = up_adjs[dim].begin(); rit != up_adjs[dim].end(); rit++) {
@@ -668,7 +668,7 @@
     EntityHandle tmp_ents[2];
     if (NULL != fill_entities) {
         // how to do this depends on dimension
-      switch (MBCN::Dimension(TYPE_FROM_HANDLE(entities[i]))) {
+      switch (CN::Dimension(TYPE_FROM_HANDLE(entities[i]))) {
         case 0:
           tmp_ents[0] = entities[i];
           tmp_ents[1] = new_entity;
@@ -787,7 +787,7 @@
     // see algorithm description in notes from 2/25/05
   const EntityHandle split_types = {MBEDGE, MBPOLYGON, MBPOLYHEDRON};
   ErrorCode result = MB_SUCCESS;
-  const int dim = MBCN::Dimension(TYPE_FROM_HANDLE(d));
+  const int dim = CN::Dimension(TYPE_FROM_HANDLE(d));
   MeshTopoUtil mtu(this);
 
     // get all (d+2)-, (d+1)-cells connected to d

Modified: MOAB/trunk/src/OrientedBox.cpp
===================================================================
--- MOAB/trunk/src/OrientedBox.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/OrientedBox.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -32,7 +32,7 @@
  */
 
 #include "moab/Interface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "OrientedBox.hpp"
 #include "moab/Range.hpp"
 #include "Matrix3.hpp"
@@ -313,8 +313,8 @@
                                                  const Range& elements )
 {
   ErrorCode rval;
-  const Range::iterator begin = elements.lower_bound( MBCN::TypeDimensionMap[2].first );
-  const Range::iterator end = elements.lower_bound( MBCN::TypeDimensionMap[3].first );
+  const Range::iterator begin = elements.lower_bound( CN::TypeDimensionMap[2].first );
+  const Range::iterator end = elements.lower_bound( CN::TypeDimensionMap[3].first );
   
     // compute mean and moments
   result.matrix = Matrix3(0.0);

Modified: MOAB/trunk/src/OrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/src/OrientedBoxTreeTool.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/OrientedBoxTreeTool.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -23,7 +23,7 @@
 #include "moab/OrientedBoxTreeTool.hpp"
 #include "OrientedBox.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/GeomUtil.hpp"
 #include "moab/MBTagConventions.hpp"
 #include <iostream>
@@ -1531,7 +1531,7 @@
     if (MB_SUCCESS != rval)
       return rval;
     if(count > 0)
-      outputStream << " " << count << " " << MBCN::EntityTypeName(type) << std::endl;
+      outputStream << " " << count << " " << CN::EntityTypeName(type) << std::endl;
   }
   return MB_SUCCESS;
 }
@@ -1546,7 +1546,7 @@
       return rval;
     if (range.empty())
       continue;
-    outputStream << " " << MBCN::EntityTypeName(type) << " ";  
+    outputStream << " " << CN::EntityTypeName(type) << " ";  
     std::vector<int> ids( range.size() );
     if (haveTag) {
       rval = instance->tag_get_data( tag, range, &ids[0] );

Modified: MOAB/trunk/src/Range.cpp
===================================================================
--- MOAB/trunk/src/Range.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/Range.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -31,7 +31,7 @@
 #include <assert.h>
 #include "moab/Range.hpp"
 #include "Internals.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <iostream>
 #include <string>
 
@@ -624,12 +624,12 @@
     EntityType t1 = TYPE_FROM_HANDLE( i->first );
     EntityType t2 = TYPE_FROM_HANDLE( i->second );
   
-    stream << indent_prefix_str << "\t" << MBCN::EntityTypeName( t1 ) << " " 
+    stream << indent_prefix_str << "\t" << CN::EntityTypeName( t1 ) << " " 
            << ID_FROM_HANDLE( i->first );
     if(i->first != i->second) {
       stream << " - ";
       if (t1 != t2) 
-        stream << MBCN::EntityTypeName( t2 ) << " ";
+        stream << CN::EntityTypeName( t2 ) << " ";
       stream << ID_FROM_HANDLE( i->second );
     }
     stream << std::endl;
@@ -842,8 +842,8 @@
 bool Range::all_of_dimension( int dimension ) const
 {
   return empty() 
-      || (MBCN::Dimension(TYPE_FROM_HANDLE(front())) == dimension
-       && MBCN::Dimension(TYPE_FROM_HANDLE(back())) == dimension);
+      || (CN::Dimension(TYPE_FROM_HANDLE(front())) == dimension
+       && CN::Dimension(TYPE_FROM_HANDLE(back())) == dimension);
 }
 
 unsigned Range::num_of_type( EntityType type ) const
@@ -871,23 +871,23 @@
 unsigned Range::num_of_dimension( int dim ) const
 {
   const_pair_iterator iter = const_pair_begin();
-  while(iter != const_pair_end() && MBCN::Dimension(TYPE_FROM_HANDLE((*iter).second)) < dim)
+  while(iter != const_pair_end() && CN::Dimension(TYPE_FROM_HANDLE((*iter).second)) < dim)
     ++iter;
   
   int junk;
   unsigned count = 0;
   for ( ; iter != const_pair_end(); ++iter)
   {
-    int start_dim = MBCN::Dimension(TYPE_FROM_HANDLE((*iter).first));
-    int end_dim = MBCN::Dimension(TYPE_FROM_HANDLE((*iter).second));
+    int start_dim = CN::Dimension(TYPE_FROM_HANDLE((*iter).first));
+    int end_dim = CN::Dimension(TYPE_FROM_HANDLE((*iter).second));
     if (start_dim > dim)
       break;
       
     EntityHandle sh = start_dim < dim ? 
-                        CREATE_HANDLE( MBCN::TypeDimensionMap[dim].first, 1, junk ) :
+                        CREATE_HANDLE( CN::TypeDimensionMap[dim].first, 1, junk ) :
                         (*iter).first;
     EntityHandle eh = end_dim > dim ?
-                        CREATE_HANDLE( MBCN::TypeDimensionMap[dim].second, MB_END_ID, junk ) :
+                        CREATE_HANDLE( CN::TypeDimensionMap[dim].second, MB_END_ID, junk ) :
                         (*iter).second;
     count += eh - sh + 1;
   }

Modified: MOAB/trunk/src/ReadUtil.cpp
===================================================================
--- MOAB/trunk/src/ReadUtil.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/ReadUtil.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -279,7 +279,7 @@
                                              EntityType &etype) 
 {
     // get dimension of bounding entities
-  int bound_dim = MBCN::Dimension(TYPE_FROM_HANDLE(bound_ents[0]));
+  int bound_dim = CN::Dimension(TYPE_FROM_HANDLE(bound_ents[0]));
   int indices[MB_MAX_SUB_ENTITY_VERTICES];
   const EntityHandle *connect;
   std::vector<EntityHandle> tmp_connect;
@@ -288,19 +288,19 @@
   int numv = 0, num_connect;
   ErrorCode result;
   for (EntityType t = MBEDGE; t < MBENTITYSET; t++) {
-    int nindex = MBCN::NumSubEntities(t, bound_dim);
-    if (MBCN::Dimension(t) != dim || nindex != bound_size) 
+    int nindex = CN::NumSubEntities(t, bound_dim);
+    if (CN::Dimension(t) != dim || nindex != bound_size) 
       continue;
 
       // fill in vertices from bounding entity vertices
-    int nverts = MBCN::VerticesPerEntity(t);
+    int nverts = CN::VerticesPerEntity(t);
     std::fill(bound_verts, bound_verts+nverts, 0);
     for (int index = 0; index < nindex; index++) {
       result = mMB->get_connectivity(bound_ents[index], connect, num_connect,
                                      false, &tmp_connect);
       if (MB_SUCCESS != result) return result;
       
-      MBCN::SubEntityVertexIndices(t, bound_dim, index, indices);
+      CN::SubEntityVertexIndices(t, bound_dim, index, indices);
 
       for (int c = 0; c < num_connect; c++) {
         if (!bound_verts[indices[c]]) {

Modified: MOAB/trunk/src/ScdElementData.cpp
===================================================================
--- MOAB/trunk/src/ScdElementData.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/ScdElementData.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -17,7 +17,7 @@
 #include "ScdVertexData.hpp"
 #include "moab/Interface.hpp"
 #include "moab/ReadUtilIface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 #include <assert.h>
 
@@ -27,7 +27,7 @@
                                 int irange, int jrange, int krange)
 {
   size_t result = 1;
-  switch (MBCN::Dimension(TYPE_FROM_HANDLE(start_handle))) {
+  switch (CN::Dimension(TYPE_FROM_HANDLE(start_handle))) {
     default: result = 0; assert( false ); 
     case 3: result *= krange;
     case 2: result *= jrange;

Modified: MOAB/trunk/src/ScdElementData.hpp
===================================================================
--- MOAB/trunk/src/ScdElementData.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/ScdElementData.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -29,7 +29,7 @@
 
 #include "SequenceData.hpp"
 #include "moab/HomXform.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "ScdVertexData.hpp"
 #include "Internals.hpp"
 #include "moab/Range.hpp"
@@ -294,10 +294,10 @@
   
   connectivity.push_back(get_vertex(i, j, k));
   connectivity.push_back(get_vertex(i+1, j, k));
-  if (MBCN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 2) return MB_SUCCESS;
+  if (CN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 2) return MB_SUCCESS;
   connectivity.push_back(get_vertex(i+1, j+1, k));
   connectivity.push_back(get_vertex(i, j+1, k));
-  if (MBCN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 3) return MB_SUCCESS;
+  if (CN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 3) return MB_SUCCESS;
   connectivity.push_back(get_vertex(i, j, k+1));
   connectivity.push_back(get_vertex(i+1, j, k+1));
   connectivity.push_back(get_vertex(i+1, j+1, k+1));

Modified: MOAB/trunk/src/SequenceManager.cpp
===================================================================
--- MOAB/trunk/src/SequenceManager.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/SequenceManager.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -627,7 +627,7 @@
                                       EntityHandle& handle,
                                       EntitySequence*& sequence )
 {
-  int this_dim = MBCN::Dimension(type);
+  int this_dim = CN::Dimension(type);
 
     // use > instead of != in the following assert to also catch cases where imin > imax, etc.
   assert((this_dim < 3 || kmax > kmin) &&
@@ -701,7 +701,7 @@
 					EntityHandle& handle,
 					EntitySequence*& sequence )
 {
-  int this_dim = MBCN::Dimension(type);
+  int this_dim = CN::Dimension(type);
 
   assert((this_dim < 3 || kmax > kmin) &&
          (this_dim < 2 || jmax > jmin) &&
@@ -1610,7 +1610,7 @@
   for (EntityType t = MBVERTEX; t < MBMAXTYPE; ++t) 
     if (!seq_man.entity_map(t).empty()) 
       s << std::endl 
-        << "****************** " << MBCN::EntityTypeName( t ) << " ******************"
+        << "****************** " << CN::EntityTypeName( t ) << " ******************"
         << std::endl << seq_man.entity_map(t) << std::endl;
   return s;
 }

Modified: MOAB/trunk/src/Skinner.cpp
===================================================================
--- MOAB/trunk/src/Skinner.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/Skinner.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -19,7 +19,7 @@
 
 #include "moab/Skinner.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <vector>
 #include <set>
 #include <algorithm>
@@ -53,7 +53,7 @@
   // also get the connectivity tags for each type
   // also populate adjacency information
   EntityType type;
-  DimensionPair target_ent_types = MBCN::TypeDimensionMap[mTargetDim];
+  DimensionPair target_ent_types = CN::TypeDimensionMap[mTargetDim];
 
   void* null_ptr = NULL;
   ErrorCode result;
@@ -254,7 +254,7 @@
   
   Range forward, reverse;
   Range prev;
-  const int d = MBCN::Dimension(TYPE_FROM_HANDLE(source_entities.front()));
+  const int d = CN::Dimension(TYPE_FROM_HANDLE(source_entities.front()));
   if (!source_entities.all_of_dimension(d))
     return MB_TYPE_OUT_OF_RANGE;
   
@@ -316,7 +316,7 @@
   
   // get our working dimensions
   EntityType type = thisMB->type_from_handle(*(source_entities.begin()));
-  const int source_dim = MBCN::Dimension(type);
+  const int source_dim = CN::Dimension(type);
   mTargetDim = source_dim - 1;
 
   // make sure we can handle the working dimensions
@@ -363,10 +363,10 @@
     Range dum_elems, dum_sub_elems;
     
     // get connectivity of each n-1 dimension entity
-    num_sides = MBCN::NumSubEntities( type, mTargetDim );
+    num_sides = CN::NumSubEntities( type, mTargetDim );
     for(int i=0; i<num_sides; i++)
     {
-      sub_indices = MBCN::SubEntityVertexIndices( type, mTargetDim, i, sub_type, num_sub_nodes );
+      sub_indices = CN::SubEntityVertexIndices( type, mTargetDim, i, sub_type, num_sub_nodes );
       assert(num_sub_nodes <= 32);
       for(int j=0; j<num_sub_nodes; j++)
         sub_conn[j] = conn[sub_indices[j]];
@@ -400,7 +400,7 @@
 //            int indices[MB_MAX_SUB_ENTITY_VERTICES];
 //            EntityType new_type;
 //            int num_new_nodes;
-//            MBCN::SubEntityNodeIndices( type, num_nodes, mTargetDim, i, new_type, num_new_nodes, indices );
+//            CN::SubEntityNodeIndices( type, num_nodes, mTargetDim, i, new_type, num_new_nodes, indices );
 //            for(int j=0; j<num_new_nodes; j++)
 //              sub_conn[j] = conn[indices[j]];
 //        
@@ -438,7 +438,7 @@
           int indices[MB_MAX_SUB_ENTITY_VERTICES];
           EntityType new_type;
           int num_new_nodes;
-          MBCN::SubEntityNodeIndices( type, num_nodes, mTargetDim, i, new_type, num_new_nodes, indices );
+          CN::SubEntityNodeIndices( type, num_nodes, mTargetDim, i, new_type, num_new_nodes, indices );
           for(int j=0; j<num_new_nodes; j++)
             sub_conn[j] = conn[indices[j]];
           result = thisMB->create_element(new_type, sub_conn, num_new_nodes,
@@ -690,7 +690,7 @@
   
   // get our working dimensions
   EntityType type = thisMB->type_from_handle(*(boundary.begin()));
-  const int source_dim = MBCN::Dimension(type);
+  const int source_dim = CN::Dimension(type);
 
   // make sure we can handle the working dimensions
   if(source_dim != 2)
@@ -738,17 +738,17 @@
     assert(MB_SUCCESS == result);
 
     // add node handles to boundary_node range
-    std::copy(conn.begin(), conn.begin()+MBCN::VerticesPerEntity(type), 
+    std::copy(conn.begin(), conn.begin()+CN::VerticesPerEntity(type), 
               range_inserter(boundary_nodes));
 
     type = thisMB->type_from_handle(*iter);
     
     // get connectivity of each n-1 dimension entity (edge in this case)
-    const struct MBCN::ConnMap* conn_map = &(MBCN::mConnectivityMap[type][0]);
-    num_edge = MBCN::NumSubEntities( type, 1 );
+    const struct CN::ConnMap* conn_map = &(CN::mConnectivityMap[type][0]);
+    num_edge = CN::NumSubEntities( type, 1 );
     for(int i=0; i<num_edge; i++)
     {
-      edge_verts = MBCN::SubEntityVertexIndices( type, 1, i, sub_type, num_sub_ent_vert );
+      edge_verts = CN::SubEntityVertexIndices( type, 1, i, sub_type, num_sub_ent_vert );
       assert( sub_type == MBEDGE && num_sub_ent_vert == 2 );
       sub_conn[0] = conn[edge_verts[0]];
       sub_conn[1] = conn[edge_verts[1]];
@@ -765,7 +765,7 @@
         int indices[MB_MAX_SUB_ENTITY_VERTICES];
         EntityType new_type;
         int num_new_nodes;
-        MBCN::SubEntityNodeIndices( type, conn.size(), 1, i, new_type, num_new_nodes, indices );
+        CN::SubEntityNodeIndices( type, conn.size(), 1, i, new_type, num_new_nodes, indices );
         for(int j=0; j<num_new_nodes; j++)
           sub_conn[j] = conn[indices[j]];
         
@@ -1013,7 +1013,7 @@
   if (entities.empty())
     return MB_SUCCESS;
   
-  const int dim = MBCN::Dimension(TYPE_FROM_HANDLE(entities.front()));
+  const int dim = CN::Dimension(TYPE_FROM_HANDLE(entities.front()));
   if (dim < 1 || dim > 3 || !entities.all_of_dimension(dim))
     return MB_TYPE_OUT_OF_RANGE;
   
@@ -1268,7 +1268,7 @@
      *             in all sides in the list.)
      *\param adj_elem The element that this is a side of.
      *\param elem_side Which side of adj_elem are we storing
-     *             (MBCN side number.)
+     *             (CN side number.)
      */
   void insert( const EntityHandle* handles, int skip_idx,
                EntityHandle adj_elem, unsigned short elem_side )
@@ -1299,7 +1299,7 @@
      *\param indices  The indices into 'handles' at which the vertices
      *             representing the side occur.
      *\param elem_side Which side of adj_elem are we storing
-     *             (MBCN side number.)
+     *             (CN side number.)
      */
   void insert( const EntityHandle* handles,  int skip_idx,
                EntityHandle adj_elem, unsigned short elem_side,
@@ -1355,7 +1355,7 @@
 //
 // This function always creates elements that have a "forward"
 // orientation with respect to the parent element (have
-// nodes ordered the same as MBCN returns for the "side").
+// nodes ordered the same as CN returns for the "side").
 //
 // elem - The higher-dimension element for which to create
 //        a lower-dim element representing the side.
@@ -1371,8 +1371,8 @@
   int len, side_len, side, sense, offset, indices[max_side];
   ErrorCode rval;
   EntityType type = TYPE_FROM_HANDLE(elem), tmp_type;
-  const int ncorner = MBCN::VerticesPerEntity( side_type );
-  const int d = MBCN::Dimension(side_type);
+  const int ncorner = CN::VerticesPerEntity( side_type );
+  const int d = CN::Dimension(side_type);
   std::vector<EntityHandle> storage;
   
   // Get the connectivity of the parent element
@@ -1381,8 +1381,8 @@
  
   // Find which side we are creating and get indices of all nodes
   // (including higher-order, if any.)
-  MBCN::SideNumber( type, conn, side_conn, ncorner, d, side, sense, offset );
-  MBCN::SubEntityNodeIndices( type, len, d, side, tmp_type, side_len, indices );
+  CN::SideNumber( type, conn, side_conn, ncorner, d, side, sense, offset );
+  CN::SubEntityNodeIndices( type, len, d, side, tmp_type, side_len, indices );
   assert(side_len <= max_side);
   assert(side_type == tmp_type);
   
@@ -1396,7 +1396,7 @@
   return thisMB->create_element( side_type, side_conn_full, side_len, side_elem );
 }
 
-// Test if an edge is reversed with respect MBCN's ordering
+// Test if an edge is reversed with respect CN's ordering
 // for the "side" of a face.
 bool Skinner::edge_reversed( EntityHandle face,
                                const EntityHandle* edge_ends )
@@ -1417,7 +1417,7 @@
 }
 
 // Test if a 2D element representing the side or face of a
-// volume element is reversed with respect to the MBCN node
+// volume element is reversed with respect to the CN node
 // ordering for the corresponding region element side.
 bool Skinner::face_reversed( EntityHandle region,
                                const EntityHandle* face_corners,
@@ -1430,9 +1430,9 @@
     assert(false);
     return false;
   }
-  short r = MBCN::SideNumber( TYPE_FROM_HANDLE(region), conn, face_corners, 
-                              MBCN::VerticesPerEntity(face_type),
-                              MBCN::Dimension(face_type),
+  short r = CN::SideNumber( TYPE_FROM_HANDLE(region), conn, face_corners, 
+                              CN::VerticesPerEntity(face_type),
+                              CN::Dimension(face_type),
                               side, sense, offset );
   assert(0 == r);
   return (!r && sense == -1);
@@ -1563,13 +1563,13 @@
 
             rval = thisMB->get_connectivity( face, conn, len, false );
             if (MB_SUCCESS != rval) return rval;
-            if (!MBCN::HasMidEdgeNodes( type, len ))
+            if (!CN::HasMidEdgeNodes( type, len ))
               continue;
 
             EntityHandle ec[2] = { *it, p->handles[0] };
             int side, sense, offset;
-            MBCN::SideNumber( type, conn, ec, 2, 1, side, sense, offset );
-            offset = MBCN::HONodeIndex( type, len, 1, side );
+            CN::SideNumber( type, conn, ec, 2, 1, side, sense, offset );
+            offset = CN::HONodeIndex( type, len, 1, side );
             assert(offset >= 0 && offset < len);
             skin_verts->insert( conn[offset] );
           }
@@ -1755,18 +1755,18 @@
         idx = std::find(conn, conn+len, *it) - conn;
         assert(idx != len);
         
-        if (len > MBCN::VerticesPerEntity( type )) {
+        if (len > CN::VerticesPerEntity( type )) {
           higher_order =true;
             // skip higher-order nodes for now
-          if (idx >= MBCN::VerticesPerEntity( type )) 
+          if (idx >= CN::VerticesPerEntity( type )) 
             continue;
         }
 
           // For each side of the element...
-        const int num_faces = MBCN::NumSubEntities( type, 2 );
+        const int num_faces = CN::NumSubEntities( type, 2 );
         for (int f = 0; f < num_faces; ++f) {
           int num_vtx;
-          const short* face_indices = MBCN::SubEntityVertexIndices(type, 2, f, face_type, num_vtx );
+          const short* face_indices = CN::SubEntityVertexIndices(type, 2, f, face_type, num_vtx );
           const short face_idx = std::find(face_indices, face_indices+num_vtx, (short)idx) - face_indices;
             // skip sides that do not contain vertex from outer loop
           if (face_idx == num_vtx)
@@ -1805,12 +1805,12 @@
 
             rval = thisMB->get_connectivity( elem, conn, len, false );
             if (MB_SUCCESS != rval) return rval;
-            if (!MBCN::HasMidNodes( type, len ))
+            if (!CN::HasMidNodes( type, len ))
               continue;
 
             EntityHandle ec[3] = { *it, t->handles[0], t->handles[1] };
-            MBCN::SideNumber( type, conn, ec, 3, 2, side, sense, offset );
-            MBCN::SubEntityNodeIndices( type, len, 2, side, face_type, clen, indices );
+            CN::SideNumber( type, conn, ec, 3, 2, side, sense, offset );
+            CN::SubEntityNodeIndices( type, len, 2, side, face_type, clen, indices );
             assert(MBTRI == face_type);
             for (int k = 3; k < clen; ++k)
               skin_verts->insert( conn[indices[k]] );
@@ -1823,12 +1823,12 @@
 
             rval = thisMB->get_connectivity( elem, conn, len, false );
             if (MB_SUCCESS != rval) return rval;
-            if (!MBCN::HasMidNodes( type, len ))
+            if (!CN::HasMidNodes( type, len ))
               continue;
 
             EntityHandle ec[4] = { *it, q->handles[0], q->handles[1], q->handles[2] };
-            MBCN::SideNumber( type, conn, ec, 4, 2, side, sense, offset );
-            MBCN::SubEntityNodeIndices( type, len, 2, side, face_type, clen, indices );
+            CN::SideNumber( type, conn, ec, 4, 2, side, sense, offset );
+            CN::SubEntityNodeIndices( type, len, 2, side, face_type, clen, indices );
             assert(MBQUAD == face_type);
             for (int k = 4; k < clen; ++k)
               skin_verts->insert( conn[indices[k]] );

Modified: MOAB/trunk/src/StructuredElementSeq.cpp
===================================================================
--- MOAB/trunk/src/StructuredElementSeq.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/StructuredElementSeq.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -18,7 +18,7 @@
 #include "ScdElementData.hpp"
 #include "moab/Interface.hpp"
 #include "moab/ReadUtilIface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 
 namespace moab {
@@ -31,7 +31,7 @@
                                                         imax-imin,
                                                         jmax-jmin,
                                                         kmax-kmin ),
-                     MBCN::VerticesPerEntity(TYPE_FROM_HANDLE(start_handle)),
+                     CN::VerticesPerEntity(TYPE_FROM_HANDLE(start_handle)),
                      new ScdElementData( start_handle, 
                                         imin, jmin, kmin,
                                         imax, jmax, kmax ) )

Modified: MOAB/trunk/src/SweptElementData.cpp
===================================================================
--- MOAB/trunk/src/SweptElementData.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/SweptElementData.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -17,7 +17,7 @@
 #include "SweptVertexData.hpp"
 #include "moab/Interface.hpp"
 #include "moab/ReadUtilIface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 #include <assert.h>
 
@@ -27,7 +27,7 @@
                                 int irange, int jrange, int krange)
 {
   size_t result = 1;
-  switch (MBCN::Dimension(TYPE_FROM_HANDLE(start_handle))) {
+  switch (CN::Dimension(TYPE_FROM_HANDLE(start_handle))) {
     default: result = 0; assert( false ); 
     case 3: result *= krange;
     case 2: result *= jrange;

Modified: MOAB/trunk/src/SweptElementData.hpp
===================================================================
--- MOAB/trunk/src/SweptElementData.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/SweptElementData.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -29,7 +29,7 @@
 
 #include "SequenceData.hpp"
 #include "moab/HomXform.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "SweptVertexData.hpp"
 #include "Internals.hpp"
 #include "moab/Range.hpp"
@@ -295,10 +295,10 @@
   
   connectivity.push_back(get_vertex(i, j, k));
   connectivity.push_back(get_vertex(i+1, j, k));
-  if (MBCN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 2) return MB_SUCCESS;
+  if (CN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 2) return MB_SUCCESS;
   connectivity.push_back(get_vertex(i+1, j+1, k));
   connectivity.push_back(get_vertex(i, j+1, k));
-  if (MBCN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 3) return MB_SUCCESS;
+  if (CN::Dimension(TYPE_FROM_HANDLE(start_handle())) < 3) return MB_SUCCESS;
   connectivity.push_back(get_vertex(i, j, k+1));
   connectivity.push_back(get_vertex(i+1, j, k+1));
   connectivity.push_back(get_vertex(i+1, j+1, k+1));

Modified: MOAB/trunk/src/SweptElementSeq.cpp
===================================================================
--- MOAB/trunk/src/SweptElementSeq.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/SweptElementSeq.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -18,7 +18,7 @@
 #include "SweptElementData.hpp"
 #include "moab/Interface.hpp"
 #include "moab/ReadUtilIface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 
 namespace moab {
@@ -32,7 +32,7 @@
                                                         imax-imin,
                                                         jmax-jmin,
                                                         kmax-kmin ),
-                     MBCN::VerticesPerEntity(TYPE_FROM_HANDLE(start_handle)),
+                     CN::VerticesPerEntity(TYPE_FROM_HANDLE(start_handle)),
                      new SweptElementData( start_handle, 
 					   imin, jmin, kmin,
 					   imax, jmax, kmax,

Modified: MOAB/trunk/src/TypeSequenceManager.cpp
===================================================================
--- MOAB/trunk/src/TypeSequenceManager.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/TypeSequenceManager.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -2,7 +2,6 @@
 #include "SequenceData.hpp"
 #include <assert.h>
 #include <limits>
-#include "moab/MBCN.hpp"
 
 namespace moab {
 

Modified: MOAB/trunk/src/UnstructuredElemSeq.cpp
===================================================================
--- MOAB/trunk/src/UnstructuredElemSeq.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/UnstructuredElemSeq.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,6 +1,6 @@
 #include "UnstructuredElemSeq.hpp"
 #include "SequenceData.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 namespace moab {
 
@@ -63,7 +63,7 @@
                                        bool topological ) const
 {
   EntityHandle const* conn = get_array() + nodes_per_element() * (handle - start_handle());
-  int len = topological ? MBCN::VerticesPerEntity(type()) : nodes_per_element();
+  int len = topological ? CN::VerticesPerEntity(type()) : nodes_per_element();
   connect.reserve( connect.size() + len );
   std::copy( conn, conn+len, std::back_inserter( connect ) );
   return MB_SUCCESS;
@@ -78,7 +78,7 @@
                                        std::vector<EntityHandle>* ) const
 {
   conn_ptr = get_array() + nodes_per_element() * (handle - start_handle());
-  len = topological ? MBCN::VerticesPerEntity(type()) : nodes_per_element();
+  len = topological ? CN::VerticesPerEntity(type()) : nodes_per_element();
   return MB_SUCCESS;
 }
 

Modified: MOAB/trunk/src/Util.cpp
===================================================================
--- MOAB/trunk/src/Util.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/Util.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -34,7 +34,6 @@
 #include "moab/Interface.hpp"
 #include <assert.h>
 #include <math.h>
-#include "moab/MBCN.hpp"
 #include <algorithm>
 
 namespace moab {

Modified: MOAB/trunk/src/io/ExoIIUtil.cpp
===================================================================
--- MOAB/trunk/src/io/ExoIIUtil.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ExoIIUtil.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -16,7 +16,7 @@
 #include "ExoIIUtil.hpp"
 #include "Internals.hpp"
 #include "moab/Interface.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <string.h>
 
 namespace moab {
@@ -306,9 +306,9 @@
         else if( indiv_entity_type == MBEDGE )
           dimension = 2;
         else
-          dimension = MBCN::Dimension(indiv_entity_type);
+          dimension = CN::Dimension(indiv_entity_type);
           
-        return get_element_type_from_num_verts(MBCN::VerticesPerEntity(indiv_entity_type), 
+        return get_element_type_from_num_verts(CN::VerticesPerEntity(indiv_entity_type), 
                                                indiv_entity_type, dimension);
       }
       else return EXOII_MAX_ELEM_TYPE;

Modified: MOAB/trunk/src/io/ReadABAQUS.cpp
===================================================================
--- MOAB/trunk/src/io/ReadABAQUS.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadABAQUS.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -29,7 +29,6 @@
 #include <stdio.h>
 #include <cmath>
 
-#include "moab/MBCN.hpp"
 #include "moab/Range.hpp"
 #include "moab/Interface.hpp"
 #include "moab/MBTagConventions.hpp"

Modified: MOAB/trunk/src/io/ReadCCMIO.cpp
===================================================================
--- MOAB/trunk/src/io/ReadCCMIO.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadCCMIO.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -5,7 +5,6 @@
 #include <string>
 #include <algorithm>
 
-#include "moab/MBCN.hpp"
 #include "moab/Range.hpp"
 #include "moab/Interface.hpp"
 #include "moab/MBTagConventions.hpp"

Modified: MOAB/trunk/src/io/ReadGmsh.cpp
===================================================================
--- MOAB/trunk/src/io/ReadGmsh.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadGmsh.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -30,7 +30,7 @@
 #include "moab/Range.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/MBParallelConventions.h"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "GmshUtil.hpp"
 
 #include <errno.h>
@@ -509,7 +509,7 @@
       
       if (1 == set_type) // geometry
       {
-        int dim = MBCN::Dimension( type );
+        int dim = CN::Dimension( type );
         result = mdbImpl->tag_set_data( tag_handles[1], &set, 1, &dim );
         if (MB_SUCCESS != result)
           return result;
@@ -521,7 +521,7 @@
       set = *sets.begin();
       if (1 == set_type) // geometry
       {
-        int dim = MBCN::Dimension( type );
+        int dim = CN::Dimension( type );
           // Get dimension of set
         int dim2;
         result = mdbImpl->tag_get_data( tag_handles[1], &set, 1, &dim2 );

Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -35,7 +35,7 @@
 #include "Internals.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "ReadHDF5.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "FileOptions.hpp"
 #ifdef HDF5_PARALLEL
 #  include "ReadParallel.hpp"
@@ -373,7 +373,7 @@
 
   std::vector<int> polyhedra; // need to do these last so that faces are loaded
   for (i = 0; i < fileInfo->num_elem_desc; ++i) {
-    if (MBCN::EntityTypeFromName(fileInfo->elems[i].type) == MBPOLYHEDRON) {
+    if (CN::EntityTypeFromName(fileInfo->elems[i].type) == MBPOLYHEDRON) {
       polyhedra.push_back(i);
       continue;
     }
@@ -571,7 +571,7 @@
   
     // if input contained any polyhedra, need to get faces
   for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-    EntityType type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
+    EntityType type = CN::EntityTypeFromName( fileInfo->elems[i].type );
     if (type != MBPOLYHEDRON)
       continue;
     
@@ -586,7 +586,7 @@
   Range nodes;
   intersect( fileInfo->nodes, file_ids, nodes );
   for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-    EntityType type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
+    EntityType type = CN::EntityTypeFromName( fileInfo->elems[i].type );
     if (type <= MBVERTEX || type >= MBENTITYSET) {
       assert( false ); // for debug code die for unknown element tyoes
       continue; // for release code, skip unknown element types
@@ -636,8 +636,8 @@
     case 0: // ELEMENTS=EXPLICIT : read only specified element IDS
     for (int dim = 1; dim <= 3; ++dim) {
       for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-        EntityType type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
-        if (MBCN::Dimension(type) == dim) {
+        EntityType type = CN::EntityTypeFromName( fileInfo->elems[i].type );
+        if (CN::Dimension(type) == dim) {
           Range subset;
           intersect( fileInfo->elems[i].desc, file_ids, subset );
           rval = read_elems( fileInfo->elems[i],  subset );
@@ -651,8 +651,8 @@
     case 1: // ELEMENTS=NODES : read all elements for which all nodes have been read
     for (int dim = 1; dim <= 3; ++dim) {
       for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-        EntityType type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
-        if (MBCN::Dimension(type) == dim) {
+        EntityType type = CN::EntityTypeFromName( fileInfo->elems[i].type );
+        if (CN::Dimension(type) == dim) {
           rval = read_node_adj_elems( fileInfo->elems[i] );
           if (MB_SUCCESS != rval)
             return error(rval);
@@ -1011,7 +1011,7 @@
   ErrorCode rval = MB_SUCCESS;
   mhdf_Status status;
   
-  EntityType type = MBCN::EntityTypeFromName( elems.type );
+  EntityType type = CN::EntityTypeFromName( elems.type );
   if (type == MBMAXTYPE)
   {
     readUtil->report_error( "Unknown element type: \"%s\".\n", elems.type );
@@ -1089,7 +1089,7 @@
   const int node_per_elem = group.desc.vals_per_ent;
   long start_id = group.desc.start_id;
   long remaining = group.desc.count;
-  const EntityType type = MBCN::EntityTypeFromName( group.type );
+  const EntityType type = CN::EntityTypeFromName( group.type );
   
     // figure out how many elements we can read in each pass
   long* const buffer = reinterpret_cast<long*>( dataBuffer );
@@ -1244,7 +1244,7 @@
     }
   };
   
-  EntityType type = MBCN::EntityTypeFromName( elems.type );
+  EntityType type = CN::EntityTypeFromName( elems.type );
   if (type == MBMAXTYPE)
   {
     readUtil->report_error( "Unknown element type: \"%s\".\n", elems.type );
@@ -1284,7 +1284,7 @@
     readUtil->report_error( mhdf_message( &status ) );
     return error(MB_FAILURE);
   }
-  EntityType type = MBCN::EntityTypeFromName( name );
+  EntityType type = CN::EntityTypeFromName( name );
 
   long count, first_id, data_len;
   hid_t handles[2];
@@ -1297,7 +1297,7 @@
   }
 
   ElemSet empty_set;
-  empty_set.type = MBCN::EntityTypeFromName( name );
+  empty_set.type = CN::EntityTypeFromName( name );
   empty_set.type2 = elem_group;
   
   EntityHandle h;
@@ -1372,8 +1372,8 @@
     // determine largest element dimension
   int max_dim = 0;
   for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-    type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
-    int dim = MBCN::Dimension(type);
+    type = CN::EntityTypeFromName( fileInfo->elems[i].type );
+    int dim = CN::Dimension(type);
     if (dim > max_dim) {
       EntityHandle start = (EntityHandle)fileInfo->elems[i].desc.start_id;
       Range::iterator it = file_ids.lower_bound( start );
@@ -1400,8 +1400,8 @@
   
     // read all node-adjacent elements of smaller dimensions
   for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-    EntityType type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
-    if (MBCN::Dimension(type) < max_dim) {
+    EntityType type = CN::EntityTypeFromName( fileInfo->elems[i].type );
+    if (CN::Dimension(type) < max_dim) {
       rval = read_node_adj_elems( fileInfo->elems[i] );
       if (MB_SUCCESS != rval)
         return error(rval);
@@ -1413,8 +1413,8 @@
     // but then the lower-dimension elements will be read a second time when 
     // reading node-adjacent elements.
   for (int i = 0; i < fileInfo->num_elem_desc; ++i) {
-    type = MBCN::EntityTypeFromName( fileInfo->elems[i].type );
-    if (MBCN::Dimension(type) == max_dim) {
+    type = CN::EntityTypeFromName( fileInfo->elems[i].type );
+    if (CN::Dimension(type) == max_dim) {
       Range subset;
       intersect( fileInfo->elems[i].desc, elem_ids, subset );
       if (!subset.empty()) {
@@ -1446,8 +1446,8 @@
     if (avail > count)
       count = avail;
     EntityHandle start_h = rit->value + offset;
-    int d = MBCN::Dimension( TYPE_FROM_HANDLE( start_h ) );
-    if (MBCN::Dimension( TYPE_FROM_HANDLE( start_h + count - 1 ) ) != d) 
+    int d = CN::Dimension( TYPE_FROM_HANDLE( start_h ) );
+    if (CN::Dimension( TYPE_FROM_HANDLE( start_h + count - 1 ) ) != d) 
       count = start - LAST_HANDLE( TYPE_FROM_HANDLE(start_h) ) + 1;
     
     elem_ids.erase( elem_ids.begin(), elem_ids.begin() + count );
@@ -1463,7 +1463,7 @@
     // remove any vertex handles
   all_elems.erase( all_elems.begin(), all_elems.upper_bound( MBVERTEX ) );
     // remove any set handles and any handles for elements >= max_dim
-  all_elems.erase( all_elems.lower_bound( MBCN::TypeDimensionMap[max_dim].first ), all_elems.end() );
+  all_elems.erase( all_elems.lower_bound( CN::TypeDimensionMap[max_dim].first ), all_elems.end() );
     // remove explicit elements < max_dim
   if (!explicit_elems[1].empty() && max_dim > 1)
     all_elems = subtract( all_elems,  explicit_elems[1] );

Modified: MOAB/trunk/src/io/ReadNASTRAN.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNASTRAN.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadNASTRAN.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -30,7 +30,7 @@
 #include "FileOptions.hpp"
 #include "FileTokenizer.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 namespace moab {
 
@@ -368,7 +368,7 @@
   }
 
   // the size of the connectivity array depends on the element type
-  int n_conn = MBCN::VerticesPerEntity(element_type);
+  int n_conn = CN::VerticesPerEntity(element_type);
   EntityHandle conn_verts[27];
   assert(n_conn <= (int)(sizeof(conn_verts)/sizeof(EntityHandle)));
   

Modified: MOAB/trunk/src/io/ReadNCDF.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNCDF.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadNCDF.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -31,7 +31,7 @@
 #include <sstream>
 #include <map>
 
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/Range.hpp"
 #include "moab/Interface.hpp"
 #include "ExoIIUtil.hpp"
@@ -52,7 +52,7 @@
           if (dimension_exists(name)) {\
             ncdim = ncFile->get_dim(name); \
             if (!ncdim->is_valid()) {\
-               readMeshIface->report_error("MBCN:: name wasn't valid.");\
+               readMeshIface->report_error("ReadNCDF:: name wasn't valid.");\
                return MB_FAILURE;\
             }\
             val = ncdim->size();\
@@ -63,7 +63,7 @@
           if (dimension_exists(name)) {\
             ncdim = ncFile->get_dim(name); \
             if (!ncdim->is_valid()) {\
-               readMeshIface->report_error("MBCN:: name wasn't valid.");\
+               readMeshIface->report_error("ReadNCDF:: name wasn't valid.");\
                return MB_FAILURE;\
             }\
             val = ncdim->size();\
@@ -199,7 +199,7 @@
   ncFile = new NcFile(file_name);
   if (NULL == ncFile || !ncFile->is_valid())
   {
-    readMeshIface->report_error("MBCN:: problem opening Netcdf/Exodus II file %s",file_name);
+    readMeshIface->report_error("ReadNCDF:: problem opening Netcdf/Exodus II file %s",file_name);
     return MB_FILE_DOES_NOT_EXIST;
   }
     // delete file when we return from this function
@@ -298,7 +298,7 @@
   ncFile = new NcFile(exodus_file_name);
   if (NULL == ncFile || !ncFile->is_valid())
   {
-    readMeshIface->report_error("MBCN:: problem opening Netcdf/Exodus II file %s",exodus_file_name);
+    readMeshIface->report_error("ReadNCDF:: problem opening Netcdf/Exodus II file %s",exodus_file_name);
     return MB_FILE_DOES_NOT_EXIST;
   }
     // delete file when we return from this function
@@ -359,7 +359,7 @@
     // get the word size, scalar value
   NcAtt *temp_att = ncFile->get_att("floating_point_word_size");
   if (!temp_att->is_valid() || temp_att->type() != ncInt || temp_att->num_vals() != 1) {
-    readMeshIface->report_error("MBCN:: Word size didn't have type int or size 1.");
+    readMeshIface->report_error("ReadNCDF:: Word size didn't have type int or size 1.");
     return MB_FAILURE;
   }
   IO_WORD_SIZE = temp_att->as_int(0);
@@ -368,7 +368,7 @@
     // exodus version
   temp_att = ncFile->get_att("version");
   if (!temp_att->is_valid() || temp_att->type() != ncFloat || temp_att->num_vals() != 1) {
-    readMeshIface->report_error("MBCN:: Version didn't have type float or size 1.");
+    readMeshIface->report_error("ReadNCDF:: Version didn't have type float or size 1.");
     return MB_FAILURE;
   }
   delete temp_att;
@@ -423,22 +423,22 @@
   NcBool status;
   NcVar *coords = ncFile->get_var("coord");
   if (NULL == coords || !coords->is_valid()) {
-    readMeshIface->report_error("MBCN:: Problem getting coords variable.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting coords variable.");
     return MB_FAILURE;
   }
   status = coords->get(arrays[0], 1, numberNodes_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting x coord array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting x coord array.");
     return MB_FAILURE;
   }
   status = coords->set_cur(1, 0);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting y coord array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting y coord array.");
     return MB_FAILURE;
   }
   status = coords->get(arrays[1], 1, numberNodes_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting y coord array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting y coord array.");
     return MB_FAILURE;
   }
   if (numberDimensions_loading == 2 )
@@ -450,12 +450,12 @@
   else {
     status = coords->set_cur(2, 0);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting z coord array.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting z coord array.");
       return MB_FAILURE;
     }
     status = coords->get(arrays[2], 1, numberNodes_loading);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting z coord array.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting z coord array.");
       return MB_FAILURE;
     }
   }
@@ -482,12 +482,12 @@
   std::vector<int> block_ids(numberElementBlocks_loading);
   NcVar *nc_block_ids = ncFile->get_var("eb_prop1");
   if (NULL == nc_block_ids || !nc_block_ids->is_valid()) {
-    readMeshIface->report_error("MBCN:: Problem getting eb_prop1 variable.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting eb_prop1 variable.");
     return MB_FAILURE;
   }
   NcBool status = nc_block_ids->get(&block_ids[0], numberElementBlocks_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting element block id vector.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting element block id vector.");
     return MB_FAILURE;
   }
 
@@ -599,12 +599,12 @@
     INS_ID(temp_string, "connect%d", block_seq_id);
     temp_var = ncFile->get_var(temp_string);
     if (NULL == temp_var || !temp_var->is_valid()) {
-      readMeshIface->report_error("MBCN:: Problem getting connect variable.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting connect variable.");
       return MB_FAILURE;
     }
     temp_att = temp_var->get_att("elem_type");
     if (NULL == temp_att || !temp_att->is_valid()) {
-      readMeshIface->report_error("MBCN:: Problem getting elem type attribute.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting elem type attribute.");
       delete temp_att;
       return MB_FAILURE;
     }
@@ -647,7 +647,7 @@
         return MB_FAILURE;
         
       int mid_nodes[4];
-      MBCN::HasMidNodes( mb_type, verts_per_element, mid_nodes );
+      CN::HasMidNodes( mb_type, verts_per_element, mid_nodes );
       if( mdbImpl->tag_set_data( mHasMidNodesTag, &ms_handle, 1, mid_nodes ) != MB_SUCCESS )
         return MB_FAILURE;
       
@@ -661,7 +661,7 @@
     // 1/2 if sizeof(EntityHandle) == 64 bits.
     NcBool status = temp_var->get(tmp_ptr, this_it->numElements, verts_per_element);
     if (status == 0) {
-      readMeshIface->report_error("MBCN:: Problem getting connectivity.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting connectivity.");
       return MB_FAILURE;
     }
       // Convert from exodus indices to vertex handles.
@@ -793,12 +793,12 @@
     // read in the nodeset ids
   NcVar *temp_var = ncFile->get_var("ns_prop1");
   if (NULL == temp_var || !temp_var->is_valid()) {
-    readMeshIface->report_error("MBCN:: Problem getting ns_prop1 variable.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting ns_prop1 variable.");
     return MB_FAILURE;
   }
   NcBool status = temp_var->get(&id_array[0], numberNodeSets_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting nodeset id vector.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting nodeset id vector.");
     return MB_FAILURE;
   }
 
@@ -827,13 +827,13 @@
       INS_ID(temp_string, "dist_fact_ns%d", i+1);
       temp_var = ncFile->get_var(temp_string);
       if (NULL == temp_var || !temp_var->is_valid()) {
-        readMeshIface->report_error("MBCN:: Problem getting dist fact variable.");
+        readMeshIface->report_error("ReadNCDF:: Problem getting dist fact variable.");
         return MB_FAILURE;
       }
       NcBool status = temp_var->get(&(temp_dist_factor_vector[0]),
                                     number_dist_factors_in_set);
       if (0 == status) {
-        readMeshIface->report_error("MBCN:: Problem getting dist factors.");
+        readMeshIface->report_error("ReadNCDF:: Problem getting dist factors.");
         return MB_FAILURE;
       }
     }
@@ -847,13 +847,13 @@
     INS_ID(temp_string, "node_ns%d", i+1);
     temp_var = ncFile->get_var(temp_string);
     if (NULL == temp_var || !temp_var->is_valid()) {
-      readMeshIface->report_error("MBCN:: Problem getting nodeset node variable.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting nodeset node variable.");
       return MB_FAILURE;
     }
     NcBool status = temp_var->get(&node_handles[0],
                                   number_nodes_in_set);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting nodeset nodes data.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting nodeset nodes data.");
       return MB_FAILURE;
     }
 
@@ -981,12 +981,12 @@
   std::vector<int> id_array(numberSideSets_loading);
   NcVar *temp_var = ncFile->get_var("ss_prop1");
   if (NULL == temp_var || !temp_var->is_valid()) {
-    readMeshIface->report_error("MBCN:: Problem getting ss_prop1 variable.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting ss_prop1 variable.");
     return MB_FAILURE;
   }
   NcBool status = temp_var->get(&id_array[0], numberSideSets_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting sideset id vector.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting sideset id vector.");
     return MB_FAILURE;
   }
 
@@ -1022,26 +1022,26 @@
     INS_ID(temp_string, "side_ss%d", i+1);
     temp_var = ncFile->get_var(temp_string);
     if (NULL == temp_var || !temp_var->is_valid()) {
-      readMeshIface->report_error("MBCN:: Problem getting sideset side variable.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting sideset side variable.");
       return MB_FAILURE;
     }
     NcBool status = temp_var->get(&side_list[0],
                                   number_sides_in_set);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting sideset sides data.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting sideset sides data.");
       return MB_FAILURE;
     }
 
     INS_ID(temp_string, "elem_ss%d", i+1);
     temp_var = ncFile->get_var(temp_string);
     if (NULL == temp_var || !temp_var->is_valid()) {
-      readMeshIface->report_error("MBCN:: Problem getting sideset elem variable.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting sideset elem variable.");
       return MB_FAILURE;
     }
     status = temp_var->get(&element_list[0],
                            number_sides_in_set);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting sideset elems data.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting sideset elems data.");
       return MB_FAILURE;
     }
 
@@ -1171,13 +1171,13 @@
     INS_ID(temp_string, "dist_fact_ss%d", ss_seq_id);
     temp_var = ncFile->get_var(temp_string);
     if (NULL == temp_var || !temp_var->is_valid()) {
-      readMeshIface->report_error("MBCN:: Problem getting dist fact variable.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting dist fact variable.");
       return MB_FAILURE;
     }
     NcBool status = temp_var->get(&(temp_dist_factor_vector[0]),
                                   num_dist_factors);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting dist factors.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting dist factors.");
       return MB_FAILURE;
     }
   }
@@ -1209,7 +1209,7 @@
       if( mdbImpl->get_connectivity( ent_handle, nodes, num_elem_nodes ) != MB_SUCCESS )
         return MB_FAILURE;
 
-      MBCN::SubEntityNodeIndices( type, num_elem_nodes, 2, side_num, subtype, num_side_nodes, side_node_idx );
+      CN::SubEntityNodeIndices( type, num_elem_nodes, 2, side_num, subtype, num_side_nodes, side_node_idx );
       if (num_side_nodes <= 0)
         return MB_FAILURE;
       
@@ -1236,7 +1236,7 @@
       if( mdbImpl->get_connectivity( ent_handle, nodes, num_elem_nodes ) != MB_SUCCESS )
         return MB_FAILURE;
 
-      MBCN::SubEntityNodeIndices( type, num_elem_nodes, 2, side_num, subtype, num_side_nodes, side_node_idx );
+      CN::SubEntityNodeIndices( type, num_elem_nodes, 2, side_num, subtype, num_side_nodes, side_node_idx );
       if (num_side_nodes <= 0)
         return MB_FAILURE;
       
@@ -1293,7 +1293,7 @@
         if( mdbImpl->get_connectivity( ent_handle, nodes, num_elem_nodes ) != MB_SUCCESS )
           return MB_FAILURE;
 
-        MBCN::SubEntityNodeIndices( type, num_elem_nodes, 1, side_num-2, subtype, num_side_nodes, side_node_idx );
+        CN::SubEntityNodeIndices( type, num_elem_nodes, 1, side_num-2, subtype, num_side_nodes, side_node_idx );
         if (num_side_nodes <= 0)
           return MB_FAILURE;
 
@@ -1319,7 +1319,7 @@
       if( mdbImpl->get_connectivity( ent_handle, nodes, num_elem_nodes ) != MB_SUCCESS )
         return MB_FAILURE;
 
-      MBCN::SubEntityNodeIndices( type, num_elem_nodes, 1, side_num, subtype, num_side_nodes, side_node_idx );
+      CN::SubEntityNodeIndices( type, num_elem_nodes, 1, side_num, subtype, num_side_nodes, side_node_idx );
       if (num_side_nodes <= 0)
         return MB_FAILURE;
       
@@ -1362,7 +1362,7 @@
         if( mdbImpl->get_connectivity( ent_handle, nodes, num_elem_nodes ) != MB_SUCCESS )
           return MB_FAILURE;
 
-        MBCN::SubEntityNodeIndices( type, num_elem_nodes, 1, side_num-side_offset, subtype, num_side_nodes, side_node_idx );
+        CN::SubEntityNodeIndices( type, num_elem_nodes, 1, side_num-side_offset, subtype, num_side_nodes, side_node_idx );
         if (num_side_nodes <= 0)
           return MB_FAILURE;
 
@@ -1393,7 +1393,7 @@
 {
   // get adjacent entities
   ErrorCode error = MB_SUCCESS;
-  int to_dim = MBCN::Dimension(type);
+  int to_dim = CN::Dimension(type);
   std::vector<EntityHandle> adj_ent;
   mdbImpl->get_adjacencies(&(connectivity[0]), 1, to_dim, false, adj_ent);
 
@@ -1567,18 +1567,18 @@
 {
   NcVar *temp_var = ncFile->get_var("qa_records");
   if (NULL == temp_var || !temp_var->is_valid()) {
-    readMeshIface->report_error("MBCN:: Problem getting qa record variable.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting qa record variable.");
     return MB_FAILURE;
   }
   NcBool status = temp_var->set_cur(record_number, record_position);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem setting current record number variable position.");
+    readMeshIface->report_error("ReadNCDF:: Problem setting current record number variable position.");
     return MB_FAILURE;
   }
   status = temp_var->get(temp_string,
                          1, 1, max_str_length);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting qa record string.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting qa record string.");
     return MB_FAILURE;
   }
     // get the variable id in the exodus file
@@ -1627,7 +1627,7 @@
   rval = opts.get_str_option("tdata", s ); 
   if(MB_SUCCESS != rval)
   {
-    readMeshIface->report_error("MBCN:: Problem reading file options.");
+    readMeshIface->report_error("ReadNCDF:: Problem reading file options.");
     return MB_FAILURE;
   }
   std::vector< std::string > tokens;
@@ -1672,7 +1672,7 @@
   ncFile = new NcFile(exodus_file_name);
   if (NULL == ncFile || !ncFile->is_valid())
   {
-    readMeshIface->report_error("MBCN:: problem opening Netcdf/Exodus II file %s",exodus_file_name);
+    readMeshIface->report_error("ReadNCDF:: problem opening Netcdf/Exodus II file %s",exodus_file_name);
     return MB_FILE_DOES_NOT_EXIST;
   }
     // delete file when we return from this function
@@ -1727,40 +1727,40 @@
   if (NULL == coordx || !coordx->is_valid() ||
       NULL == coordy || !coordy->is_valid() ||
       (numberDimensions_loading == 3 && (NULL == coordz || !coordz->is_valid())) ) {
-     readMeshIface->report_error("MBCN:: Problem getting coords variable.");
+     readMeshIface->report_error("ReadNCDF:: Problem getting coords variable.");
      return MB_FAILURE;
   }
 
   NcBool status = coordx->set_cur(time_step-1, 0);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting x deformation array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting x deformation array.");
     return MB_FAILURE;
   }
   status = coordx->get(&deformed_arrays[0][0], 1,  numberNodes_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting x deformation array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting x deformation array.");
     return MB_FAILURE;
   }
   status = coordy->set_cur(time_step-1, 0);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting y deformation array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting y deformation array.");
     return MB_FAILURE;
   }
   status = coordy->get(&deformed_arrays[1][0],  1, numberNodes_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting y deformation array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting y deformation array.");
     return MB_FAILURE;
   } 
   if (numberDimensions_loading == 3 )
   {
     status = coordz->set_cur(time_step-1, 0);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting z deformation array.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting z deformation array.");
       return MB_FAILURE;
     }
     status = coordz->get(&deformed_arrays[2][0], 1,numberNodes_loading);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting z deformation array.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting z deformation array.");
       return MB_FAILURE;
     }
   }
@@ -1773,25 +1773,25 @@
   if (NULL == coord1 || !coord1->is_valid() ||
       NULL == coord2 || !coord2->is_valid() ||
       (numberDimensions_loading == 3 && (NULL == coord3 || !coord3->is_valid())) ) {
-    readMeshIface->report_error("MBCN:: Problem getting coords variable.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting coords variable.");
     return MB_FAILURE;
    }
 
   status = coord1->get(&orig_coords[0][0],  numberNodes_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting x coord array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting x coord array.");
     return MB_FAILURE;
   }
   status = coord2->get(&orig_coords[1][0],  numberNodes_loading);
   if (0 == status) {
-    readMeshIface->report_error("MBCN:: Problem getting y coord array.");
+    readMeshIface->report_error("ReadNCDF:: Problem getting y coord array.");
     return MB_FAILURE;
   }
   if (numberDimensions_loading == 3 )
   {
     status = coord3->get(&orig_coords[2][0],  numberNodes_loading);
     if (0 == status) {
-      readMeshIface->report_error("MBCN:: Problem getting z coord array.");
+      readMeshIface->report_error("ReadNCDF:: Problem getting z coord array.");
       return MB_FAILURE;
     }
   }
@@ -2022,13 +2022,13 @@
     temp_string += "\0";
     temp_var = ncFile->get_var(temp_string.c_str());
     if (NULL == temp_var || !temp_var->is_valid()) {
-      std::cout << "MBCN: Problem getting connect variable." << std::endl;
+      std::cout << "ReadNCDF: Problem getting connect variable." << std::endl;
       return MB_FAILURE;
     }
     // the element type is an attribute of the connectivity variable
     NcAtt *temp_att = temp_var->get_att("elem_type");
     if (NULL == temp_att || !temp_att->is_valid()) {
-      std::cout << "MBCN:: Problem getting elem type attribute." << std::endl;
+      std::cout << "ReadNCDF:: Problem getting elem type attribute." << std::endl;
       return MB_FAILURE;
     }
     // Get the MOAB element type from the Exodus attribute type
@@ -2046,7 +2046,7 @@
     int exo_conn[i->numElements][nodes_per_element];
     NcBool status = temp_var->get( &exo_conn[0][0], i->numElements, nodes_per_element);
     if (0 == status) {
-      std::cout << "MBCN: Problem getting connectivity." << std::endl;
+      std::cout << "ReadNCDF: Problem getting connectivity." << std::endl;
       return MB_FAILURE;
     }
 
@@ -2118,7 +2118,7 @@
           }
 
           // get the cub_file_set element with the same nodes
-          int to_dim = MBCN::Dimension(mb_type);
+          int to_dim = CN::Dimension(mb_type);
           rval = mdbImpl->get_adjacencies( cub_nodes, to_dim, false, cub_elem);
           if(MB_SUCCESS != rval) return rval;
 

Modified: MOAB/trunk/src/io/ReadSms.cpp
===================================================================
--- MOAB/trunk/src/io/ReadSms.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/ReadSms.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -27,7 +27,7 @@
 #include "moab/Range.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/MBParallelConventions.h"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 #include <errno.h>
 #include <string.h>
@@ -409,7 +409,7 @@
         
       // make the element
     result = mdbImpl->create_element(etype, &bound_verts[0], 
-                                     MBCN::VerticesPerEntity(etype), new_handle);
+                                     CN::VerticesPerEntity(etype), new_handle);
     CHECK("Failed to create region.");
     if (MB_SUCCESS != result) return result;
 

Modified: MOAB/trunk/src/io/Tqdcfr.cpp
===================================================================
--- MOAB/trunk/src/io/Tqdcfr.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/Tqdcfr.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -28,7 +28,7 @@
 #include "moab/ReadUtilIface.hpp"
 #include "moab/GeomTopoTool.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 #include "moab/HigherOrderFactory.hpp"
 #include "exodus_order.h"
@@ -89,9 +89,9 @@
   8, 8, 9, 20, 27, 12, // hexes (incl. hexshell at end)
   0};
 
-// Define node-order map from Cubit to MBCN.  Table is indexed
+// Define node-order map from Cubit to CN.  Table is indexed
 // by EntityType and number of nodes.  Entries are NULL if Cubit order
-// is the same as MBCN ordering.  Non-null entries contain the
+// is the same as CN ordering.  Non-null entries contain the
 // index into the MOAB node order for the corresponding vertex
 // in the Cubit connectivity list.  Thus for a 27-node hex:
 // moab_conn[ cub_hex27_order[i] ] = cubit_conn[ i ];
@@ -790,7 +790,7 @@
     // the mid-element node if there is one.  Need to reconsturct additional
     // connectivity entries from mid-nodes of adjacent lower-order entities.
   int node_per_elem = cub_elem_num_verts[blockh->blockElemType];
-  if (MBCN::VerticesPerEntity(blockh->blockEntityType) == node_per_elem)
+  if (CN::VerticesPerEntity(blockh->blockEntityType) == node_per_elem)
     return MB_SUCCESS;
   
     // Can't use Interface::convert_entities because block could contain
@@ -802,7 +802,7 @@
   mdbImpl->get_entities_by_type( blockh->setHandle, blockh->blockEntityType, entities, true );
   
   int mid_nodes[4];
-  MBCN::HasMidNodes( blockh->blockEntityType, node_per_elem, mid_nodes );
+  CN::HasMidNodes( blockh->blockEntityType, node_per_elem, mid_nodes );
   HigherOrderFactory ho_fact( dynamic_cast<Core*>(mdbImpl), 0 );
   return ho_fact.convert( entities, !!mid_nodes[1], !!mid_nodes[2], !!mid_nodes[3] );
 }
@@ -1009,7 +1009,7 @@
         if (mdbImpl->type_from_handle(this_ent) != MBMAXTYPE) ent_list->push_back(this_ent);
       }
       else {
-        std::cout << "Warning: didn't find " << MBCN::EntityTypeName(this_ent_type) 
+        std::cout << "Warning: didn't find " << CN::EntityTypeName(this_ent_type) 
                   << " " << *vit << std::endl;
       }
     }
@@ -1216,10 +1216,10 @@
 
       // get MB element type from cub file's 
     EntityType elem_type = mp_type_to_mb_type[int_type];
-    max_dim = (max_dim < MBCN::Dimension(elem_type) ? MBCN::Dimension(elem_type) : max_dim);
+    max_dim = (max_dim < CN::Dimension(elem_type) ? CN::Dimension(elem_type) : max_dim);
 
     if (debug)
-      std::cout << "type " << MBCN::EntityTypeName(elem_type) << ":";
+      std::cout << "type " << CN::EntityTypeName(elem_type) << ":";
 
     const int* node_order = cub_elem_order_map[elem_type][nodes_per_elem];
     if (!node_order)
@@ -1568,7 +1568,7 @@
       int num_elem = instance->uint_buf[2];
       EntityType elem_type = mp_type_to_mb_type[int_type];
       geom_headers[i].maxDim = std::max(geom_headers[i].maxDim, 
-                                        (int)MBCN::Dimension(elem_type));
+                                        (int)CN::Dimension(elem_type));
       if (j < geom_headers[i].elemTypeCt-1) 
         instance->FREADI(num_elem + num_elem*nodes_per_elem);
     }
@@ -1689,7 +1689,7 @@
       // accordingly
     int num_verts = cub_elem_num_verts[block_headers[i].blockElemType];
     block_headers[i].blockEntityType = block_type_to_mb_type[block_headers[i].blockElemType];
-    if (num_verts != MBCN::VerticesPerEntity(block_headers[i].blockEntityType)) {
+    if (num_verts != CN::VerticesPerEntity(block_headers[i].blockEntityType)) {
         // not a linear element; try to find hasMidNodes values
       int has_mid_nodes[] = {0, 0, 0, 0};
       if (0 == instance->hasMidNodesTag) {
@@ -1698,7 +1698,7 @@
         if (MB_SUCCESS != result && MB_ALREADY_ALLOCATED != result) return result;
       }
       
-      MBCN::HasMidNodes(block_headers[i].blockEntityType, num_verts, has_mid_nodes);
+      CN::HasMidNodes(block_headers[i].blockEntityType, num_verts, has_mid_nodes);
 
         // now set the tag on this set
       result = instance->mdbImpl->tag_set_data(instance->hasMidNodesTag, &block_headers[i].setHandle, 1,

Modified: MOAB/trunk/src/io/WriteAns.cpp
===================================================================
--- MOAB/trunk/src/io/WriteAns.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteAns.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -37,7 +37,6 @@
 
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
 #include "assert.h"
 #include "Internals.hpp"
 #include "ExoIIUtil.hpp"

Modified: MOAB/trunk/src/io/WriteCCMIO.cpp
===================================================================
--- MOAB/trunk/src/io/WriteCCMIO.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteCCMIO.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -38,7 +38,7 @@
 
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "assert.h"
 #include "Internals.hpp"
 #include "ExoIIUtil.hpp"
@@ -375,17 +375,17 @@
     Range::iterator entity_iter = dummy_range.end();
     entity_iter = dummy_range.end();
     entity_iter--;
-    int this_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
+    int this_dim = CN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
     entity_iter = dummy_range.begin();
     while (entity_iter != dummy_range.end() &&
-           MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
+           CN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
       entity_iter++;
     
     if (entity_iter != dummy_range.end())
       std::copy(entity_iter, dummy_range.end(), range_inserter(*(matset_data.elements)));
 
     assert(matset_data.elements->begin() == matset_data.elements->end() ||
-           MBCN::Dimension(TYPE_FROM_HANDLE(*(matset_data.elements->begin()))) == this_dim);
+           CN::Dimension(TYPE_FROM_HANDLE(*(matset_data.elements->begin()))) == this_dim);
     
       // get the matset's id
     if(mbImpl->tag_get_data(mMaterialSetTag, &(*vector_iter), 1, &id) != MB_SUCCESS ) {
@@ -410,7 +410,7 @@
       return MB_FAILURE;
     }
 
-    int dimension = MBCN::Dimension(entity_type);
+    int dimension = CN::Dimension(entity_type);
 
     if( dimension > highest_dimension_of_element_matsets )
       highest_dimension_of_element_matsets = dimension;
@@ -587,7 +587,7 @@
     else //then "side" is probably a quad/tri on a hex/tet mesh
     {
       std::vector<EntityHandle> parents;
-      int dimension = MBCN::Dimension( TYPE_FROM_HANDLE(*iter));
+      int dimension = CN::Dimension( TYPE_FROM_HANDLE(*iter));
 
         //get the adjacent parent element of "side"
       if( mbImpl->get_adjacencies( &(*iter), 1, dimension+1, false, parents) != MB_SUCCESS ) {
@@ -802,7 +802,7 @@
   std::vector<EntityHandle> tmp_face_cells, storage;
   std::vector<int> iface_connect, iface_cells;
   std::vector<int> eface_connect, eface_cells;
-  EntityHandle tmp_connect[MBCN::MAX_NODES_PER_ELEMENT]; // tmp connect vector
+  EntityHandle tmp_connect[CN::MAX_NODES_PER_ELEMENT]; // tmp connect vector
   const EntityHandle *connectc; int num_connectc; // cell connectivity
   const EntityHandle *connectf; int num_connectf; // face connectivity
   i = 0;
@@ -828,16 +828,16 @@
       // if polyh, write faces directly
     bool is_polyh = (MBPOLYHEDRON == etype);
 
-    int num_faces = MBCN::NumSubEntities(etype, 2);
-      // for each face (from MBCN)
+    int num_faces = CN::NumSubEntities(etype, 2);
+      // for each face (from CN)
     for (int f = 0; f < num_faces; f++) {
         // if this face marked, skip
       if (!is_polyh && ((markt >> f) & 0x1)) continue;
         
         // get face connect
       if (!is_polyh) {
-          // (from MBCN)
-        MBCN::SubEntityConn(connectc, etype, 2, f, tmp_connect, num_connectf);
+          // (from CN)
+        CN::SubEntityConn(connectc, etype, 2, f, tmp_connect, num_connectf);
         connectf = tmp_connect;
       }
       else {
@@ -861,7 +861,7 @@
       if (!is_polyh && is_internal) {
           // make sure 1st is forward sense
         int side_num, sense, offset;
-        MBCN::SideNumber(etype, connectc, connectf, num_connectf,
+        CN::SideNumber(etype, connectc, connectf, num_connectf,
                          2, side_num, sense, offset);
         if (sense == 1 && tmp_face_cells[0] != *rit) {
           assert(2 == tmp_face_cells.size());
@@ -896,7 +896,7 @@
         }
           // get side number
         int side_num, sense, offset;
-        MBCN::SideNumber(TYPE_FROM_HANDLE(other_cell), connecto, connectf, num_connectf,
+        CN::SideNumber(TYPE_FROM_HANDLE(other_cell), connecto, connectf, num_connectf,
                          2, side_num, sense, offset);
           // set mark for this face
         short int tmp_mark, tmp_mark2;
@@ -1004,9 +1004,9 @@
     // need to step forward on list until we reach the right dimension
   Range::iterator dum_it = neuset_elems.end();
   dum_it--;
-  int target_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it));
+  int target_dim = CN::Dimension(TYPE_FROM_HANDLE(*dum_it));
   dum_it = neuset_elems.begin();
-  while (target_dim != MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
+  while (target_dim != CN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
          dum_it != neuset_elems.end()) 
     dum_it++;
 

Modified: MOAB/trunk/src/io/WriteGMV.cpp
===================================================================
--- MOAB/trunk/src/io/WriteGMV.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteGMV.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -27,7 +27,7 @@
 #include "moab/Interface.hpp"
 #include "Internals.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/WriteUtilIface.hpp"
 #include <fstream>
@@ -192,8 +192,8 @@
     if (MB_SUCCESS != result) return result;
   }
   else {
-    for (otype = MBCN::TypeDimensionMap[user_dimension].first;
-         otype <= MBCN::TypeDimensionMap[user_dimension].second; otype++) {
+    for (otype = CN::TypeDimensionMap[user_dimension].first;
+         otype <= CN::TypeDimensionMap[user_dimension].second; otype++) {
       if (otype == MBPOLYGON || otype == MBPOLYHEDRON) continue;
       dum_range.clear();
       result = mbImpl->get_entities_by_type(output_set, otype, dum_range, true);
@@ -248,8 +248,8 @@
     
     ofile << "cells " << elements.size() << std::endl;
   
-    for (EntityType otype = MBCN::TypeDimensionMap[user_dimension].first;
-         otype <= MBCN::TypeDimensionMap[user_dimension].second; otype++) {
+    for (EntityType otype = CN::TypeDimensionMap[user_dimension].first;
+         otype <= CN::TypeDimensionMap[user_dimension].second; otype++) {
 
       if (otype == MBPOLYGON || otype == MBPOLYHEDRON) continue;
       
@@ -270,7 +270,7 @@
       std::copy(lower, upper, range_inserter(sub_range));
 
         // make sure the connectivity array is big enough
-      int verts_per = MBCN::VerticesPerEntity(otype);
+      int verts_per = CN::VerticesPerEntity(otype);
       if (connect.size() < verts_per*sub_range.size())
         connect.reserve(verts_per*sub_range.size());
     

Modified: MOAB/trunk/src/io/WriteGmsh.cpp
===================================================================
--- MOAB/trunk/src/io/WriteGmsh.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteGmsh.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,5 +1,5 @@
 #include "WriteGmsh.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/MBParallelConventions.h"
 #include "moab/Interface.hpp"
@@ -190,7 +190,7 @@
     {
       mWriteIface->report_error( "Gmem file format does not support element "
                                  " of type %s with %d vertices.\n",
-                                 MBCN::EntityTypeName( type ), num_vtx );
+                                 CN::EntityTypeName( type ), num_vtx );
       return MB_FILE_WRITE_ERROR;
     }
   }

Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteHDF5.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -50,7 +50,7 @@
 #include "moab/Interface.hpp"
 #include "Internals.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "WriteHDF5.hpp"
 #include "moab/WriteUtilIface.hpp"
 #include "FileOptions.hpp"
@@ -252,7 +252,7 @@
     const EntityHandle n = pi->second - pi->first + 1;
 #ifdef DEBUG
     printf( "Assigning %s %lu to %lu to file IDs [%lu,%lu]\n",
-      MBCN::EntityTypeName(TYPE_FROM_HANDLE(pi->first)),
+      CN::EntityTypeName(TYPE_FROM_HANDLE(pi->first)),
       (unsigned long)(ID_FROM_HANDLE(pi->first)),
       (unsigned long)(ID_FROM_HANDLE(pi->first)+n-1),
       (unsigned long)id,
@@ -274,7 +274,7 @@
     case MBENTITYSET:
       return mhdf_set_type_handle();
     default:
-      sprintf( buffer, "%s%d", MBCN::EntityTypeName( type ), num_nodes );
+      sprintf( buffer, "%s%d", CN::EntityTypeName( type ), num_nodes );
       return buffer;
   }
 }
@@ -602,7 +602,7 @@
   {
     ExportSet set;
     set.max_num_ents = set.max_num_adjs = 0;
-    const int dim = MBCN::Dimension(type);
+    const int dim = CN::Dimension(type);
 
       // Group entities by connectivity length
     bins.clear();
@@ -2280,7 +2280,7 @@
   const char* type_names[MBMAXTYPE];
   memset( type_names, 0, MBMAXTYPE * sizeof(char*) );
   for (EntityType i = MBEDGE; i < MBENTITYSET; ++i)
-    type_names[i] = MBCN::EntityTypeName( i );
+    type_names[i] = CN::EntityTypeName( i );
  
     // Create the file
   filePtr = mhdf_createFile( filename, overwrite, type_names, MBMAXTYPE, &status );
@@ -2442,7 +2442,7 @@
   mhdf_Status status;
   hid_t handle;
   
-  sprintf( name, "%s%d", MBCN::EntityTypeName(mb_type), nodes_per_elem );
+  sprintf( name, "%s%d", CN::EntityTypeName(mb_type), nodes_per_elem );
   mhdf_addElement( filePtr, name, mb_type, &status );
   CHK_MHDF_ERR_0(status);
   
@@ -2833,13 +2833,13 @@
 {
   RangeMap<EntityHandle,id_t>::const_iterator i;
   for (i = idMap.begin(); i != idMap.end(); ++i) {
-    const char* n1 = MBCN::EntityTypeName(TYPE_FROM_HANDLE(i->begin));
+    const char* n1 = CN::EntityTypeName(TYPE_FROM_HANDLE(i->begin));
     EntityID id = ID_FROM_HANDLE(i->begin);
     if (i->count == 1) {
       s << pfx << n1 << " " << id << " -> " << i->value << std::endl;
     }
     else {
-      const char* n2 = MBCN::EntityTypeName(TYPE_FROM_HANDLE(i->begin + i->count - 1));
+      const char* n2 = CN::EntityTypeName(TYPE_FROM_HANDLE(i->begin + i->count - 1));
       if (n1 == n2) {
         s << pfx << n1 << " " << id << "-" << id + i->count-1
           << " -> " << i->value << "-" << i->value + i->count-1 << std::endl;

Modified: MOAB/trunk/src/io/WriteNCDF.cpp
===================================================================
--- MOAB/trunk/src/io/WriteNCDF.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteNCDF.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -39,7 +39,7 @@
 
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "Internals.hpp"
 #include "ExoIIUtil.hpp"
@@ -380,17 +380,17 @@
     Range::iterator entity_iter = dummy_range.end();
     entity_iter = dummy_range.end();
     entity_iter--;
-    int this_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
+    int this_dim = CN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
     entity_iter = dummy_range.begin();
     while (entity_iter != dummy_range.end() &&
-           MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
+           CN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
       entity_iter++;
     
     if (entity_iter != dummy_range.end())
       std::copy(entity_iter, dummy_range.end(), range_inserter(block_data.elements));
 
     assert(block_data.elements.begin() == block_data.elements.end() ||
-           MBCN::Dimension(TYPE_FROM_HANDLE(*(block_data.elements.begin()))) == this_dim);
+           CN::Dimension(TYPE_FROM_HANDLE(*(block_data.elements.begin()))) == this_dim);
     
     // end of -- wait a minute, we are doing some filtering here that doesn't make sense at this level CJS
    
@@ -424,7 +424,7 @@
     else if(entity_type == MBEDGE)
       dimension = 2;
     else
-      dimension = MBCN::Dimension(entity_type);
+      dimension = CN::Dimension(entity_type);
 
     if( dimension > highest_dimension_of_element_blocks )
       highest_dimension_of_element_blocks = dimension;
@@ -662,7 +662,7 @@
     else //then "side" is probably a quad/tri on a hex/tet mesh
     {
       std::vector<EntityHandle> parents;
-      int dimension = MBCN::Dimension( TYPE_FROM_HANDLE(*iter));
+      int dimension = CN::Dimension( TYPE_FROM_HANDLE(*iter));
 
         //get the adjacent parent element of "side"
       if( mdbImpl->get_adjacencies( &(*iter), 1, dimension+1, false, parents) != MB_SUCCESS ) {
@@ -702,7 +702,7 @@
     if( sideset_data.elements.size() != 0 )
     {
         // distribution factors
-      int num_nodes = MBCN::VerticesPerEntity(TYPE_FROM_HANDLE(*iter));
+      int num_nodes = CN::VerticesPerEntity(TYPE_FROM_HANDLE(*iter));
       if( has_dist_factors )
       {
         std::copy(dist_fac_iter, dist_fac_iter + num_nodes, 
@@ -962,7 +962,7 @@
       return result;
     }
     
-    // if necessary, convert from EXODUS to MBCN node order
+    // if necessary, convert from EXODUS to CN node order
     const EntityType elem_type = ExoIIUtil::ExoIIElementMBEntity[block.element_type];
     assert( block.elements.all_of_type( elem_type ) );
     const int* reorder = exodus_elem_order_map[elem_type][block.number_nodes_per_element];
@@ -1928,9 +1928,9 @@
     // need to step forward on list until we reach the right dimension
   Range::iterator dum_it = ss_elems.end();
   dum_it--;
-  int target_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it));
+  int target_dim = CN::Dimension(TYPE_FROM_HANDLE(*dum_it));
   dum_it = ss_elems.begin();
-  while (target_dim != MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
+  while (target_dim != CN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
          dum_it != ss_elems.end()) 
     dum_it++;
 

Modified: MOAB/trunk/src/io/WriteSLAC.cpp
===================================================================
--- MOAB/trunk/src/io/WriteSLAC.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteSLAC.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -41,7 +41,7 @@
 #include "netcdf.hh"
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "Internals.hpp"
 #include "ExoIIUtil.hpp"
 #include "moab/MBTagConventions.hpp"
@@ -274,17 +274,17 @@
     Range::iterator entity_iter = dummy_range.end();
     entity_iter = dummy_range.end();
     entity_iter--;
-    int this_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
+    int this_dim = CN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
     entity_iter = dummy_range.begin();
     while (entity_iter != dummy_range.end() &&
-           MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
+           CN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
       entity_iter++;
     
     if (entity_iter != dummy_range.end())
       std::copy(entity_iter, dummy_range.end(), range_inserter(*(matset_data.elements)));
 
     assert(matset_data.elements->begin() == matset_data.elements->end() ||
-           MBCN::Dimension(TYPE_FROM_HANDLE(*(matset_data.elements->begin()))) == this_dim);
+           CN::Dimension(TYPE_FROM_HANDLE(*(matset_data.elements->begin()))) == this_dim);
     
     // get the matset's id
     if(mbImpl->tag_get_data(mMaterialSetTag, &(*vector_iter), 1, &id) != MB_SUCCESS ) {
@@ -315,7 +315,7 @@
     else if(entity_type == MBEDGE)
       dimension = 2;
     else
-      dimension = MBCN::Dimension(entity_type);
+      dimension = CN::Dimension(entity_type);
 
     if( dimension > highest_dimension_of_element_matsets )
       highest_dimension_of_element_matsets = dimension;
@@ -493,7 +493,7 @@
     else //then "side" is probably a quad/tri on a hex/tet mesh
     {
       std::vector<EntityHandle> parents;
-      int dimension = MBCN::Dimension( TYPE_FROM_HANDLE(*iter));
+      int dimension = CN::Dimension( TYPE_FROM_HANDLE(*iter));
 
         //get the adjacent parent element of "side"
       if( mbImpl->get_adjacencies( &(*iter), 1, dimension+1, false, parents) != MB_SUCCESS ) {
@@ -653,7 +653,7 @@
       mesh_info.num_int_tets += matset.elements->size();
     else {
       std::cout << "WriteSLAC doesn't support elements of type " 
-                << MBCN::EntityTypeName(matset.moab_type) << std::endl;
+                << CN::EntityTypeName(matset.moab_type) << std::endl;
       continue;
     }
     
@@ -1050,9 +1050,9 @@
     // need to step forward on list until we reach the right dimension
   Range::iterator dum_it = ss_elems.end();
   dum_it--;
-  int target_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it));
+  int target_dim = CN::Dimension(TYPE_FROM_HANDLE(*dum_it));
   dum_it = ss_elems.begin();
-  while (target_dim != MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
+  while (target_dim != CN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
          dum_it != ss_elems.end()) 
     dum_it++;
 

Modified: MOAB/trunk/src/io/WriteSTL.cpp
===================================================================
--- MOAB/trunk/src/io/WriteSTL.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteSTL.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -21,7 +21,7 @@
 
 
 #include "WriteSTL.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
 #include "moab/WriteUtilIface.hpp"

Modified: MOAB/trunk/src/io/WriteSmf.cpp
===================================================================
--- MOAB/trunk/src/io/WriteSmf.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteSmf.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -36,7 +36,7 @@
 
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/WriteUtilIface.hpp"
 #include "Internals.hpp"

Modified: MOAB/trunk/src/io/WriteTemplate.cpp
===================================================================
--- MOAB/trunk/src/io/WriteTemplate.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteTemplate.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -36,7 +36,7 @@
 
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "assert.h"
 #include "Internals.hpp"
 #include "ExoIIUtil.hpp"
@@ -263,17 +263,17 @@
     Range::iterator entity_iter = dummy_range.end();
     entity_iter = dummy_range.end();
     entity_iter--;
-    int this_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
+    int this_dim = CN::Dimension(TYPE_FROM_HANDLE(*entity_iter));
     entity_iter = dummy_range.begin();
     while (entity_iter != dummy_range.end() &&
-           MBCN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
+           CN::Dimension(TYPE_FROM_HANDLE(*entity_iter)) != this_dim)
       entity_iter++;
     
     if (entity_iter != dummy_range.end())
       std::copy(entity_iter, dummy_range.end(), range_inserter(*(matset_data.elements)));
 
     assert(matset_data.elements->begin() == matset_data.elements->end() ||
-           MBCN::Dimension(TYPE_FROM_HANDLE(*(matset_data.elements->begin()))) == this_dim);
+           CN::Dimension(TYPE_FROM_HANDLE(*(matset_data.elements->begin()))) == this_dim);
     
     // get the matset's id
     if(mbImpl->tag_get_data(mMaterialSetTag, &(*vector_iter), 1, &id) != MB_SUCCESS ) {
@@ -298,7 +298,7 @@
       return MB_FAILURE;
     }
 
-    int dimension = MBCN::Dimension(entity_type);
+    int dimension = CN::Dimension(entity_type);
 
     if( dimension > highest_dimension_of_element_matsets )
       highest_dimension_of_element_matsets = dimension;
@@ -475,7 +475,7 @@
     else //then "side" is probably a quad/tri on a hex/tet mesh
     {
       std::vector<EntityHandle> parents;
-      int dimension = MBCN::Dimension( TYPE_FROM_HANDLE(*iter));
+      int dimension = CN::Dimension( TYPE_FROM_HANDLE(*iter));
 
         //get the adjacent parent element of "side"
       if( mbImpl->get_adjacencies( &(*iter), 1, dimension+1, false, parents) != MB_SUCCESS ) {
@@ -714,9 +714,9 @@
     // need to step forward on list until we reach the right dimension
   Range::iterator dum_it = neuset_elems.end();
   dum_it--;
-  int target_dim = MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it));
+  int target_dim = CN::Dimension(TYPE_FROM_HANDLE(*dum_it));
   dum_it = neuset_elems.begin();
-  while (target_dim != MBCN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
+  while (target_dim != CN::Dimension(TYPE_FROM_HANDLE(*dum_it)) &&
          dum_it != neuset_elems.end()) 
     dum_it++;
 

Modified: MOAB/trunk/src/io/WriteVtk.cpp
===================================================================
--- MOAB/trunk/src/io/WriteVtk.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/io/WriteVtk.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -36,7 +36,7 @@
 
 #include "moab/Interface.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/WriteUtilIface.hpp"
 #include "Internals.hpp"
@@ -156,7 +156,7 @@
       // filter out unsupported element types
     EntityType et = MBEDGE;
     for (et++; et < MBENTITYSET; et++) {
-      if (VtkUtil::get_vtk_type(et, MBCN::VerticesPerEntity(et))) continue;
+      if (VtkUtil::get_vtk_type(et, CN::VerticesPerEntity(et))) continue;
       Range::iterator 
         eit = elems.lower_bound(elems.begin(), elems.end(), CREATE_HANDLE(et, 0, e)),
         ep1it = elems.lower_bound(elems.begin(), elems.end(), CREATE_HANDLE(et+1, 0, e));
@@ -255,7 +255,7 @@
   for (Range::const_iterator i = elems.begin(); i != elems.end(); ++i)
   {
     EntityType type = mbImpl->type_from_handle(*i);
-    if (!VtkUtil::get_vtk_type(type, MBCN::VerticesPerEntity(type))) continue;
+    if (!VtkUtil::get_vtk_type(type, CN::VerticesPerEntity(type))) continue;
     const EntityHandle* conn;
     int conn_len;
     rval = mbImpl->get_connectivity( *i, conn, conn_len );
@@ -285,7 +285,7 @@
     const VtkElemType* vtk_type = VtkUtil::get_vtk_type( type, conn_len );
     if (!vtk_type) {
       writeTool->report_error( "Vtk file format does not support elements "
-        "of type %s (%d) with %d nodes.\n", MBCN::EntityTypeName(type), 
+        "of type %s (%d) with %d nodes.\n", CN::EntityTypeName(type), 
         (int)type, conn_len);
       return MB_FAILURE;
     }

Copied: MOAB/trunk/src/moab/CN.hpp (from rev 3646, MOAB/trunk/src/moab/MBCN.hpp)
===================================================================
--- MOAB/trunk/src/moab/CN.hpp	                        (rev 0)
+++ MOAB/trunk/src/moab/CN.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -0,0 +1,602 @@
+/**
+ * MOAB, a Mesh-Oriented datABase, is a software component for creating,
+ * storing and accessing finite element mesh data.
+ * 
+ * Copyright 2004 Sandia Corporation.  Under the terms of Contract
+ * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
+ * retains certain rights in this software.
+ * 
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ * 
+ */
+
+/** 
+ * \class CN
+ * \author Tim Tautges
+ * \date April 2004
+ *
+ * \brief Canonical numbering data and functions
+ * This class represents canonical ordering of finite-element meshes.
+ * Elements in the finite element "zoo" are represented.  Canonical numbering
+ * denotes the vertex, edge, and face numbers making up each kind of element,
+ * and the vertex numbers defining those entities.  Functions for evaluating
+ * adjacencies and other things based on vertex numbering are also provided.
+ * By default, this class defines a zero-based numbering system.
+ * For a complete description of this class, see the document "MOAB Canonical
+ * Numbering Conventions", Timothy J. Tautges, Sandia National Laboratories
+ * Report #SAND2004-xxxx.
+ */
+#ifndef MOAB_CN_HPP
+#define MOAB_CN_HPP
+
+#include <vector>
+#include <algorithm>
+#include <cassert>
+
+#include "moab/EntityType.hpp"
+
+namespace moab {
+
+// the maximum number n-1 dimension adjacencies a element may have
+#define MB_MAX_SUB_ENTITIES  12
+
+// the maximum number of nodes an n-1 dimensional element may have
+#define MB_MAX_SUB_ENTITY_VERTICES 9
+
+typedef std::pair<EntityType, EntityType> DimensionPair;
+
+class CN
+{
+private:
+
+//! entity names
+  static const char *entityTypeNames[];
+  
+//! declare private constructor, since we don't want to create any of these
+  CN();
+
+//! the basis of the numbering system (normally 0 or 1, 0 by default)
+  static short int numberBasis;
+
+//! switch the basis
+  static void SwitchBasis(const int old_basis, const int new_basis);
+  
+  static short increasingInts[];
+  
+public:
+
+  enum { MAX_NODES_PER_ELEMENT = 27 };
+  enum { MID_EDGE_BIT   = 1<<1,
+         MID_FACE_BIT   = 1<<2,
+         MID_REGION_BIT = 1<<3 };
+
+    //! enum used to specify operation type
+  enum {INTERSECT = 0, UNION};
+
+    // each entity type has two ConnMap objects, holding information about the bounding
+    // edges and faces for each entity; see comment for mConnectivityMap
+    // (this struct not documented with Doxygen)
+  struct ConnMap
+  {
+      // Topological dimension of this entry
+    short int topo_dimension;
+
+      // Number of sub-elements of this dimension
+    short int num_sub_elements;
+    
+      // Number of nodes in each sub-element of this dimension
+    short int num_corners_per_sub_element[MB_MAX_SUB_ENTITIES];
+
+      // Type of each sub-element
+    EntityType target_type[MB_MAX_SUB_ENTITIES];
+
+      // Connectivity of each of the sub-elements
+    short int conn[MB_MAX_SUB_ENTITIES][MB_MAX_SUB_ENTITY_VERTICES];
+  };
+
+    // mConnectivityMap[i=entity type][j=0,1,2]:
+    //  num_sub_elements = # bounding edges(j=0) or faces(j=1) for entity type i, or self (j=2)
+    //  num_corners_per_sub_element[k] (k=0..num_sub_elements-1) = number of nodes in sub-facet k
+    //    (can vary over sub-facets, e.g. faces bounding a pyramid) or self (j=2)
+    //  target_type[k] = entity type of sub-facet k (e.g. MBTRI or MBQUAD bounding a pyramid) or self (j=2)
+    //  conn[k][l] (l=0..CN::VerticesPerEntity[target_type[k]]) = vertex connectivity of sub-facet k,
+    //    with respect to entity i's canonical vertex ordering, or self (j=2)
+    // (not documented with Doxygen)
+  static const ConnMap mConnectivityMap[MBMAXTYPE][3];
+
+    // structure used to define reverse canonical ordering information
+    // (not documented with Doxygen)
+  struct UpConnMap
+  {
+      // Number of higher-dimensional entities using each sub-entity
+    short int num_targets_per_source_element[MB_MAX_SUB_ENTITIES];
+
+      // Higher-dimensional entities using each sub-entity
+    short int targets_per_source_element[MB_MAX_SUB_ENTITIES][MB_MAX_SUB_ENTITIES];
+  };
+
+    // Reverse canonical numbering, duplicates data in mConnectivityMap, but 
+    // connectivity data in this table must be in ascending order (used for
+    // efficient sorting)
+    // (not documented with Doxygen)
+  static const UpConnMap mUpConnMap[MBMAXTYPE][4][4];
+    
+    // Mid-node bits indexed by number of nodes in element
+  static const unsigned char midNodesPerType[MBMAXTYPE][MAX_NODES_PER_ELEMENT+1];
+
+    //! Permutation and reverse permutation vectors
+  static short int permuteVec[MBMAXTYPE][3][MB_MAX_SUB_ENTITIES+1];
+  static short int revPermuteVec[MBMAXTYPE][3][MB_MAX_SUB_ENTITIES+1];
+  
+  //! this const vector defines the starting and ending EntityType for 
+  //! each dimension, e.g. TypeDimensionMap[2] returns a pair of EntityTypes 
+  //! bounding dimension 2.
+  static const DimensionPair TypeDimensionMap[];
+
+  //! get the basis of the numbering system
+  static short int GetBasis();
+  
+  //! set the basis of the numbering system
+  static void SetBasis(const int in_basis);
+
+  //! return the string type name for this type
+  static inline
+  const char *EntityTypeName(const EntityType this_type);
+  
+  //! given a name, find the corresponding entity type
+  static EntityType EntityTypeFromName(const char *name);
+  
+  //! return the topological entity dimension
+  static inline
+  short int Dimension(const EntityType t);
+
+  //! return the number of (corner) vertices contained in the specified type.  
+  static inline
+  short int VerticesPerEntity(const EntityType t);
+  
+  //! return the number of sub-entities bounding the entity.
+  static inline
+  short int NumSubEntities(const EntityType t, const int d);
+
+  //! return the type of a particular sub-entity.
+  //! \param this_type Type of entity for which sub-entity type is being queried
+  //! \param sub_dimension Topological dimension of sub-entity whose type is being queried
+  //! \param index Index of sub-entity whose type is being queried
+  //! \return type Entity type of sub-entity with specified dimension and index
+  static inline
+  EntityType SubEntityType(const EntityType this_type,
+                             const int sub_dimension,
+                             const int index);
+  
+  //! return the vertex indices of the specified sub-entity.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param sub_dimension Dimension of sub-entity
+  //! \param sub_index Index of sub-entity
+  //! \param sub_entity_conn Connectivity of sub-entity (returned to calling function)
+  static inline
+  void SubEntityVertexIndices(const EntityType this_type, 
+                              const int sub_dimension,
+                              const int sub_index,
+                              int sub_entity_conn[]);
+  
+  //! return the vertex indices of the specified sub-entity.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param sub_dimension Dimension of sub-entity
+  //! \param sub_index Index of sub-entity
+  //! \param num_sub_ent_vertices the number of vertices in the sub-entity
+  static inline
+  const short* SubEntityVertexIndices( const EntityType this_type, 
+                                       const int sub_dimension,
+                                       const int sub_index,
+                                       EntityType& sub_type,
+                                       int& num_sub_ent_vertices );
+  
+  //! return the node indices of the specified sub-entity.
+  //! \param this_topo            The topology of the queried element type
+  //! \param num_nodes            The number of nodes in the queried element type.
+  //! \param sub_dimension        Dimension of sub-entity
+  //! \param sub_index            Index of sub-entity
+  //! \param sub_entity_topo      (Output) Topology of requested sub-entity.
+  //! \param num_sub_entity_nodes (Output) Number of nodes in the requested sub-entity.
+  //! \param sub_entity_conn      (Output) Connectivity of sub-entity
+  static void SubEntityNodeIndices(const EntityType this_topo, 
+                                   const int num_nodes,
+                                   const int sub_dimension,
+                                   const int sub_index,
+                                   EntityType& sub_entity_topo,
+                                   int& num_sub_entity_nodes,
+                                   int sub_entity_conn[]);
+
+  //! return the vertices of the specified sub entity
+  //! \param parent_conn Connectivity of parent entity
+  //! \param parent_type Entity type of parent entity
+  //! \param sub_dimension Dimension of sub-entity being queried
+  //! \param sub_index Index of sub-entity being queried
+  //! \param sub_entity_conn Connectivity of sub-entity, based on parent_conn and canonical
+  //!           ordering for parent_type
+  //! \param num_sub_vertices Number of vertices in sub-entity
+  static void SubEntityConn(const void *parent_conn, const EntityType parent_type,
+                            const int sub_dimension,
+                            const int sub_index,
+                            void *sub_entity_conn, int &num_sub_vertices);
+
+  //! For a specified set of sides of given dimension, return the intersection 
+  //! or union of all sides of specified target dimension adjacent to those sides.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param source_indices Indices of sides being queried
+  //! \param num_source_indices Number of entries in <em>source_indices</em>
+  //! \param source_dim Dimension of source entity
+  //! \param target_dim Dimension of target entity
+  //! \param index_list Indices of target entities (returned)
+  //! \param operation_type Specify either CN::INTERSECT or CN::UNION to get intersection
+  //!        or union of target entity lists over source entities
+  static short int AdjacentSubEntities(const EntityType this_type,
+                                 const int *source_indices,
+                                 const int num_source_indices,
+                                 const int source_dim,
+                                 const int target_dim,
+                                 std::vector<int> &index_list,
+                                 const int operation_type = CN::INTERSECT);
+
+  //! return the side index represented in the input sub-entity connectivity in the input 
+  //! parent entity connectivity array.
+  //! \param parent_conn Connectivity of parent entity being queried
+  //! \param parent_type Entity type of parent entity
+  //! \param child_conn Connectivity of child whose index is being queried
+  //! \param child_num_verts Number of vertices in <em>child_conn</em>
+  //! \param child_dim Dimension of child entity being queried
+  //! \param side_number Side number of child entity (returned)
+  //! \param sense Sense of child entity with respect to order in <em>child_conn</em> (returned)
+  //! \param offset Offset of <em>child_conn</em> with respect to canonical ordering data (returned)
+  //! \return status Returns zero if successful, -1 if not
+  static short int SideNumber(const EntityType parent_type, const int *parent_conn, 
+                              const int *child_conn, const int child_num_verts,
+                              const int child_dim,
+                        int &side_number, int &sense, int &offset);
+  static short int SideNumber(const EntityType parent_type, const unsigned int *parent_conn, 
+                        const unsigned int *child_conn, const int child_num_verts,
+                        const int child_dim,
+                        int &side_number, int &sense, int &offset);
+  static short int SideNumber(const EntityType parent_type, const long *parent_conn, 
+                        const long *child_conn, const int child_num_verts,
+                        const int child_dim,
+                        int &side_number, int &sense, int &offset);
+  static short int SideNumber(const EntityType parent_type, const unsigned long *parent_conn, 
+                        const unsigned long *child_conn, const int child_num_verts,
+                        const int child_dim,
+                        int &side_number, int &sense, int &offset);
+  static short int SideNumber(const EntityType parent_type, void * const *parent_conn, 
+                        void * const *child_conn, const int child_num_verts,
+                        const int child_dim,
+                        int &side_number, int &sense, int &offset);
+
+  //! return the side index represented in the input sub-entity connectivity
+  //! \param parent_type Entity type of parent entity
+  //! \param child_conn_indices Child connectivity to query, specified as indices
+  //!                           into the connectivity list of the parent.
+  //! \param child_num_verts Number of values in <em>child_conn_indices</em>
+  //! \param child_dim Dimension of child entity being queried
+  //! \param side_number Side number of child entity (returned)
+  //! \param sense Sense of child entity with respect to order in <em>child_conn</em> (returned)
+  //! \param offset Offset of <em>child_conn</em> with respect to canonical ordering data (returned)
+  //! \return status Returns zero if successful, -1 if not
+  static short int SideNumber(const EntityType parent_type,
+                        const int *child_conn_indices, const int child_num_verts,
+                        const int child_dim,
+                        int &side_number, int &sense, int &offset);
+
+  //! return the dimension and index of the opposite side, given parent entity type and child 
+  //! dimension and index.  This function is only defined for certain types of parent/child types:
+  //! (Parent, Child dim->Opposite dim): 
+  //!  (Tri, 1->0), (Tri, 0->1), (Quad, 1->1), (Quad, 0->0), 
+  //!  (Tet, 2->0), (Tet, 1->1), (Tet, 0->2),
+  //!  (Hex, 2->2), (Hex, 1->1)(diagonally across element), (Hex, 0->0) (diagonally across element)
+  //! All other parent types and child dimensions return an error.
+  //!
+  //! \param parent_type The type of parent element
+  //! \param child_type The type of child element
+  //! \param child_index The index of the child element
+  //! \param opposite_index The index of the opposite element
+  //! \return status Returns 0 if successful, -1 if not
+  static short int OppositeSide(const EntityType parent_type,
+                          const int child_index,
+                          const int child_dim,
+                          int &opposite_index,
+                          int &opposite_dim);
+
+  //! given two connectivity arrays, determine whether or not they represent the same entity.
+  //! \param conn1 Connectivity array of first entity
+  //! \param conn2 Connectivity array of second entity
+  //! \param num_vertices Number of entries in <em>conn1</em> and <em>conn2</em>
+  //! \param direct If positive, entities have the same sense (returned)
+  //! \param offset Offset of <em>conn2</em>'s first vertex in <em>conn1</em>
+  //! \return bool Returns true if <em>conn1</em> and <em>conn2</em> match
+  static bool ConnectivityMatch(const int *conn1,
+                                const int *conn2,
+                                const int num_vertices,
+                                int &direct, int &offset);
+  static bool ConnectivityMatch(const unsigned int *conn1,
+                                const unsigned int *conn2,
+                                const int num_vertices,
+                                int &direct, int &offset);
+  static bool ConnectivityMatch(const long* conn1,
+                                const long* conn2,
+                                const int num_vertices,
+                                int& direct, int& offset );
+  static bool ConnectivityMatch(const unsigned long* conn1,
+                                const unsigned long* conn2,
+                                const int num_vertices,
+                                int &direct, int& offset );
+  static bool ConnectivityMatch(void* const* conn1,
+                                void* const* conn2,
+                                const int num_vertices,
+                                int& direct, int& offset );
+
+    //! Set permutation or reverse permutation vector
+    //! Forward permutation is from CN's numbering into application's ordering;
+    //! that is, if i is CN's index, pvec[i] is application's index.  This
+    //! function stores the permutation vector for this type and facet dimension,
+    //! which then is used in calls to permuteThis or revPermuteThis.
+    //! \param t EntityType for which to set permutation
+    //! \param dim Dimension of facets whose permutation array is being set
+    //! \param pvec Permutation array
+    //! \param num_entries Number of indicies in permutation array
+    //! \param is_reverse Array is reverse permutation
+  static inline
+  void setPermutation(const EntityType t, const int dim, int *pvec, 
+                      const int num_entries, const bool is_reverse = false);
+
+    //! Reset permutation or reverse permutation vector
+    //! \param t EntityType whose permutation vector is being reset
+    //! \param dim Dimension of facets being reset; if -1 is input, all dimensions are reset
+  static inline
+  void resetPermutation(const EntityType t, const int dim);
+  
+    //! Permute a handle array according to permutation vector set with setPermute; 
+    //! permutation is done in-place
+    //! \param t EntityType of handles in pvec
+    //! \param dim Dimension of handles in pvec
+    //! \param pvec Handle array being permuted
+    //! \param indices_per_ent Number of indices per entity
+    //! \param num_entries Number of entities in pvec
+  static int permuteThis(const EntityType t, const int dim, int *pvec, 
+                         const int indices_per_ent, const int num_entries);
+  static int permuteThis(const EntityType t, const int dim, unsigned int *pvec, 
+                         const int indices_per_ent, const int num_entries);
+  static int permuteThis(const EntityType t, const int dim, long *pvec, 
+                         const int indices_per_ent, const int num_entries);
+  static int permuteThis(const EntityType t, const int dim, void **pvec, 
+                         const int indices_per_ent, const int num_entries);
+
+    //! Reverse permute a handle array according to reverse permutation vector set with setPermute; 
+    //! reverse permutation is done in-place
+    //! \param t EntityType of handles in pvec
+    //! \param dim Dimension of handles in pvec
+    //! \param pvec Handle array being reverse permuted
+    //! \param indices_per_ent Number of indices per entity
+    //! \param num_entries Number of entities in pvec
+  static int revPermuteThis(const EntityType t, const int dim, int *pvec, 
+                            const int indices_per_ent, const int num_entries);
+  static int revPermuteThis(const EntityType t, const int dim, unsigned int *pvec, 
+                            const int indices_per_ent, const int num_entries);
+  static int revPermuteThis(const EntityType t, const int dim, long *pvec, 
+                            const int indices_per_ent, const int num_entries);
+  static int revPermuteThis(const EntityType t, const int dim, void **pvec, 
+                            const int indices_per_ent, const int num_entries);
+
+  //! true if entities of a given type and number of nodes indicates mid edge nodes are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \return bool Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
+  //!  mid-edge nodes are likely
+  static inline
+  bool HasMidEdgeNodes(const EntityType this_type, 
+                       const int num_verts);
+
+  //! true if entities of a given type and number of nodes indicates mid face nodes are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \return bool Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
+  //!  mid-face nodes are likely
+  static inline
+  bool HasMidFaceNodes(const EntityType this_type, 
+                       const int num_verts);
+
+  //! true if entities of a given type and number of nodes indicates mid region nodes are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \return bool Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
+  //!  mid-region nodes are likely
+  static inline
+  bool HasMidRegionNodes(const EntityType this_type, 
+                         const int num_verts);
+
+  //! true if entities of a given type and number of nodes indicates mid edge/face/region nodes 
+  //! are present.
+  //! \param this_type Type of entity for which sub-entity connectivity is being queried
+  //! \param num_verts Number of nodes defining entity
+  //! \param mid_nodes If <em>mid_nodes[i], i=1..2</em> is non-zero, indicates that mid-edge 
+  //!    (i=1), mid-face (i=2), and/or mid-region (i=3) nodes are likely
+  static inline
+  void HasMidNodes(const EntityType this_type, 
+                   const int num_verts, 
+                   int mid_nodes[4]);
+
+  //! Same as above, except returns a single integer with the bits, from
+  //! least significant to most significant set to one if the corresponding
+  //! mid nodes on sub entities of the least dimension (0) to the highest
+  //! dimension (3) are present in the elment type.
+  static inline
+  int HasMidNodes( const EntityType this_type, const int num_verts );
+
+  //! given data about an element and a vertex in that element, return the dimension
+  //! and index of the sub-entity that the vertex resolves.  If it does not resolve a
+  //! sub-entity, either because it's a corner node or it's not in the element, -1 is
+  //! returned in both return values.
+  //! \param elem_type Type of entity being queried
+  //! \param num_nodes The number of nodes in the element connectivity
+  //! \param ho_node_index The position of the HO node in the connectivity list (zero based)
+  //! \param parent_dim Dimension of sub-entity high-order node resolves (returned)
+  //! \param parent_index Index of sub-entity high-order node resolves (returned)
+  static void HONodeParent( EntityType elem_type,
+                            int num_nodes, 
+                            int ho_node_index,
+                            int &parent_dim, 
+                            int &parent_index );
+
+  //! for an entity of this type with num_verts vertices, and a specified subfacet 
+  //! (dimension and index), return the index of the higher order node for that entity 
+  //! in this entity's connectivity array
+  //! \param this_type Type of entity being queried
+  //! \param num_verts Number of vertices for the entity being queried
+  //! \param subfacet_dim Dimension of sub-entity being queried
+  //! \param subfacet_index Index of sub-entity being queried
+  //! \return index Index of sub-entity's higher-order node
+  static short int HONodeIndex(const EntityType this_type, const int num_verts,
+                         const int subfacet_dim, const int subfacet_index);
+};
+
+  //! get the basis of the numbering system
+inline short int CN::GetBasis() {return numberBasis;}
+  
+inline const char *CN::EntityTypeName(const EntityType this_type) 
+{
+  return entityTypeNames[this_type];
+}
+
+inline short int CN::Dimension(const EntityType t) 
+{
+  return mConnectivityMap[t][0].topo_dimension;
+}
+
+inline short int CN::VerticesPerEntity(const EntityType t) 
+{
+  return (MBVERTEX == t ? 1 : mConnectivityMap[t][mConnectivityMap[t][0].topo_dimension-1].num_corners_per_sub_element[0]);
+}
+
+inline short int CN::NumSubEntities(const EntityType t, const int d)
+{
+  return (t != MBVERTEX && d > 0 ? mConnectivityMap[t][d-1].num_sub_elements :
+          (d ? -1 : VerticesPerEntity(t)));
+}
+
+  //! return the type of a particular sub-entity.
+inline EntityType CN::SubEntityType(const EntityType this_type,
+                                        const int sub_dimension,
+                                        const int index) 
+{
+  
+  return (!sub_dimension ? MBVERTEX : 
+          (Dimension(this_type) == sub_dimension && 0 == index ? this_type :
+          mConnectivityMap[this_type][sub_dimension-1].target_type[index]));
+}
+
+inline const short* CN::SubEntityVertexIndices( const EntityType this_type, 
+                                                  const int sub_dimension,
+                                                  const int index,
+                                                  EntityType& sub_type,
+                                                  int& n ) 
+{
+  if (sub_dimension == 0) {
+    n = 1;
+    sub_type = MBVERTEX;
+    return increasingInts + index;
+  }
+  else {
+    const CN::ConnMap& map = mConnectivityMap[this_type][sub_dimension-1];
+    sub_type = map.target_type[index];
+    n = map.num_corners_per_sub_element[index];
+    return map.conn[index];
+  }
+}
+  
+  //! return the connectivity of the specified sub-entity.
+inline void CN::SubEntityVertexIndices(const EntityType this_type, 
+                                         const int sub_dimension,
+                                         const int index,
+                                         int sub_entity_conn[]) 
+{
+  EntityType type;
+  int n;
+  const short* indices = SubEntityVertexIndices( this_type, sub_dimension, index, type, n );
+  std::copy( indices, indices+n, sub_entity_conn );
+}
+
+inline bool CN::HasMidEdgeNodes(const EntityType this_type, 
+                                     const int num_nodes)
+{
+  const int bits = HasMidNodes( this_type, num_nodes );
+  return static_cast<bool>( (bits & (1<<1)) >> 1 );
+}
+
+inline bool CN::HasMidFaceNodes(const EntityType this_type, 
+                                       const int num_nodes)
+{
+  const int bits = HasMidNodes( this_type, num_nodes );
+  return static_cast<bool>( (bits & (1<<2)) >> 2 );
+}
+
+inline bool CN::HasMidRegionNodes(const EntityType this_type, 
+                                         const int num_nodes)
+{
+  const int bits = HasMidNodes( this_type, num_nodes );
+  return static_cast<bool>( (bits & (1<<3)) >> 3 );
+}
+
+inline int CN::HasMidNodes( const EntityType this_type, const int num_nodes )
+{
+  assert( (unsigned)num_nodes <= (unsigned)MAX_NODES_PER_ELEMENT );
+  return midNodesPerType[this_type][num_nodes];
+}
+  
+
+inline void CN::HasMidNodes(const EntityType this_type, const int num_nodes,
+                              int mid_nodes[4])
+{
+  const int bits = HasMidNodes( this_type, num_nodes );
+  mid_nodes[0] = 0;
+  mid_nodes[1] = (bits & (1<<1)) >> 1;
+  mid_nodes[2] = (bits & (1<<2)) >> 2;
+  mid_nodes[3] = (bits & (1<<3)) >> 3;
+}
+
+//! Set permutation or reverse permutation vector
+inline void CN::setPermutation(const EntityType t, const int dim, int *pvec, 
+                                 const int num_entries, const bool is_reverse) 
+{
+  short int *this_vec = permuteVec[t][dim], *that_vec = revPermuteVec[t][dim];
+  if (is_reverse) {
+    this_vec = revPermuteVec[t][dim];
+    that_vec = permuteVec[t][dim];
+  }
+
+  for (int i = 0; i < num_entries; i++) {
+    this_vec[i] = pvec[i];
+    that_vec[pvec[i]] = i;
+  }
+
+  this_vec[MB_MAX_SUB_ENTITIES] = that_vec[MB_MAX_SUB_ENTITIES] = num_entries;
+}
+
+//! Reset permutation or reverse permutation vector
+inline void CN::resetPermutation(const EntityType t, const int dim) 
+{
+  if (-1 == dim) {
+    for (unsigned int i = 0; i < 3; i++) resetPermutation(t, i);
+    return;
+  }
+  
+  for (unsigned int i = 0; i < MB_MAX_SUB_ENTITIES; i++) {
+    revPermuteVec[t][dim][i] = permuteVec[t][dim][i] = i;
+  }
+  
+  revPermuteVec[t][dim][MB_MAX_SUB_ENTITIES] = 
+    permuteVec[t][dim][MB_MAX_SUB_ENTITIES] = MB_MAX_SUB_ENTITIES+1;
+}
+
+} // namespace moab 
+
+#endif

Deleted: MOAB/trunk/src/moab/MBCN.hpp
===================================================================
--- MOAB/trunk/src/moab/MBCN.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/moab/MBCN.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,602 +0,0 @@
-/**
- * MOAB, a Mesh-Oriented datABase, is a software component for creating,
- * storing and accessing finite element mesh data.
- * 
- * Copyright 2004 Sandia Corporation.  Under the terms of Contract
- * DE-AC04-94AL85000 with Sandia Coroporation, the U.S. Government
- * retains certain rights in this software.
- * 
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- * 
- */
-
-/** 
- * \class MBCN
- * \author Tim Tautges
- * \date April 2004
- *
- * \brief Canonical numbering data and functions
- * This class represents canonical ordering of finite-element meshes.
- * Elements in the finite element "zoo" are represented.  Canonical numbering
- * denotes the vertex, edge, and face numbers making up each kind of element,
- * and the vertex numbers defining those entities.  Functions for evaluating
- * adjacencies and other things based on vertex numbering are also provided.
- * By default, this class defines a zero-based numbering system.
- * For a complete description of this class, see the document "MOAB Canonical
- * Numbering Conventions", Timothy J. Tautges, Sandia National Laboratories
- * Report #SAND2004-xxxx.
- */
-#ifndef MOAB_MBCN_HPP
-#define MOAB_MBCN_HPP
-
-#include <vector>
-#include <algorithm>
-#include <cassert>
-
-#include "moab/EntityType.hpp"
-
-namespace moab {
-
-// the maximum number n-1 dimension adjacencies a element may have
-#define MB_MAX_SUB_ENTITIES  12
-
-// the maximum number of nodes an n-1 dimensional element may have
-#define MB_MAX_SUB_ENTITY_VERTICES 9
-
-typedef std::pair<EntityType, EntityType> DimensionPair;
-
-class MBCN
-{
-private:
-
-//! entity names
-  static const char *entityTypeNames[];
-  
-//! declare private constructor, since we don't want to create any of these
-  MBCN();
-
-//! the basis of the numbering system (normally 0 or 1, 0 by default)
-  static short int numberBasis;
-
-//! switch the basis
-  static void SwitchBasis(const int old_basis, const int new_basis);
-  
-  static short increasingInts[];
-  
-public:
-
-  enum { MAX_NODES_PER_ELEMENT = 27 };
-  enum { MID_EDGE_BIT   = 1<<1,
-         MID_FACE_BIT   = 1<<2,
-         MID_REGION_BIT = 1<<3 };
-
-    //! enum used to specify operation type
-  enum {INTERSECT = 0, UNION};
-
-    // each entity type has two ConnMap objects, holding information about the bounding
-    // edges and faces for each entity; see comment for mConnectivityMap
-    // (this struct not documented with Doxygen)
-  struct ConnMap
-  {
-      // Topological dimension of this entry
-    short int topo_dimension;
-
-      // Number of sub-elements of this dimension
-    short int num_sub_elements;
-    
-      // Number of nodes in each sub-element of this dimension
-    short int num_corners_per_sub_element[MB_MAX_SUB_ENTITIES];
-
-      // Type of each sub-element
-    EntityType target_type[MB_MAX_SUB_ENTITIES];
-
-      // Connectivity of each of the sub-elements
-    short int conn[MB_MAX_SUB_ENTITIES][MB_MAX_SUB_ENTITY_VERTICES];
-  };
-
-    // mConnectivityMap[i=entity type][j=0,1,2]:
-    //  num_sub_elements = # bounding edges(j=0) or faces(j=1) for entity type i, or self (j=2)
-    //  num_corners_per_sub_element[k] (k=0..num_sub_elements-1) = number of nodes in sub-facet k
-    //    (can vary over sub-facets, e.g. faces bounding a pyramid) or self (j=2)
-    //  target_type[k] = entity type of sub-facet k (e.g. MBTRI or MBQUAD bounding a pyramid) or self (j=2)
-    //  conn[k][l] (l=0..MBCN::VerticesPerEntity[target_type[k]]) = vertex connectivity of sub-facet k,
-    //    with respect to entity i's canonical vertex ordering, or self (j=2)
-    // (not documented with Doxygen)
-  static const ConnMap mConnectivityMap[MBMAXTYPE][3];
-
-    // structure used to define reverse canonical ordering information
-    // (not documented with Doxygen)
-  struct UpConnMap
-  {
-      // Number of higher-dimensional entities using each sub-entity
-    short int num_targets_per_source_element[MB_MAX_SUB_ENTITIES];
-
-      // Higher-dimensional entities using each sub-entity
-    short int targets_per_source_element[MB_MAX_SUB_ENTITIES][MB_MAX_SUB_ENTITIES];
-  };
-
-    // Reverse canonical numbering, duplicates data in mConnectivityMap, but 
-    // connectivity data in this table must be in ascending order (used for
-    // efficient sorting)
-    // (not documented with Doxygen)
-  static const UpConnMap mUpConnMap[MBMAXTYPE][4][4];
-    
-    // Mid-node bits indexed by number of nodes in element
-  static const unsigned char midNodesPerType[MBMAXTYPE][MAX_NODES_PER_ELEMENT+1];
-
-    //! Permutation and reverse permutation vectors
-  static short int permuteVec[MBMAXTYPE][3][MB_MAX_SUB_ENTITIES+1];
-  static short int revPermuteVec[MBMAXTYPE][3][MB_MAX_SUB_ENTITIES+1];
-  
-  //! this const vector defines the starting and ending EntityType for 
-  //! each dimension, e.g. TypeDimensionMap[2] returns a pair of EntityTypes 
-  //! bounding dimension 2.
-  static const DimensionPair TypeDimensionMap[];
-
-  //! get the basis of the numbering system
-  static short int GetBasis();
-  
-  //! set the basis of the numbering system
-  static void SetBasis(const int in_basis);
-
-  //! return the string type name for this type
-  static inline
-  const char *EntityTypeName(const EntityType this_type);
-  
-  //! given a name, find the corresponding entity type
-  static EntityType EntityTypeFromName(const char *name);
-  
-  //! return the topological entity dimension
-  static inline
-  short int Dimension(const EntityType t);
-
-  //! return the number of (corner) vertices contained in the specified type.  
-  static inline
-  short int VerticesPerEntity(const EntityType t);
-  
-  //! return the number of sub-entities bounding the entity.
-  static inline
-  short int NumSubEntities(const EntityType t, const int d);
-
-  //! return the type of a particular sub-entity.
-  //! \param this_type Type of entity for which sub-entity type is being queried
-  //! \param sub_dimension Topological dimension of sub-entity whose type is being queried
-  //! \param index Index of sub-entity whose type is being queried
-  //! \return type Entity type of sub-entity with specified dimension and index
-  static inline
-  EntityType SubEntityType(const EntityType this_type,
-                             const int sub_dimension,
-                             const int index);
-  
-  //! return the vertex indices of the specified sub-entity.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param sub_dimension Dimension of sub-entity
-  //! \param sub_index Index of sub-entity
-  //! \param sub_entity_conn Connectivity of sub-entity (returned to calling function)
-  static inline
-  void SubEntityVertexIndices(const EntityType this_type, 
-                              const int sub_dimension,
-                              const int sub_index,
-                              int sub_entity_conn[]);
-  
-  //! return the vertex indices of the specified sub-entity.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param sub_dimension Dimension of sub-entity
-  //! \param sub_index Index of sub-entity
-  //! \param num_sub_ent_vertices the number of vertices in the sub-entity
-  static inline
-  const short* SubEntityVertexIndices( const EntityType this_type, 
-                                       const int sub_dimension,
-                                       const int sub_index,
-                                       EntityType& sub_type,
-                                       int& num_sub_ent_vertices );
-  
-  //! return the node indices of the specified sub-entity.
-  //! \param this_topo            The topology of the queried element type
-  //! \param num_nodes            The number of nodes in the queried element type.
-  //! \param sub_dimension        Dimension of sub-entity
-  //! \param sub_index            Index of sub-entity
-  //! \param sub_entity_topo      (Output) Topology of requested sub-entity.
-  //! \param num_sub_entity_nodes (Output) Number of nodes in the requested sub-entity.
-  //! \param sub_entity_conn      (Output) Connectivity of sub-entity
-  static void SubEntityNodeIndices(const EntityType this_topo, 
-                                   const int num_nodes,
-                                   const int sub_dimension,
-                                   const int sub_index,
-                                   EntityType& sub_entity_topo,
-                                   int& num_sub_entity_nodes,
-                                   int sub_entity_conn[]);
-
-  //! return the vertices of the specified sub entity
-  //! \param parent_conn Connectivity of parent entity
-  //! \param parent_type Entity type of parent entity
-  //! \param sub_dimension Dimension of sub-entity being queried
-  //! \param sub_index Index of sub-entity being queried
-  //! \param sub_entity_conn Connectivity of sub-entity, based on parent_conn and canonical
-  //!           ordering for parent_type
-  //! \param num_sub_vertices Number of vertices in sub-entity
-  static void SubEntityConn(const void *parent_conn, const EntityType parent_type,
-                            const int sub_dimension,
-                            const int sub_index,
-                            void *sub_entity_conn, int &num_sub_vertices);
-
-  //! For a specified set of sides of given dimension, return the intersection 
-  //! or union of all sides of specified target dimension adjacent to those sides.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param source_indices Indices of sides being queried
-  //! \param num_source_indices Number of entries in <em>source_indices</em>
-  //! \param source_dim Dimension of source entity
-  //! \param target_dim Dimension of target entity
-  //! \param index_list Indices of target entities (returned)
-  //! \param operation_type Specify either MBCN::INTERSECT or MBCN::UNION to get intersection
-  //!        or union of target entity lists over source entities
-  static short int AdjacentSubEntities(const EntityType this_type,
-                                 const int *source_indices,
-                                 const int num_source_indices,
-                                 const int source_dim,
-                                 const int target_dim,
-                                 std::vector<int> &index_list,
-                                 const int operation_type = MBCN::INTERSECT);
-
-  //! return the side index represented in the input sub-entity connectivity in the input 
-  //! parent entity connectivity array.
-  //! \param parent_conn Connectivity of parent entity being queried
-  //! \param parent_type Entity type of parent entity
-  //! \param child_conn Connectivity of child whose index is being queried
-  //! \param child_num_verts Number of vertices in <em>child_conn</em>
-  //! \param child_dim Dimension of child entity being queried
-  //! \param side_number Side number of child entity (returned)
-  //! \param sense Sense of child entity with respect to order in <em>child_conn</em> (returned)
-  //! \param offset Offset of <em>child_conn</em> with respect to canonical ordering data (returned)
-  //! \return status Returns zero if successful, -1 if not
-  static short int SideNumber(const EntityType parent_type, const int *parent_conn, 
-                              const int *child_conn, const int child_num_verts,
-                              const int child_dim,
-                        int &side_number, int &sense, int &offset);
-  static short int SideNumber(const EntityType parent_type, const unsigned int *parent_conn, 
-                        const unsigned int *child_conn, const int child_num_verts,
-                        const int child_dim,
-                        int &side_number, int &sense, int &offset);
-  static short int SideNumber(const EntityType parent_type, const long *parent_conn, 
-                        const long *child_conn, const int child_num_verts,
-                        const int child_dim,
-                        int &side_number, int &sense, int &offset);
-  static short int SideNumber(const EntityType parent_type, const unsigned long *parent_conn, 
-                        const unsigned long *child_conn, const int child_num_verts,
-                        const int child_dim,
-                        int &side_number, int &sense, int &offset);
-  static short int SideNumber(const EntityType parent_type, void * const *parent_conn, 
-                        void * const *child_conn, const int child_num_verts,
-                        const int child_dim,
-                        int &side_number, int &sense, int &offset);
-
-  //! return the side index represented in the input sub-entity connectivity
-  //! \param parent_type Entity type of parent entity
-  //! \param child_conn_indices Child connectivity to query, specified as indices
-  //!                           into the connectivity list of the parent.
-  //! \param child_num_verts Number of values in <em>child_conn_indices</em>
-  //! \param child_dim Dimension of child entity being queried
-  //! \param side_number Side number of child entity (returned)
-  //! \param sense Sense of child entity with respect to order in <em>child_conn</em> (returned)
-  //! \param offset Offset of <em>child_conn</em> with respect to canonical ordering data (returned)
-  //! \return status Returns zero if successful, -1 if not
-  static short int SideNumber(const EntityType parent_type,
-                        const int *child_conn_indices, const int child_num_verts,
-                        const int child_dim,
-                        int &side_number, int &sense, int &offset);
-
-  //! return the dimension and index of the opposite side, given parent entity type and child 
-  //! dimension and index.  This function is only defined for certain types of parent/child types:
-  //! (Parent, Child dim->Opposite dim): 
-  //!  (Tri, 1->0), (Tri, 0->1), (Quad, 1->1), (Quad, 0->0), 
-  //!  (Tet, 2->0), (Tet, 1->1), (Tet, 0->2),
-  //!  (Hex, 2->2), (Hex, 1->1)(diagonally across element), (Hex, 0->0) (diagonally across element)
-  //! All other parent types and child dimensions return an error.
-  //!
-  //! \param parent_type The type of parent element
-  //! \param child_type The type of child element
-  //! \param child_index The index of the child element
-  //! \param opposite_index The index of the opposite element
-  //! \return status Returns 0 if successful, -1 if not
-  static short int OppositeSide(const EntityType parent_type,
-                          const int child_index,
-                          const int child_dim,
-                          int &opposite_index,
-                          int &opposite_dim);
-
-  //! given two connectivity arrays, determine whether or not they represent the same entity.
-  //! \param conn1 Connectivity array of first entity
-  //! \param conn2 Connectivity array of second entity
-  //! \param num_vertices Number of entries in <em>conn1</em> and <em>conn2</em>
-  //! \param direct If positive, entities have the same sense (returned)
-  //! \param offset Offset of <em>conn2</em>'s first vertex in <em>conn1</em>
-  //! \return bool Returns true if <em>conn1</em> and <em>conn2</em> match
-  static bool ConnectivityMatch(const int *conn1,
-                                const int *conn2,
-                                const int num_vertices,
-                                int &direct, int &offset);
-  static bool ConnectivityMatch(const unsigned int *conn1,
-                                const unsigned int *conn2,
-                                const int num_vertices,
-                                int &direct, int &offset);
-  static bool ConnectivityMatch(const long* conn1,
-                                const long* conn2,
-                                const int num_vertices,
-                                int& direct, int& offset );
-  static bool ConnectivityMatch(const unsigned long* conn1,
-                                const unsigned long* conn2,
-                                const int num_vertices,
-                                int &direct, int& offset );
-  static bool ConnectivityMatch(void* const* conn1,
-                                void* const* conn2,
-                                const int num_vertices,
-                                int& direct, int& offset );
-
-    //! Set permutation or reverse permutation vector
-    //! Forward permutation is from MBCN's numbering into application's ordering;
-    //! that is, if i is MBCN's index, pvec[i] is application's index.  This
-    //! function stores the permutation vector for this type and facet dimension,
-    //! which then is used in calls to permuteThis or revPermuteThis.
-    //! \param t EntityType for which to set permutation
-    //! \param dim Dimension of facets whose permutation array is being set
-    //! \param pvec Permutation array
-    //! \param num_entries Number of indicies in permutation array
-    //! \param is_reverse Array is reverse permutation
-  static inline
-  void setPermutation(const EntityType t, const int dim, int *pvec, 
-                      const int num_entries, const bool is_reverse = false);
-
-    //! Reset permutation or reverse permutation vector
-    //! \param t EntityType whose permutation vector is being reset
-    //! \param dim Dimension of facets being reset; if -1 is input, all dimensions are reset
-  static inline
-  void resetPermutation(const EntityType t, const int dim);
-  
-    //! Permute a handle array according to permutation vector set with setPermute; 
-    //! permutation is done in-place
-    //! \param t EntityType of handles in pvec
-    //! \param dim Dimension of handles in pvec
-    //! \param pvec Handle array being permuted
-    //! \param indices_per_ent Number of indices per entity
-    //! \param num_entries Number of entities in pvec
-  static int permuteThis(const EntityType t, const int dim, int *pvec, 
-                         const int indices_per_ent, const int num_entries);
-  static int permuteThis(const EntityType t, const int dim, unsigned int *pvec, 
-                         const int indices_per_ent, const int num_entries);
-  static int permuteThis(const EntityType t, const int dim, long *pvec, 
-                         const int indices_per_ent, const int num_entries);
-  static int permuteThis(const EntityType t, const int dim, void **pvec, 
-                         const int indices_per_ent, const int num_entries);
-
-    //! Reverse permute a handle array according to reverse permutation vector set with setPermute; 
-    //! reverse permutation is done in-place
-    //! \param t EntityType of handles in pvec
-    //! \param dim Dimension of handles in pvec
-    //! \param pvec Handle array being reverse permuted
-    //! \param indices_per_ent Number of indices per entity
-    //! \param num_entries Number of entities in pvec
-  static int revPermuteThis(const EntityType t, const int dim, int *pvec, 
-                            const int indices_per_ent, const int num_entries);
-  static int revPermuteThis(const EntityType t, const int dim, unsigned int *pvec, 
-                            const int indices_per_ent, const int num_entries);
-  static int revPermuteThis(const EntityType t, const int dim, long *pvec, 
-                            const int indices_per_ent, const int num_entries);
-  static int revPermuteThis(const EntityType t, const int dim, void **pvec, 
-                            const int indices_per_ent, const int num_entries);
-
-  //! true if entities of a given type and number of nodes indicates mid edge nodes are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \return bool Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
-  //!  mid-edge nodes are likely
-  static inline
-  bool HasMidEdgeNodes(const EntityType this_type, 
-                       const int num_verts);
-
-  //! true if entities of a given type and number of nodes indicates mid face nodes are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \return bool Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
-  //!  mid-face nodes are likely
-  static inline
-  bool HasMidFaceNodes(const EntityType this_type, 
-                       const int num_verts);
-
-  //! true if entities of a given type and number of nodes indicates mid region nodes are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \return bool Returns true if <em>this_type</em> combined with <em>num_nodes</em> indicates
-  //!  mid-region nodes are likely
-  static inline
-  bool HasMidRegionNodes(const EntityType this_type, 
-                         const int num_verts);
-
-  //! true if entities of a given type and number of nodes indicates mid edge/face/region nodes 
-  //! are present.
-  //! \param this_type Type of entity for which sub-entity connectivity is being queried
-  //! \param num_verts Number of nodes defining entity
-  //! \param mid_nodes If <em>mid_nodes[i], i=1..2</em> is non-zero, indicates that mid-edge 
-  //!    (i=1), mid-face (i=2), and/or mid-region (i=3) nodes are likely
-  static inline
-  void HasMidNodes(const EntityType this_type, 
-                   const int num_verts, 
-                   int mid_nodes[4]);
-
-  //! Same as above, except returns a single integer with the bits, from
-  //! least significant to most significant set to one if the corresponding
-  //! mid nodes on sub entities of the least dimension (0) to the highest
-  //! dimension (3) are present in the elment type.
-  static inline
-  int HasMidNodes( const EntityType this_type, const int num_verts );
-
-  //! given data about an element and a vertex in that element, return the dimension
-  //! and index of the sub-entity that the vertex resolves.  If it does not resolve a
-  //! sub-entity, either because it's a corner node or it's not in the element, -1 is
-  //! returned in both return values.
-  //! \param elem_type Type of entity being queried
-  //! \param num_nodes The number of nodes in the element connectivity
-  //! \param ho_node_index The position of the HO node in the connectivity list (zero based)
-  //! \param parent_dim Dimension of sub-entity high-order node resolves (returned)
-  //! \param parent_index Index of sub-entity high-order node resolves (returned)
-  static void HONodeParent( EntityType elem_type,
-                            int num_nodes, 
-                            int ho_node_index,
-                            int &parent_dim, 
-                            int &parent_index );
-
-  //! for an entity of this type with num_verts vertices, and a specified subfacet 
-  //! (dimension and index), return the index of the higher order node for that entity 
-  //! in this entity's connectivity array
-  //! \param this_type Type of entity being queried
-  //! \param num_verts Number of vertices for the entity being queried
-  //! \param subfacet_dim Dimension of sub-entity being queried
-  //! \param subfacet_index Index of sub-entity being queried
-  //! \return index Index of sub-entity's higher-order node
-  static short int HONodeIndex(const EntityType this_type, const int num_verts,
-                         const int subfacet_dim, const int subfacet_index);
-};
-
-  //! get the basis of the numbering system
-inline short int MBCN::GetBasis() {return numberBasis;}
-  
-inline const char *MBCN::EntityTypeName(const EntityType this_type) 
-{
-  return entityTypeNames[this_type];
-}
-
-inline short int MBCN::Dimension(const EntityType t) 
-{
-  return mConnectivityMap[t][0].topo_dimension;
-}
-
-inline short int MBCN::VerticesPerEntity(const EntityType t) 
-{
-  return (MBVERTEX == t ? 1 : mConnectivityMap[t][mConnectivityMap[t][0].topo_dimension-1].num_corners_per_sub_element[0]);
-}
-
-inline short int MBCN::NumSubEntities(const EntityType t, const int d)
-{
-  return (t != MBVERTEX && d > 0 ? mConnectivityMap[t][d-1].num_sub_elements :
-          (d ? -1 : VerticesPerEntity(t)));
-}
-
-  //! return the type of a particular sub-entity.
-inline EntityType MBCN::SubEntityType(const EntityType this_type,
-                                        const int sub_dimension,
-                                        const int index) 
-{
-  
-  return (!sub_dimension ? MBVERTEX : 
-          (Dimension(this_type) == sub_dimension && 0 == index ? this_type :
-          mConnectivityMap[this_type][sub_dimension-1].target_type[index]));
-}
-
-inline const short* MBCN::SubEntityVertexIndices( const EntityType this_type, 
-                                                  const int sub_dimension,
-                                                  const int index,
-                                                  EntityType& sub_type,
-                                                  int& n ) 
-{
-  if (sub_dimension == 0) {
-    n = 1;
-    sub_type = MBVERTEX;
-    return increasingInts + index;
-  }
-  else {
-    const MBCN::ConnMap& map = mConnectivityMap[this_type][sub_dimension-1];
-    sub_type = map.target_type[index];
-    n = map.num_corners_per_sub_element[index];
-    return map.conn[index];
-  }
-}
-  
-  //! return the connectivity of the specified sub-entity.
-inline void MBCN::SubEntityVertexIndices(const EntityType this_type, 
-                                         const int sub_dimension,
-                                         const int index,
-                                         int sub_entity_conn[]) 
-{
-  EntityType type;
-  int n;
-  const short* indices = SubEntityVertexIndices( this_type, sub_dimension, index, type, n );
-  std::copy( indices, indices+n, sub_entity_conn );
-}
-
-inline bool MBCN::HasMidEdgeNodes(const EntityType this_type, 
-                                     const int num_nodes)
-{
-  const int bits = HasMidNodes( this_type, num_nodes );
-  return static_cast<bool>( (bits & (1<<1)) >> 1 );
-}
-
-inline bool MBCN::HasMidFaceNodes(const EntityType this_type, 
-                                       const int num_nodes)
-{
-  const int bits = HasMidNodes( this_type, num_nodes );
-  return static_cast<bool>( (bits & (1<<2)) >> 2 );
-}
-
-inline bool MBCN::HasMidRegionNodes(const EntityType this_type, 
-                                         const int num_nodes)
-{
-  const int bits = HasMidNodes( this_type, num_nodes );
-  return static_cast<bool>( (bits & (1<<3)) >> 3 );
-}
-
-inline int MBCN::HasMidNodes( const EntityType this_type, const int num_nodes )
-{
-  assert( (unsigned)num_nodes <= (unsigned)MAX_NODES_PER_ELEMENT );
-  return midNodesPerType[this_type][num_nodes];
-}
-  
-
-inline void MBCN::HasMidNodes(const EntityType this_type, const int num_nodes,
-                              int mid_nodes[4])
-{
-  const int bits = HasMidNodes( this_type, num_nodes );
-  mid_nodes[0] = 0;
-  mid_nodes[1] = (bits & (1<<1)) >> 1;
-  mid_nodes[2] = (bits & (1<<2)) >> 2;
-  mid_nodes[3] = (bits & (1<<3)) >> 3;
-}
-
-//! Set permutation or reverse permutation vector
-inline void MBCN::setPermutation(const EntityType t, const int dim, int *pvec, 
-                                 const int num_entries, const bool is_reverse) 
-{
-  short int *this_vec = permuteVec[t][dim], *that_vec = revPermuteVec[t][dim];
-  if (is_reverse) {
-    this_vec = revPermuteVec[t][dim];
-    that_vec = permuteVec[t][dim];
-  }
-
-  for (int i = 0; i < num_entries; i++) {
-    this_vec[i] = pvec[i];
-    that_vec[pvec[i]] = i;
-  }
-
-  this_vec[MB_MAX_SUB_ENTITIES] = that_vec[MB_MAX_SUB_ENTITIES] = num_entries;
-}
-
-//! Reset permutation or reverse permutation vector
-inline void MBCN::resetPermutation(const EntityType t, const int dim) 
-{
-  if (-1 == dim) {
-    for (unsigned int i = 0; i < 3; i++) resetPermutation(t, i);
-    return;
-  }
-  
-  for (unsigned int i = 0; i < MB_MAX_SUB_ENTITIES; i++) {
-    revPermuteVec[t][dim][i] = permuteVec[t][dim][i] = i;
-  }
-  
-  revPermuteVec[t][dim][MB_MAX_SUB_ENTITIES] = 
-    permuteVec[t][dim][MB_MAX_SUB_ENTITIES] = MB_MAX_SUB_ENTITIES+1;
-}
-
-} // namespace moab 
-
-#endif

Added: MOAB/trunk/src/oldinc/MBCN.hpp
===================================================================
--- MOAB/trunk/src/oldinc/MBCN.hpp	                        (rev 0)
+++ MOAB/trunk/src/oldinc/MBCN.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -0,0 +1,9 @@
+#ifndef MBCN_HEADER
+#define MBCN_HEADER
+
+#include "MBEntityType.h"
+
+#include "moab/CN.hpp"
+typedef moab::CN MBCN;
+
+#endif

Modified: MOAB/trunk/src/oldinc/Makefile.am
===================================================================
--- MOAB/trunk/src/oldinc/Makefile.am	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/oldinc/Makefile.am	2010-03-17 20:58:51 UTC (rev 3647)
@@ -3,6 +3,7 @@
                   MBBSPTree.hpp \
                   MBBSPTreePoly.hpp \
                   MBCartVect.hpp \
+                  MBCN.hpp \
                   MBCore.hpp \
                   MBEntityHandle.h \
                   MBForward.hpp \

Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -11,7 +11,7 @@
 #include "moab/Core.hpp"
 #include "Error.hpp"
 #include "ElementSequence.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/RangeMap.hpp"
 #include "moab/MeshTopoUtil.hpp"
 
@@ -849,7 +849,7 @@
 
 #ifdef DEBUG_PACKING
   std::cerr << "Packed " << these_ents.size() << " ents of type " 
-            << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*these_ents.begin())) << std::endl;
+            << CN::EntityTypeName(TYPE_FROM_HANDLE(*these_ents.begin())) << std::endl;
 #endif      
   }
 
@@ -1025,7 +1025,7 @@
 
 #ifdef DEBUG_PACKING
   std::cerr << std::endl << "Packed " << these_ents.size() << " ents of type " 
-            << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*these_ents.begin())) << std::endl;
+            << CN::EntityTypeName(TYPE_FROM_HANDLE(*these_ents.begin())) << std::endl;
 #endif      
 
   return result;
@@ -1467,7 +1467,7 @@
     
 #ifdef DEBUG_PACKING
       std::cerr << "Unpacked " << num_ents << " ents of type " 
-                << MBCN::EntityTypeName(TYPE_FROM_HANDLE(this_type)) << std::endl;
+                << CN::EntityTypeName(TYPE_FROM_HANDLE(this_type)) << std::endl;
 #endif      
 
   }
@@ -1544,7 +1544,7 @@
         UNPACK_INT(buff_ptr, verts_per_entity);
       }
 
-      std::cerr << "Type: " << MBCN::EntityTypeName(this_type)
+      std::cerr << "Type: " << CN::EntityTypeName(this_type)
                 << "; num_ents = " << num_ents2;
       if (MBVERTEX != this_type) std::cerr << "; verts_per_ent = " << verts_per_entity;
       std::cerr << std::endl;
@@ -1598,8 +1598,8 @@
     std::cerr << num_ents << " Entity pairs; hremote/hlocal/proc: " << std::endl;
     for (int i = 0; i < num_ents; i++) {
       EntityType etype = TYPE_FROM_HANDLE(L1hloc[i]);
-      std::cerr << MBCN::EntityTypeName(etype) << ID_FROM_HANDLE(L1hrem[i])  << ", " 
-                << MBCN::EntityTypeName(etype) << ID_FROM_HANDLE(L1hloc[i])  << ", " 
+      std::cerr << CN::EntityTypeName(etype) << ID_FROM_HANDLE(L1hrem[i])  << ", " 
+                << CN::EntityTypeName(etype) << ID_FROM_HANDLE(L1hloc[i])  << ", " 
                 << L1p[i] << std::endl;
     }
 
@@ -1634,7 +1634,7 @@
       int tot_length = 0;
       for (int i = 0; i < num_ents; i++) {
         EntityType etype = TYPE_FROM_HANDLE(*((EntityHandle*)tmp_buff));
-        std::cerr << MBCN::EntityTypeName(etype) << " " 
+        std::cerr << CN::EntityTypeName(etype) << " " 
                   << ID_FROM_HANDLE(*((EntityHandle*)tmp_buff))
                   << ", tag = ";
         if (tag_size == MB_VARIABLE_LENGTH) {
@@ -2018,7 +2018,7 @@
   
   Range tmp_range;
   ErrorCode result = mbImpl->get_adjacencies(connect, num_connect, 
-                                               MBCN::Dimension(this_type), false, 
+                                               CN::Dimension(this_type), false, 
                                                tmp_range);
   RRA("Problem getting existing entity.");
   if (!tmp_range.empty()) {
@@ -2742,8 +2742,8 @@
   if (resolve_dim > shared_dim &&
       mbImpl->dimension_from_handle(*proc_ents.rbegin()) !=
       mbImpl->dimension_from_handle(*proc_ents.begin())) {
-    Range::iterator lower = proc_ents.lower_bound(MBCN::TypeDimensionMap[0].first),
-      upper = proc_ents.upper_bound(MBCN::TypeDimensionMap[resolve_dim-1].second);
+    Range::iterator lower = proc_ents.lower_bound(CN::TypeDimensionMap[0].first),
+      upper = proc_ents.upper_bound(CN::TypeDimensionMap[resolve_dim-1].second);
     proc_ents.erase(lower, upper);
   }
   
@@ -6131,7 +6131,7 @@
   
     // dimension
   if (-1 != dim) {
-    DimensionPair dp = MBCN::TypeDimensionMap[dim];
+    DimensionPair dp = CN::TypeDimensionMap[dim];
     Range dum_range;
     shared_ents.merge(sharedEnts.lower_bound(dp.first), 
                       sharedEnts.upper_bound(dp.second));

Modified: MOAB/trunk/src/parallel/ReadParallel.cpp
===================================================================
--- MOAB/trunk/src/parallel/ReadParallel.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/parallel/ReadParallel.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -7,7 +7,6 @@
 #include "moab/ReadUtilIface.hpp"
 #include "moab/ParallelComm.hpp"
 #include "moab/MBParallelConventions.h"
-#include "moab/MBCN.hpp"
 
 #include <iostream>
 #include <iomanip>

Modified: MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -36,7 +36,7 @@
 #include "moab/MBTagConventions.hpp"
 #include "moab/MBParallelConventions.h"
 #include "moab/ParallelComm.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/WriteUtilIface.hpp"
 #include "moab/Range.hpp"
 
@@ -141,7 +141,7 @@
     if (mytype != type)
     {
       type = mytype;
-      fprintf(DEBUG_OUT_STREAM, "%s[%d]  %s", type == MBMAXTYPE ? "" : "\n", rank, MBCN::EntityTypeName( type ) );
+      fprintf(DEBUG_OUT_STREAM, "%s[%d]  %s", type == MBMAXTYPE ? "" : "\n", rank, CN::EntityTypeName( type ) );
     }
     unsigned long id1 = iFace->id_from_handle( a );
     unsigned long id2 = iFace->id_from_handle( b );
@@ -422,7 +422,7 @@
     const char* type_names[MBMAXTYPE];
     memset( type_names, 0, MBMAXTYPE * sizeof(char*) );
     for (EntityType i = MBEDGE; i < MBENTITYSET; ++i)
-      type_names[i] = MBCN::EntityTypeName( i );
+      type_names[i] = CN::EntityTypeName( i );
    
 tprint("call mhdf_createFile");
     filePtr = mhdf_createFile( filename, overwrite, type_names, MBMAXTYPE, &status );
@@ -760,7 +760,7 @@
   {
     int type = *viter; ++viter;
     int count = *viter; ++viter;
-    printdebug("  %s : %d\n", MBCN::EntityTypeName((EntityType)type), count);
+    printdebug("  %s : %d\n", CN::EntityTypeName((EntityType)type), count);
   }
   END_SERIAL;
   #endif
@@ -823,7 +823,7 @@
   {
     int type = *viter; ++viter;
     int count = *viter; ++viter;
-    printdebug("  %s : %d\n", MBCN::EntityTypeName((EntityType)type), count);
+    printdebug("  %s : %d\n", CN::EntityTypeName((EntityType)type), count);
   }
   END_SERIAL;
   #endif
@@ -1372,7 +1372,7 @@
 
         std::cerr << pfx1 << "Failed at: (" << i << ") " << data.local_values[i] 
                   << "->" << id << " for " 
-                  << MBCN::EntityTypeName(TYPE_FROM_HANDLE(*riter)) 
+                  << CN::EntityTypeName(TYPE_FROM_HANDLE(*riter)) 
                   << " " << ID_FROM_HANDLE(*riter) << std::endl;
         std::cerr.flush();
       }

Modified: MOAB/trunk/test/MBTest.cpp
===================================================================
--- MOAB/trunk/test/MBTest.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/MBTest.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -40,7 +40,7 @@
 #include "moab/Range.hpp"
 #include "moab/Skinner.hpp"
 #include "moab/MeshTopoUtil.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "OrientedBox.hpp"
 #include "moab/CartVect.hpp"
 
@@ -1253,7 +1253,7 @@
       return result;
 
     number_array[ent_type] = temp_range.size(); //KGM
-    num_dim_array[MBCN::Dimension(ent_type)] += count;
+    num_dim_array[CN::Dimension(ent_type)] += count;
 
       //Check to make sure mesh set really has correct number of entities in it
     temp_range.clear();
@@ -1298,7 +1298,7 @@
       return MB_FAILURE;
       
     temp_range.clear();
-    result = MB->get_entities_by_dimension( ms_array[ent_type], MBCN::Dimension(ent_type), temp_range);
+    result = MB->get_entities_by_dimension( ms_array[ent_type], CN::Dimension(ent_type), temp_range);
     if(result != MB_SUCCESS)
       return result;
     if(number_array[ent_type] != temp_range.size())
@@ -1337,7 +1337,7 @@
     if (count != 0)
       return MB_FAILURE;
         
-    result = MB->get_number_entities_by_dimension( ms_array[ent_type], MBCN::Dimension(ent_type), count );
+    result = MB->get_number_entities_by_dimension( ms_array[ent_type], CN::Dimension(ent_type), count );
     if (result != MB_SUCCESS)
       return result;
     if ((unsigned)count != number_array[ent_type])
@@ -4984,7 +4984,7 @@
 {
     // various tests for canonical ordering
 
-    // MBCN::AdjacentSubEntities
+    // CN::AdjacentSubEntities
   std::vector<int> vec1, vec2;
   ErrorCode result;
 
@@ -4992,16 +4992,16 @@
 
   for (this_type = MBEDGE; this_type != MBKNIFE; this_type++) {
     
-    for (int i = 0; i < MBCN::VerticesPerEntity(this_type); i++) {
+    for (int i = 0; i < CN::VerticesPerEntity(this_type); i++) {
         // test for edges and faces
-      for (int dim = 1; dim <= MBCN::Dimension(this_type); dim++) {
+      for (int dim = 1; dim <= CN::Dimension(this_type); dim++) {
           // get the sides adjacent to this vertex
         vec1.clear();
-        int temp_result = MBCN::AdjacentSubEntities(this_type, &i, 1, 0, dim, vec1);
+        int temp_result = CN::AdjacentSubEntities(this_type, &i, 1, 0, dim, vec1);
                                      
         if (0 != temp_result ||
-            vec1.size() > (unsigned int) MBCN::NumSubEntities(this_type, dim)) {
-          cout << "failed getting sides for type " << MBCN::EntityTypeName(this_type)
+            vec1.size() > (unsigned int) CN::NumSubEntities(this_type, dim)) {
+          cout << "failed getting sides for type " << CN::EntityTypeName(this_type)
                << " dimension" << dim << endl;
           return MB_FAILURE;
         }
@@ -5010,21 +5010,21 @@
           // now get the vertices shared by these sides
         vec2.clear();
         temp_result = 
-          MBCN::AdjacentSubEntities(this_type, &vec1[0], vec1.size(), dim, 0,
+          CN::AdjacentSubEntities(this_type, &vec1[0], vec1.size(), dim, 0,
                                     vec2);
 
           // vertex side recovered should be i
         if (0 != temp_result || 
               // if dimension is same as DIMENSION(this_type), will get back all the
               // vertices in the entity
-            (dim == MBCN::Dimension(this_type) && 
-             vec2.size() != (unsigned int) MBCN::VerticesPerEntity(this_type)) ||
+            (dim == CN::Dimension(this_type) && 
+             vec2.size() != (unsigned int) CN::VerticesPerEntity(this_type)) ||
               // otherwise, we should get back only one vertex, and it should be the one
               // we started with
-            (dim != MBCN::Dimension(this_type) &&
+            (dim != CN::Dimension(this_type) &&
              (vec2.size() != 1 || vec2[0] != i))) {
           cout << "traversal from verts to sides to verts failed for " << endl
-               << "vertex " << i << " type " << MBCN::EntityTypeName(this_type) 
+               << "vertex " << i << " type " << CN::EntityTypeName(this_type) 
                << " dimension " << dim << endl;
           return MB_FAILURE;
         }
@@ -5032,7 +5032,7 @@
     }
   }
   
-    // MBCN::side_number
+    // CN::side_number
 
     // create vertices to use later
   double xyz[3] = {0.0, 0.0, 0.0};
@@ -5054,11 +5054,11 @@
     
       // make an entity of this type
     result = MB->create_element(this_type, vertex_handles, 
-                                MBCN::VerticesPerEntity(this_type),
+                                CN::VerticesPerEntity(this_type),
                                 this_entity);
     if (MB_SUCCESS != result || 0 == this_entity) {
       cout << "failed to create entity of type " 
-           << MBCN::EntityTypeName(this_type) << endl;
+           << CN::EntityTypeName(this_type) << endl;
       return MB_FAILURE;
     }
 
@@ -5067,30 +5067,30 @@
     int num_verts;
     result = MB->get_connectivity(this_entity, entity_vertices, num_verts);
     if (MB_SUCCESS != result || 
-        num_verts != MBCN::VerticesPerEntity(this_type)) {
+        num_verts != CN::VerticesPerEntity(this_type)) {
       cout << "failed to get connectivity for entity type " 
-           << MBCN::EntityTypeName(this_type) << endl;
+           << CN::EntityTypeName(this_type) << endl;
       return MB_FAILURE;
     }
     
       // for each dimension
-    for (int dim = 1; dim <= MBCN::Dimension(this_type); dim++) {
+    for (int dim = 1; dim <= CN::Dimension(this_type); dim++) {
         // for each side of this dimension
-      const MBCN::ConnMap &cm = MBCN::mConnectivityMap[this_type][dim-1];
+      const CN::ConnMap &cm = CN::mConnectivityMap[this_type][dim-1];
       int tmp_conn[MB_MAX_SUB_ENTITY_VERTICES];
 
-      for (int side_no = 0; side_no < MBCN::NumSubEntities(this_type, dim); side_no++) {
+      for (int side_no = 0; side_no < CN::NumSubEntities(this_type, dim); side_no++) {
 
         for (int j = 0; j < MB_MAX_SUB_ENTITY_VERTICES; j++) tmp_conn[j] = cm.conn[side_no][j];
         int temp_result = 
-          MBCN::SideNumber(this_type,
+          CN::SideNumber(this_type,
                            tmp_conn, 
-                           MBCN::VerticesPerEntity(MBCN::SubEntityType(this_type, dim, side_no)),
+                           CN::VerticesPerEntity(CN::SubEntityType(this_type, dim, side_no)),
                            dim, side, sense, offset);
         if (0 != temp_result) {
-          cout << "call to MBCN::side_number failed with non-success result"
+          cout << "call to CN::side_number failed with non-success result"
                << " for type " 
-               << MBCN::EntityTypeName(this_type) << " dimension " << dim 
+               << CN::EntityTypeName(this_type) << " dimension " << dim 
                << " side no " << side_no << endl;
           return MB_FAILURE;
         }
@@ -5098,8 +5098,8 @@
           // side number should be the same as side_no, sense should be forward, offset should
           // be zero
         if (side != side_no || sense != 1 || offset != 0) {
-          cout << "call to MBCN::side_number failed for type " 
-               << MBCN::EntityTypeName(this_type) << " dimension " << dim << " side no " 
+          cout << "call to CN::side_number failed for type " 
+               << CN::EntityTypeName(this_type) << " dimension " << dim << " side no " 
                << side_no << endl
                << "side, sense, offset = " << side << " " << sense << " " << offset << endl;
           return MB_FAILURE;
@@ -7574,7 +7574,7 @@
     
     int valid, side, sense, offset;
     for (int h = 0; h < 2; ++h) {
-      valid = MBCN::SideNumber( MBHEX, hexverts[h], conn, 4, 2, side, sense, offset );
+      valid = CN::SideNumber( MBHEX, hexverts[h], conn, 4, 2, side, sense, offset );
       if (valid != 0)
         continue;
       if (sense != 1) {
@@ -7586,7 +7586,7 @@
       
       int idx[9], len2;
       EntityType sidetype;
-      MBCN::SubEntityNodeIndices( MBHEX, 27, 2, side, sidetype, len2, idx );
+      CN::SubEntityNodeIndices( MBHEX, 27, 2, side, sidetype, len2, idx );
       assert(sidetype == MBQUAD);
       assert(len2 == 9);
       if ( conn[   offset     ] != hexverts[h][idx[0]] ||
@@ -7683,7 +7683,7 @@
     // create one reversed side
   EntityHandle side_conn[3];
   int side_indices[3] = {0,0,0};
-  MBCN::SubEntityVertexIndices(type, dim-1, 0, side_indices );
+  CN::SubEntityVertexIndices(type, dim-1, 0, side_indices );
   side_conn[0] = conn[0][side_indices[1]];
   side_conn[1] = conn[0][side_indices[0]];
   side_conn[2] = conn[0][side_indices[2]];
@@ -7764,7 +7764,7 @@
   for (int i = 0; i < 6; ++i) {
     EntityHandle conn[6] = { verts[0][6], verts[0][(i+1)%6], verts[0][i],
                                verts[1][6], verts[1][(i+1)%6], verts[1][i] };
-    rval = mb.create_element( type, conn, MBCN::VerticesPerEntity(type), elems[i] );
+    rval = mb.create_element( type, conn, CN::VerticesPerEntity(type), elems[i] );
     if (MB_SUCCESS != rval) return rval;
   }
   
@@ -7879,7 +7879,7 @@
     EntityHandle conn[8] = { v[0][i], v[0][i+1], v[0][i+4], v[0][i+3],
                                v[1][i], v[1][i+1], v[1][i+4], v[1][i+3] };
     memcpy( econn[i], conn, sizeof(conn) );
-    rval = mb.create_element( type, conn, MBCN::VerticesPerEntity(type), elems[i] );
+    rval = mb.create_element( type, conn, CN::VerticesPerEntity(type), elems[i] );
     if (MB_SUCCESS != rval) return rval;
     input.insert( elems[i] );
   }
@@ -7887,10 +7887,10 @@
     // create sides
     // NOTE: Shared side is element 0 side 1 and element 1 side 3
   Range expected;
-  for (int i = 0; i < MBCN::NumSubEntities( type, dimension-1 ); ++i) {
+  for (int i = 0; i < CN::NumSubEntities( type, dimension-1 ); ++i) {
     EntityType subtype;
     int len;
-    const short* indices = MBCN::SubEntityVertexIndices( type, dimension-1,
+    const short* indices = CN::SubEntityVertexIndices( type, dimension-1,
                                                          i, subtype, len );
     EntityHandle conn[4];
     assert((size_t)len <= sizeof(conn)/sizeof(conn[0]));
@@ -8127,11 +8127,11 @@
     // Check command line arg to see if we should avoid doing the stress test
   bool stress_test = true;
 
-  std::cout << "Size of mConnMap = " << sizeof(MBCN::mConnectivityMap)
+  std::cout << "Size of mConnMap = " << sizeof(CN::mConnectivityMap)
             << std::endl;
-  std::cout << "Size of mUpConnMap = " << sizeof(MBCN::mUpConnMap)
+  std::cout << "Size of mUpConnMap = " << sizeof(CN::mUpConnMap)
             << std::endl;
-  std::cout << "Size of MBCN = " << sizeof(MBCN)
+  std::cout << "Size of CN = " << sizeof(CN)
             << std::endl;
     
   for (int i = 1; i < argc; ++i) {

Modified: MOAB/trunk/test/Makefile.am
===================================================================
--- MOAB/trunk/test/Makefile.am	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/Makefile.am	2010-03-17 20:58:51 UTC (rev 3647)
@@ -142,8 +142,8 @@
 
 tag_test_SOURCES = TestUtil.hpp TagTest.cpp
 
-mbcn_test_SOURCES = $(top_srcdir)/src/moab/MBCN.hpp \
-                    $(top_srcdir)/src/MBCN.cpp \
+mbcn_test_SOURCES = $(top_srcdir)/src/moab/CN.hpp \
+                    $(top_srcdir)/src/CN.cpp \
                     mbcn_test.cc
 
 bsp_tree_poly_test_SOURCES = bsp_tree_poly_test.cpp

Modified: MOAB/trunk/test/Test_MBMeshSet.cpp
===================================================================
--- MOAB/trunk/test/Test_MBMeshSet.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/Test_MBMeshSet.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -233,7 +233,7 @@
   iter_type i = begin;
   EntityType prev_type = TYPE_FROM_HANDLE(*i);
   EntityHandle prev_ent = *i;
-  str << ' ' << MBCN::EntityTypeName(prev_type) << ' ' << ID_FROM_HANDLE(*i);
+  str << ' ' << CN::EntityTypeName(prev_type) << ' ' << ID_FROM_HANDLE(*i);
   for (;;) {
     iter_type j = i;
     for (++j, ++prev_ent; j != end && *j == prev_ent; ++j, ++prev_ent);
@@ -249,7 +249,7 @@
     
     str << ',';
     if (TYPE_FROM_HANDLE(*i) != prev_type) 
-      str << ' ' << MBCN::EntityTypeName(prev_type = TYPE_FROM_HANDLE(*i));
+      str << ' ' << CN::EntityTypeName(prev_type = TYPE_FROM_HANDLE(*i));
     str << ' ' << ID_FROM_HANDLE(*i);
     prev_ent = *i;
   }
@@ -400,7 +400,7 @@
   CHECK_ERR(rval);
   std::vector<EntityHandle>::iterator i = expected.begin();
   while (i != expected.end()) {
-    if (MBCN::Dimension(TYPE_FROM_HANDLE(*i)) != dim)
+    if (CN::Dimension(TYPE_FROM_HANDLE(*i)) != dim)
       i = expected.erase( i );
     else
       ++i;

Modified: MOAB/trunk/test/h5file/h5file_test.cpp
===================================================================
--- MOAB/trunk/test/h5file/h5file_test.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/h5file/h5file_test.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -19,7 +19,7 @@
 #include "moab/Core.hpp"
 #include "moab/Range.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 #define filename "h5test.h5m"
 
@@ -567,7 +567,7 @@
       if (counts1[j] != counts2[j])
       {
         fprintf(stderr, "Sets with id %d have differing numbers of %s: %u and %u\n",
-                id, MBCN::EntityTypeName((EntityType)j), counts1[j], counts2[j] );
+                id, CN::EntityTypeName((EntityType)j), counts1[j], counts2[j] );
         ok = false;
       }
     if (!ok)

Modified: MOAB/trunk/test/io/cub_file_test.cc
===================================================================
--- MOAB/trunk/test/io/cub_file_test.cc	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/io/cub_file_test.cc	2010-03-17 20:58:51 UTC (rev 3647)
@@ -3,7 +3,7 @@
 #include "Tqdcfr.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "FileOptions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <math.h>
 #include <algorithm>
 
@@ -835,11 +835,11 @@
   CHECK_ERR(rval);
   
   int sub_ent_indices[4];
-  MBCN::SubEntityVertexIndices( TYPE_FROM_HANDLE(entity), side_dim, side_num, 
+  CN::SubEntityVertexIndices( TYPE_FROM_HANDLE(entity), side_dim, side_num, 
                                 sub_ent_indices );
-  EntityType subtype = MBCN::SubEntityType( TYPE_FROM_HANDLE(entity),
+  EntityType subtype = CN::SubEntityType( TYPE_FROM_HANDLE(entity),
                                               side_dim, side_num );
-  int sub_ent_corners = MBCN::VerticesPerEntity(subtype);
+  int sub_ent_corners = CN::VerticesPerEntity(subtype);
   
   const EntityHandle* conn;
   int conn_len;
@@ -891,12 +891,12 @@
     CHECK_ERR(rval);
     
     int ho[4];
-    MBCN::HasMidNodes( type, conn_len, ho );
-    for (int dim = MBCN::Dimension(type)-1; dim > 0; --dim) {
+    CN::HasMidNodes( type, conn_len, ho );
+    for (int dim = CN::Dimension(type)-1; dim > 0; --dim) {
       if (!ho[dim])
         continue;
         
-      for (int j = 0; j < MBCN::NumSubEntities( type, dim ); ++j) {
+      for (int j = 0; j < CN::NumSubEntities( type, dim ); ++j) {
         EntityHandle side = find_side( moab, entity, dim, j );
         if (!side)
           continue;
@@ -906,8 +906,8 @@
         rval = moab.get_connectivity( side, side_conn, side_len );
         CHECK_ERR(rval);
         
-        int this_idx = MBCN::HONodeIndex( type, conn_len, dim, j );
-        int side_idx = MBCN::HONodeIndex( TYPE_FROM_HANDLE(side), side_len, dim, 0 );
+        int this_idx = CN::HONodeIndex( type, conn_len, dim, j );
+        int side_idx = CN::HONodeIndex( TYPE_FROM_HANDLE(side), side_len, dim, 0 );
         CHECK_EQUAL( side_conn[side_idx], conn[this_idx] );
       }
     }
@@ -931,27 +931,27 @@
   CHECK_ERR(rval);
   
     // calculate and verify expected number of mid nodes
-  int num_nodes = MBCN::VerticesPerEntity(type);
-  for (int d = 1; d <= MBCN::Dimension(type); ++d)
+  int num_nodes = CN::VerticesPerEntity(type);
+  for (int d = 1; d <= CN::Dimension(type); ++d)
     if (mid_nodes[d])
-      num_nodes += MBCN::NumSubEntities(type, d);
+      num_nodes += CN::NumSubEntities(type, d);
   CHECK_EQUAL( num_nodes, conn_len );
   
     // verify that each higher-order node is at the center
     // of its respective sub-entity.
-  for (int i = MBCN::VerticesPerEntity(type); i < num_nodes; ++i) {
+  for (int i = CN::VerticesPerEntity(type); i < num_nodes; ++i) {
       // get sub-entity owning ho-node  
     int sub_dim, sub_num;
-    MBCN::HONodeParent( type, num_nodes, i, sub_dim, sub_num );
+    CN::HONodeParent( type, num_nodes, i, sub_dim, sub_num );
       // get corner vertex indices
     int sub_conn[8], num_sub;
-    if (sub_dim < MBCN::Dimension(type)) {
-      MBCN::SubEntityVertexIndices( type, sub_dim, sub_num, sub_conn );
-      EntityType sub_type = MBCN::SubEntityType( type, sub_dim, sub_num );
-      num_sub = MBCN::VerticesPerEntity( sub_type );
+    if (sub_dim < CN::Dimension(type)) {
+      CN::SubEntityVertexIndices( type, sub_dim, sub_num, sub_conn );
+      EntityType sub_type = CN::SubEntityType( type, sub_dim, sub_num );
+      num_sub = CN::VerticesPerEntity( sub_type );
     }
     else {
-      num_sub = MBCN::VerticesPerEntity(type);
+      num_sub = CN::VerticesPerEntity(type);
       for (int j = 0; j < num_sub; ++j)
         sub_conn[j] = j;
     }
@@ -993,7 +993,7 @@
   // get material sets with expected higher-order nodes
   Range blocks;
   int ho_flags[4];
-  MBCN::HasMidNodes( type, num_nodes, ho_flags );
+  CN::HasMidNodes( type, num_nodes, ho_flags );
   Tag tags[2] = {ho_tag, block_tag};
   void* vals[2] = {ho_flags, NULL};
   rval = mb.get_entities_by_type_and_tag( 0, MBENTITYSET, tags, vals, 2, blocks );

Modified: MOAB/trunk/test/io/exodus_test.cc
===================================================================
--- MOAB/trunk/test/io/exodus_test.cc	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/io/exodus_test.cc	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,7 +1,7 @@
 #include "TestUtil.hpp"
 #include "moab/Core.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #define IS_BUILDING_MB
 #include "ReadNCDF.hpp"
 #include "WriteNCDF.hpp"
@@ -112,12 +112,12 @@
 void check_type( const TestType& type )
 {
   int has_mid_nodes[4];
-  MBCN::HasMidNodes( type.moab_type, type.num_nodes, has_mid_nodes );
+  CN::HasMidNodes( type.moab_type, type.num_nodes, has_mid_nodes );
   
   CHECK_EQUAL( type.moab_type, ExoIIUtil::ExoIIElementMBEntity[type.exo_type] );
   CHECK_EQUAL( type.name, std::string( ExoIIUtil::ElementTypeNames[type.exo_type] ) );
   CHECK_EQUAL( type.num_nodes, ExoIIUtil::VerticesPerElement[type.exo_type] );
-  switch (MBCN::Dimension(type.moab_type)) {
+  switch (CN::Dimension(type.moab_type)) {
     case 3: CHECK_EQUAL( has_mid_nodes[3], ExoIIUtil::HasMidNodes[type.exo_type][3] );
     case 2: CHECK_EQUAL( has_mid_nodes[2], ExoIIUtil::HasMidNodes[type.exo_type][2] );
     case 1: CHECK_EQUAL( has_mid_nodes[1], ExoIIUtil::HasMidNodes[type.exo_type][1] );
@@ -248,27 +248,27 @@
   CHECK_ERR(rval);
   
     // calculate and verify expected number of mid nodes
-  int num_nodes = MBCN::VerticesPerEntity(type);
-  for (int d = 1; d <= MBCN::Dimension(type); ++d)
+  int num_nodes = CN::VerticesPerEntity(type);
+  for (int d = 1; d <= CN::Dimension(type); ++d)
     if (mid_nodes[d])
-      num_nodes += MBCN::NumSubEntities(type, d);
+      num_nodes += CN::NumSubEntities(type, d);
   CHECK_EQUAL( num_nodes, conn_len );
   
     // verify that each higher-order node is at the center
     // of its respective sub-entity.
-  for (int i = MBCN::VerticesPerEntity(type); i < num_nodes; ++i) {
+  for (int i = CN::VerticesPerEntity(type); i < num_nodes; ++i) {
       // get sub-entity owning ho-node  
     int sub_dim, sub_num;
-    MBCN::HONodeParent( type, num_nodes, i, sub_dim, sub_num );
+    CN::HONodeParent( type, num_nodes, i, sub_dim, sub_num );
       // get corner vertex indices
     int sub_conn[8], num_sub;
-    if (sub_dim < MBCN::Dimension(type)) {
-      MBCN::SubEntityVertexIndices( type, sub_dim, sub_num, sub_conn );
-      EntityType sub_type = MBCN::SubEntityType( type, sub_dim, sub_num );
-      num_sub = MBCN::VerticesPerEntity( sub_type );
+    if (sub_dim < CN::Dimension(type)) {
+      CN::SubEntityVertexIndices( type, sub_dim, sub_num, sub_conn );
+      EntityType sub_type = CN::SubEntityType( type, sub_dim, sub_num );
+      num_sub = CN::VerticesPerEntity( sub_type );
     }
     else {
-      num_sub = MBCN::VerticesPerEntity(type);
+      num_sub = CN::VerticesPerEntity(type);
       for (int j = 0; j < num_sub; ++j)
         sub_conn[j] = j;
     }
@@ -346,7 +346,7 @@
   Core mb_impl1, mb_impl2;
   Interface &mb1 = mb_impl1, &mb2 = mb_impl2;
   int ho_flags[4];
-  MBCN::HasMidNodes( type, num_nodes, ho_flags );
+  CN::HasMidNodes( type, num_nodes, ho_flags );
 
     // read file 
   read_file( mb1, ho_file );
@@ -379,7 +379,7 @@
   
   // check expected element connectivity
   int ho_flags[4];
-  MBCN::HasMidNodes( sideset_type, sideset_nodes_per_elem, ho_flags );
+  CN::HasMidNodes( sideset_type, sideset_nodes_per_elem, ho_flags );
   check_ho_elements( moab, set, sideset_type, ho_flags );
   
   if (shell_side)
@@ -390,7 +390,7 @@
   ErrorCode rval = mb_impl.get_entities_by_handle( set, elems );
   CHECK_ERR(rval);
   
-  int dim = MBCN::Dimension( sideset_type );
+  int dim = CN::Dimension( sideset_type );
   for (Range::iterator i= elems.begin(); i != elems.end(); ++i) {
     Range adj;
     rval = mb_impl.get_adjacencies( &*i, 1, dim+1, false, adj, Interface::UNION );

Modified: MOAB/trunk/test/io/gmsh_test.cc
===================================================================
--- MOAB/trunk/test/io/gmsh_test.cc	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/io/gmsh_test.cc	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,7 +1,6 @@
 #include "TestUtil.hpp"
 #include "moab/Core.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
 #include "ReadGmsh.hpp"
 #include "FileOptions.hpp"
 #include <math.h>

Modified: MOAB/trunk/test/io/nastran_test.cc
===================================================================
--- MOAB/trunk/test/io/nastran_test.cc	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/io/nastran_test.cc	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,7 +1,6 @@
 #include "TestUtil.hpp"
 #include "moab/Core.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
 #define IS_BUILDING_MB
 #include "ReadNASTRAN.hpp"
 #include "moab/Range.hpp"

Modified: MOAB/trunk/test/mbcn_test.cc
===================================================================
--- MOAB/trunk/test/mbcn_test.cc	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/mbcn_test.cc	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,5 +1,5 @@
 #include "TestUtil.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 using namespace moab;
 
@@ -148,19 +148,19 @@
 {
   DimensionPair dp;
   
-  dp = MBCN::TypeDimensionMap[0];
+  dp = CN::TypeDimensionMap[0];
   CHECK_EQUAL( MBVERTEX, dp.first );  
   CHECK_EQUAL( MBVERTEX, dp.second );
   
-  dp = MBCN::TypeDimensionMap[1];
+  dp = CN::TypeDimensionMap[1];
   CHECK_EQUAL( MBEDGE, dp.first );  
   CHECK_EQUAL( MBEDGE, dp.second );
   
-  dp = MBCN::TypeDimensionMap[2];
+  dp = CN::TypeDimensionMap[2];
   CHECK_EQUAL( MBTRI, dp.first );  
   CHECK_EQUAL( MBPOLYGON, dp.second );
   
-  dp = MBCN::TypeDimensionMap[3];
+  dp = CN::TypeDimensionMap[3];
   CHECK_EQUAL( MBTET, dp.first );  
   CHECK_EQUAL( MBPOLYHEDRON, dp.second );
 }
@@ -168,114 +168,114 @@
 void test_type_names()
 {
   for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t) {
-    const char* name = MBCN::EntityTypeName(t);
-    CHECK_EQUAL( t, MBCN::EntityTypeFromName(name) );
+    const char* name = CN::EntityTypeName(t);
+    CHECK_EQUAL( t, CN::EntityTypeFromName(name) );
   }
 }
 
 void test_dimension()
 {
-  CHECK_EQUAL( 0, MBCN::Dimension(MBVERTEX) );
-  CHECK_EQUAL( 1, MBCN::Dimension(MBEDGE) );
-  CHECK_EQUAL( 2, MBCN::Dimension(MBTRI) );
-  CHECK_EQUAL( 2, MBCN::Dimension(MBQUAD) );
-  CHECK_EQUAL( 2, MBCN::Dimension(MBPOLYGON) );
-  CHECK_EQUAL( 3, MBCN::Dimension(MBTET) );
-  CHECK_EQUAL( 3, MBCN::Dimension(MBPYRAMID) );
-  CHECK_EQUAL( 3, MBCN::Dimension(MBPRISM) );
-  CHECK_EQUAL( 3, MBCN::Dimension(MBKNIFE) );
-  CHECK_EQUAL( 3, MBCN::Dimension(MBHEX) );
-  CHECK_EQUAL( 3, MBCN::Dimension(MBPOLYHEDRON) );
+  CHECK_EQUAL( 0, CN::Dimension(MBVERTEX) );
+  CHECK_EQUAL( 1, CN::Dimension(MBEDGE) );
+  CHECK_EQUAL( 2, CN::Dimension(MBTRI) );
+  CHECK_EQUAL( 2, CN::Dimension(MBQUAD) );
+  CHECK_EQUAL( 2, CN::Dimension(MBPOLYGON) );
+  CHECK_EQUAL( 3, CN::Dimension(MBTET) );
+  CHECK_EQUAL( 3, CN::Dimension(MBPYRAMID) );
+  CHECK_EQUAL( 3, CN::Dimension(MBPRISM) );
+  CHECK_EQUAL( 3, CN::Dimension(MBKNIFE) );
+  CHECK_EQUAL( 3, CN::Dimension(MBHEX) );
+  CHECK_EQUAL( 3, CN::Dimension(MBPOLYHEDRON) );
 }
 
 void test_vertices_per_entity()
 {
-  CHECK_EQUAL( 1, MBCN::VerticesPerEntity(MBVERTEX) );
-  CHECK_EQUAL( 2, MBCN::VerticesPerEntity(MBEDGE) );
-  CHECK_EQUAL( 3, MBCN::VerticesPerEntity(MBTRI) );
-  CHECK_EQUAL( 4, MBCN::VerticesPerEntity(MBQUAD) );
-  CHECK_EQUAL( 4, MBCN::VerticesPerEntity(MBTET) );
-  CHECK_EQUAL( 5, MBCN::VerticesPerEntity(MBPYRAMID) );
-  CHECK_EQUAL( 6, MBCN::VerticesPerEntity(MBPRISM) );
-  CHECK_EQUAL( 7, MBCN::VerticesPerEntity(MBKNIFE) );
-  CHECK_EQUAL( 8, MBCN::VerticesPerEntity(MBHEX) );
+  CHECK_EQUAL( 1, CN::VerticesPerEntity(MBVERTEX) );
+  CHECK_EQUAL( 2, CN::VerticesPerEntity(MBEDGE) );
+  CHECK_EQUAL( 3, CN::VerticesPerEntity(MBTRI) );
+  CHECK_EQUAL( 4, CN::VerticesPerEntity(MBQUAD) );
+  CHECK_EQUAL( 4, CN::VerticesPerEntity(MBTET) );
+  CHECK_EQUAL( 5, CN::VerticesPerEntity(MBPYRAMID) );
+  CHECK_EQUAL( 6, CN::VerticesPerEntity(MBPRISM) );
+  CHECK_EQUAL( 7, CN::VerticesPerEntity(MBKNIFE) );
+  CHECK_EQUAL( 8, CN::VerticesPerEntity(MBHEX) );
 }
 
 void test_num_sub_entities()
 {
-  CHECK_EQUAL( 1, MBCN::NumSubEntities(MBVERTEX, 0));
+  CHECK_EQUAL( 1, CN::NumSubEntities(MBVERTEX, 0));
 
-  CHECK_EQUAL( 2, MBCN::NumSubEntities(MBEDGE, 0));
-  CHECK_EQUAL( 1, MBCN::NumSubEntities(MBEDGE, 1));
+  CHECK_EQUAL( 2, CN::NumSubEntities(MBEDGE, 0));
+  CHECK_EQUAL( 1, CN::NumSubEntities(MBEDGE, 1));
 
-  CHECK_EQUAL( 3, MBCN::NumSubEntities(MBTRI, 0));
-  CHECK_EQUAL( 3, MBCN::NumSubEntities(MBTRI, 1));
-  CHECK_EQUAL( 1, MBCN::NumSubEntities(MBTRI, 2));
+  CHECK_EQUAL( 3, CN::NumSubEntities(MBTRI, 0));
+  CHECK_EQUAL( 3, CN::NumSubEntities(MBTRI, 1));
+  CHECK_EQUAL( 1, CN::NumSubEntities(MBTRI, 2));
 
-  CHECK_EQUAL( 4, MBCN::NumSubEntities(MBQUAD, 0));
-  CHECK_EQUAL( 4, MBCN::NumSubEntities(MBQUAD, 1));
-  CHECK_EQUAL( 1, MBCN::NumSubEntities(MBQUAD, 2));
+  CHECK_EQUAL( 4, CN::NumSubEntities(MBQUAD, 0));
+  CHECK_EQUAL( 4, CN::NumSubEntities(MBQUAD, 1));
+  CHECK_EQUAL( 1, CN::NumSubEntities(MBQUAD, 2));
 
-  CHECK_EQUAL( 4, MBCN::NumSubEntities(MBTET, 0));
-  CHECK_EQUAL( 6, MBCN::NumSubEntities(MBTET, 1));
-  CHECK_EQUAL( 4, MBCN::NumSubEntities(MBTET, 2));
+  CHECK_EQUAL( 4, CN::NumSubEntities(MBTET, 0));
+  CHECK_EQUAL( 6, CN::NumSubEntities(MBTET, 1));
+  CHECK_EQUAL( 4, CN::NumSubEntities(MBTET, 2));
 
-  CHECK_EQUAL( 5, MBCN::NumSubEntities(MBPYRAMID, 0));
-  CHECK_EQUAL( 8, MBCN::NumSubEntities(MBPYRAMID, 1));
-  CHECK_EQUAL( 5, MBCN::NumSubEntities(MBPYRAMID, 2));
+  CHECK_EQUAL( 5, CN::NumSubEntities(MBPYRAMID, 0));
+  CHECK_EQUAL( 8, CN::NumSubEntities(MBPYRAMID, 1));
+  CHECK_EQUAL( 5, CN::NumSubEntities(MBPYRAMID, 2));
 
-  CHECK_EQUAL( 6, MBCN::NumSubEntities(MBPRISM, 0));
-  CHECK_EQUAL( 9, MBCN::NumSubEntities(MBPRISM, 1));
-  CHECK_EQUAL( 5, MBCN::NumSubEntities(MBPRISM, 2));
+  CHECK_EQUAL( 6, CN::NumSubEntities(MBPRISM, 0));
+  CHECK_EQUAL( 9, CN::NumSubEntities(MBPRISM, 1));
+  CHECK_EQUAL( 5, CN::NumSubEntities(MBPRISM, 2));
 
-  CHECK_EQUAL( 7, MBCN::NumSubEntities(MBKNIFE, 0));
-  CHECK_EQUAL(10, MBCN::NumSubEntities(MBKNIFE, 1));
-  CHECK_EQUAL( 5, MBCN::NumSubEntities(MBKNIFE, 2));
+  CHECK_EQUAL( 7, CN::NumSubEntities(MBKNIFE, 0));
+  CHECK_EQUAL(10, CN::NumSubEntities(MBKNIFE, 1));
+  CHECK_EQUAL( 5, CN::NumSubEntities(MBKNIFE, 2));
 
-  CHECK_EQUAL( 8, MBCN::NumSubEntities(MBHEX, 0));
-  CHECK_EQUAL( 12, MBCN::NumSubEntities(MBHEX, 1));
-  CHECK_EQUAL( 6, MBCN::NumSubEntities(MBHEX, 2));
+  CHECK_EQUAL( 8, CN::NumSubEntities(MBHEX, 0));
+  CHECK_EQUAL( 12, CN::NumSubEntities(MBHEX, 1));
+  CHECK_EQUAL( 6, CN::NumSubEntities(MBHEX, 2));
 }
 
 void do_test_sub_entity_type_2d( EntityType type )
 {
-  for (int j = 0; j < MBCN::VerticesPerEntity(type); ++j) {
-    CHECK_EQUAL( MBVERTEX, MBCN::SubEntityType(type, 0, j ) );
-    CHECK_EQUAL( MBEDGE,   MBCN::SubEntityType(type, 1, j ) );
+  for (int j = 0; j < CN::VerticesPerEntity(type); ++j) {
+    CHECK_EQUAL( MBVERTEX, CN::SubEntityType(type, 0, j ) );
+    CHECK_EQUAL( MBEDGE,   CN::SubEntityType(type, 1, j ) );
   }
-  CHECK_EQUAL( type, MBCN::SubEntityType(type, 2, 0) );
+  CHECK_EQUAL( type, CN::SubEntityType(type, 2, 0) );
 }
 
 void do_test_sub_entity_type_3d( EntityType type,
                                  int num_faces,
                                  const EntityType* face_types )
 {
-  for (int j = 0; j < MBCN::VerticesPerEntity(type); ++j) {
-    CHECK_EQUAL( MBVERTEX, MBCN::SubEntityType(type, 0, j ) );
+  for (int j = 0; j < CN::VerticesPerEntity(type); ++j) {
+    CHECK_EQUAL( MBVERTEX, CN::SubEntityType(type, 0, j ) );
   }
 
-  for (int j = 0; j < MBCN::NumSubEntities(type,1); ++j) {
-    CHECK_EQUAL( MBEDGE, MBCN::SubEntityType(type, 1, j ) );
+  for (int j = 0; j < CN::NumSubEntities(type,1); ++j) {
+    CHECK_EQUAL( MBEDGE, CN::SubEntityType(type, 1, j ) );
   }
 
   for (int j = 0; j < num_faces; ++j) {
-    EntityType sub_type = MBCN::SubEntityType( type, 2, j );
+    EntityType sub_type = CN::SubEntityType( type, 2, j );
     CHECK_EQUAL( face_types[j], sub_type );
   }
 
-  CHECK_EQUAL( type, MBCN::SubEntityType(type, 3, 0) );
+  CHECK_EQUAL( type, CN::SubEntityType(type, 3, 0) );
 }
 
 void test_sub_entity_type_vtx()
 {
-  CHECK_EQUAL( MBVERTEX, MBCN::SubEntityType(MBVERTEX, 0, 0 ));
+  CHECK_EQUAL( MBVERTEX, CN::SubEntityType(MBVERTEX, 0, 0 ));
 }
 
 void test_sub_entity_type_edge()
 {
-  CHECK_EQUAL( MBVERTEX, MBCN::SubEntityType(MBEDGE, 0, 0 ));
-  CHECK_EQUAL( MBVERTEX, MBCN::SubEntityType(MBEDGE, 0, 1 ));
-  CHECK_EQUAL( MBEDGE  , MBCN::SubEntityType(MBEDGE, 1, 0 ));
+  CHECK_EQUAL( MBVERTEX, CN::SubEntityType(MBEDGE, 0, 0 ));
+  CHECK_EQUAL( MBVERTEX, CN::SubEntityType(MBEDGE, 0, 1 ));
+  CHECK_EQUAL( MBEDGE  , CN::SubEntityType(MBEDGE, 1, 0 ));
 }
 
 void test_sub_entity_type_tri()
@@ -325,7 +325,7 @@
     // zero input array
     int indices[2] = { 0, -100 };
     // check correct results
-    MBCN::SubEntityVertexIndices( type, 0, i, indices );
+    CN::SubEntityVertexIndices( type, 0, i, indices );
     CHECK_EQUAL( i, indices[0] );
     // check didn't write past end of array
     CHECK_EQUAL( -100, indices[1] );
@@ -339,7 +339,7 @@
     // zero input array
     int indices[3] = { 0, 0, -99 };
     // check correct results
-    MBCN::SubEntityVertexIndices( type, 1, i, indices );
+    CN::SubEntityVertexIndices( type, 1, i, indices );
     if (edge_indices[i][0] == indices[0]) {
       CHECK_EQUAL( edge_indices[i][1], indices[1] );
     }
@@ -359,7 +359,7 @@
     // zero input array
     int indices[5] = { 0, 0, 0, -99, -99 };
     // check correct results
-    MBCN::SubEntityVertexIndices( type, 2, i, indices );
+    CN::SubEntityVertexIndices( type, 2, i, indices );
     const int num_vtx = face_indices[i][0];
     if (num_vtx != 3) CHECK_EQUAL( 4, num_vtx );
     const int* exp_index = face_indices[i] + 1;
@@ -394,7 +394,7 @@
 void test_elem_as_sub_entity( EntityType type, int dim, int num_vertices )
 { 
   int indices[9] = { -2, -2, -2, -2, -2, -2, -2, -2, -2 };
-  MBCN::SubEntityVertexIndices( type, dim, 0, indices );
+  CN::SubEntityVertexIndices( type, dim, 0, indices );
   for (int i = 0; i < num_vertices; ++i)
     CHECK_EQUAL( i, indices[i] );
   // make sure didn't write past end
@@ -534,19 +534,19 @@
   const int elem_verts[] = { 7400, 6233, 3027, 0454, 6839, 5391, 7735, 3603 };
   // get side indices
   int side_idx[4] = { 0, 0 };
-  MBCN::SubEntityVertexIndices( type, 1, idx, side_idx );
+  CN::SubEntityVertexIndices( type, 1, idx, side_idx );
 
   // "reversed" and "offset" are the same thing for edges.
   int side_conn[2] = { elem_verts[side_idx[0]], elem_verts[side_idx[1]] };
   int rev_conn[2] = { elem_verts[side_idx[1]], elem_verts[side_idx[0]] };
   int result_side = -100, result_sense = -100, result_offset = -100;
-  int err= MBCN::SideNumber( type, elem_verts, side_conn, 2, 1, 
+  int err= CN::SideNumber( type, elem_verts, side_conn, 2, 1, 
                              result_side, result_sense, result_offset );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( idx, result_side );
   CHECK_EQUAL( 1, result_sense );
   CHECK_EQUAL( 0, result_offset);
-  err= MBCN::SideNumber( type, elem_verts, rev_conn, 2, 1, 
+  err= CN::SideNumber( type, elem_verts, rev_conn, 2, 1, 
                          result_side, result_sense, result_offset );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( idx, result_side );
@@ -558,9 +558,9 @@
   // define a random handle list
   const int elem_verts[] = { 7400, 6233, 3027, 0454, 6839, 5391, 7735, 3603 };
   // get side indices
-  const int side_size = MBCN::VerticesPerEntity( MBCN::SubEntityType( type, 2, idx ) );
+  const int side_size = CN::VerticesPerEntity( CN::SubEntityType( type, 2, idx ) );
   int side_idx[4] = { 0, 0, 0, 0 };
-  MBCN::SubEntityVertexIndices( type, 2, idx, side_idx );
+  CN::SubEntityVertexIndices( type, 2, idx, side_idx );
 
   // for each possible forward or reverse offset
   for (int rev = -1; rev < 2; rev += 2) {
@@ -570,7 +570,7 @@
         side_conn[(side_size+rev*i)%side_size] = elem_verts[side_idx[(i+off)%side_size]];
       
       int result_side = -100, result_sense = -100, result_offset = -100;
-      int err = MBCN::SideNumber( type, elem_verts, side_conn, side_size, 2, 
+      int err = CN::SideNumber( type, elem_verts, side_conn, side_size, 2, 
                                   result_side, result_sense, result_offset );
       CHECK_EQUAL( 0, err );
       CHECK_EQUAL( idx, result_side );
@@ -628,27 +628,27 @@
 void test_opposite_side_tri()
 {
   int idx, dim, err;
-  err = MBCN::OppositeSide( MBTRI, 0, 0, idx, dim );
+  err = CN::OppositeSide( MBTRI, 0, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 1, idx );
-  err = MBCN::OppositeSide( MBTRI, 1, 0, idx, dim );
+  err = CN::OppositeSide( MBTRI, 1, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBTRI, 2, 0, idx, dim );
+  err = CN::OppositeSide( MBTRI, 2, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBTRI, 0, 1, idx, dim );
+  err = CN::OppositeSide( MBTRI, 0, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBTRI, 1, 1, idx, dim );
+  err = CN::OppositeSide( MBTRI, 1, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBTRI, 2, 1, idx, dim );
+  err = CN::OppositeSide( MBTRI, 2, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 1, idx );
@@ -657,36 +657,36 @@
 void test_opposite_side_quad()
 {
   int idx, dim, err;
-  err = MBCN::OppositeSide( MBQUAD, 0, 0, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 0, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBQUAD, 1, 0, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 1, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 3, idx );
-  err = MBCN::OppositeSide( MBQUAD, 2, 0, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 2, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBQUAD, 3, 0, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 3, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 1, idx );
 
-  err = MBCN::OppositeSide( MBQUAD, 0, 1, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 0, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBQUAD, 1, 1, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 1, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 3, idx );
-  err = MBCN::OppositeSide( MBQUAD, 2, 1, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 2, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBQUAD, 3, 1, idx, dim );
+  err = CN::OppositeSide( MBQUAD, 3, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 1, idx );
@@ -696,61 +696,61 @@
 {
   int idx, dim, err;
   
-  err = MBCN::OppositeSide( MBTET, 0, 0, idx, dim );
+  err = CN::OppositeSide( MBTET, 0, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 1, idx );
-  err = MBCN::OppositeSide( MBTET, 1, 0, idx, dim );
+  err = CN::OppositeSide( MBTET, 1, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBTET, 2, 0, idx, dim );
+  err = CN::OppositeSide( MBTET, 2, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBTET, 3, 0, idx, dim );
+  err = CN::OppositeSide( MBTET, 3, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 3, idx );
   
-  err = MBCN::OppositeSide( MBTET, 0, 2, idx, dim );
+  err = CN::OppositeSide( MBTET, 0, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBTET, 1, 2, idx, dim );
+  err = CN::OppositeSide( MBTET, 1, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBTET, 2, 2, idx, dim );
+  err = CN::OppositeSide( MBTET, 2, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 1, idx );
-  err = MBCN::OppositeSide( MBTET, 3, 2, idx, dim );
+  err = CN::OppositeSide( MBTET, 3, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 3, idx );
   
-  err = MBCN::OppositeSide( MBTET, 0, 1, idx, dim );
+  err = CN::OppositeSide( MBTET, 0, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 5, idx );
-  err = MBCN::OppositeSide( MBTET, 1, 1, idx, dim );
+  err = CN::OppositeSide( MBTET, 1, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 3, idx );
-  err = MBCN::OppositeSide( MBTET, 2, 1, idx, dim );
+  err = CN::OppositeSide( MBTET, 2, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 4, idx );
-  err = MBCN::OppositeSide( MBTET, 3, 1, idx, dim );
+  err = CN::OppositeSide( MBTET, 3, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 1, idx );
-  err = MBCN::OppositeSide( MBTET, 4, 1, idx, dim );
+  err = CN::OppositeSide( MBTET, 4, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBTET, 5, 1, idx, dim );
+  err = CN::OppositeSide( MBTET, 5, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 0, idx );
@@ -761,109 +761,109 @@
 {
   int idx, dim, err;
   
-  err = MBCN::OppositeSide( MBHEX, 0, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 0, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 6, idx );
-  err = MBCN::OppositeSide( MBHEX, 1, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 1, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 7, idx );
-  err = MBCN::OppositeSide( MBHEX, 2, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 2, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 4, idx );
-  err = MBCN::OppositeSide( MBHEX, 3, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 3, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 5, idx );
-  err = MBCN::OppositeSide( MBHEX, 4, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 4, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBHEX, 5, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 5, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 3, idx );
-  err = MBCN::OppositeSide( MBHEX, 6, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 6, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBHEX, 7, 0, idx, dim );
+  err = CN::OppositeSide( MBHEX, 7, 0, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 0, dim );
   CHECK_EQUAL( 1, idx );
 
-  err = MBCN::OppositeSide( MBHEX, 0, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 0, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 10, idx );
-  err = MBCN::OppositeSide( MBHEX, 1, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 1, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 11, idx );
-  err = MBCN::OppositeSide( MBHEX, 2, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 2, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 8, idx );
-  err = MBCN::OppositeSide( MBHEX, 3, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 3, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 9, idx );
-  err = MBCN::OppositeSide( MBHEX, 4, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 4, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 6, idx );
-  err = MBCN::OppositeSide( MBHEX, 5, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 5, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 7, idx );
-  err = MBCN::OppositeSide( MBHEX, 6, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 6, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 4, idx );
-  err = MBCN::OppositeSide( MBHEX, 7, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 7, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 5, idx );
-  err = MBCN::OppositeSide( MBHEX, 8, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 8, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBHEX, 9, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 9, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 3, idx );
-  err = MBCN::OppositeSide( MBHEX, 10, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 10, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBHEX, 11, 1, idx, dim );
+  err = CN::OppositeSide( MBHEX, 11, 1, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 1, dim );
   CHECK_EQUAL( 1, idx );
   
-  err = MBCN::OppositeSide( MBHEX, 0, 2, idx, dim );
+  err = CN::OppositeSide( MBHEX, 0, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 2, idx );
-  err = MBCN::OppositeSide( MBHEX, 1, 2, idx, dim );
+  err = CN::OppositeSide( MBHEX, 1, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 3, idx );
-  err = MBCN::OppositeSide( MBHEX, 2, 2, idx, dim );
+  err = CN::OppositeSide( MBHEX, 2, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 0, idx );
-  err = MBCN::OppositeSide( MBHEX, 3, 2, idx, dim );
+  err = CN::OppositeSide( MBHEX, 3, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 1, idx );
-  err = MBCN::OppositeSide( MBHEX, 4, 2, idx, dim );
+  err = CN::OppositeSide( MBHEX, 4, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 5, idx );
-  err = MBCN::OppositeSide( MBHEX, 5, 2, idx, dim );
+  err = CN::OppositeSide( MBHEX, 5, 2, idx, dim );
   CHECK_EQUAL( 0, err );
   CHECK_EQUAL( 2, dim );
   CHECK_EQUAL( 4, idx );
@@ -880,7 +880,7 @@
                                   { 0, 0, 1, 1 },
                                   { 0, 1, 1, 1 } };
   
-    const int dim = MBCN::Dimension(type);
+    const int dim = CN::Dimension(type);
       // calculate number of valid combinations of ho node flags
     int num_comb = 1;
     for (int i = 0; i < dim; ++i)
@@ -889,19 +889,19 @@
     for (int c = 0; c < num_comb; ++c) {
         // calculate corresponding number of vertices in element
       const int* ho_nodes = combinations[c];
-      int num_vtx = MBCN::VerticesPerEntity(type);
+      int num_vtx = CN::VerticesPerEntity(type);
       switch (dim) {
-        case 3: if (ho_nodes[2]) num_vtx += MBCN::NumSubEntities(type,2);
-        case 2: if (ho_nodes[1]) num_vtx += MBCN::NumSubEntities(type,1);
+        case 3: if (ho_nodes[2]) num_vtx += CN::NumSubEntities(type,2);
+        case 2: if (ho_nodes[1]) num_vtx += CN::NumSubEntities(type,1);
       }
       if (ho_nodes[dim]) ++num_vtx;
       
-      CHECK_EQUAL( ho_nodes[1], (int)MBCN::HasMidEdgeNodes( type, num_vtx ) );
-      CHECK_EQUAL( ho_nodes[2], (int)MBCN::HasMidFaceNodes( type, num_vtx ) );
-      CHECK_EQUAL( ho_nodes[3], (int)MBCN::HasMidRegionNodes( type, num_vtx ) );
+      CHECK_EQUAL( ho_nodes[1], (int)CN::HasMidEdgeNodes( type, num_vtx ) );
+      CHECK_EQUAL( ho_nodes[2], (int)CN::HasMidFaceNodes( type, num_vtx ) );
+      CHECK_EQUAL( ho_nodes[3], (int)CN::HasMidRegionNodes( type, num_vtx ) );
       
       int results[4] = { 0, -1, -1, -1 };
-      MBCN::HasMidNodes( type, num_vtx, results );
+      CN::HasMidNodes( type, num_vtx, results );
       CHECK_EQUAL(           0, !!results[0] );
       CHECK_EQUAL( ho_nodes[1], !!results[1] );
       CHECK_EQUAL( ho_nodes[2], !!results[2] );
@@ -922,7 +922,7 @@
   
   for (const EntityType* t = elem_types; *t != MBMAXTYPE; ++t) {
     const EntityType type = *t;
-    const int dim = MBCN::Dimension(type);
+    const int dim = CN::Dimension(type);
       // calculate number of valid combinations of ho node flags
     int num_comb = 1;
     for (int i = 0; i < dim; ++i)
@@ -931,21 +931,21 @@
     for (int c = 0; c < num_comb; ++c) {
         // calculate corresponding number of vertices in element
       const int* ho_nodes = combinations[c];
-      int num_vtx = MBCN::VerticesPerEntity(type);
+      int num_vtx = CN::VerticesPerEntity(type);
       switch (dim) {
-        case 3: if (ho_nodes[2]) num_vtx += MBCN::NumSubEntities(type,2);
-        case 2: if (ho_nodes[1]) num_vtx += MBCN::NumSubEntities(type,1);
+        case 3: if (ho_nodes[2]) num_vtx += CN::NumSubEntities(type,2);
+        case 2: if (ho_nodes[1]) num_vtx += CN::NumSubEntities(type,1);
       }
       if (ho_nodes[dim]) ++num_vtx;
 
         // start at first higher-order node
-      int pos = MBCN::VerticesPerEntity(type);
+      int pos = CN::VerticesPerEntity(type);
       
         // check mid-edge
       if (dim > 1 && ho_nodes[1]) {
-        for (int i = 0; i < MBCN::NumSubEntities(type,1); ++i) {
+        for (int i = 0; i < CN::NumSubEntities(type,1); ++i) {
           int pdim = -1, pidx = -1;
-          MBCN::HONodeParent( type, num_vtx, pos++, pdim, pidx );
+          CN::HONodeParent( type, num_vtx, pos++, pdim, pidx );
           CHECK_EQUAL( 1, pdim );
           CHECK_EQUAL( i, pidx );
         }
@@ -953,9 +953,9 @@
       
         // check mid-face
       if (dim > 2 && ho_nodes[2]) {
-        for (int i = 0; i < MBCN::NumSubEntities(type,2); ++i) {
+        for (int i = 0; i < CN::NumSubEntities(type,2); ++i) {
           int pdim = -1, pidx = -1;
-          MBCN::HONodeParent( type, num_vtx, pos++, pdim, pidx );
+          CN::HONodeParent( type, num_vtx, pos++, pdim, pidx );
           CHECK_EQUAL( 2, pdim );
           CHECK_EQUAL( i, pidx );
         }
@@ -964,7 +964,7 @@
         // check mid-volume
       if (ho_nodes[dim]) {
         int pdim = -1, pidx = -1;
-        MBCN::HONodeParent( type, num_vtx, pos++, pdim, pidx );
+        CN::HONodeParent( type, num_vtx, pos++, pdim, pidx );
         CHECK_EQUAL( dim, pdim );
         CHECK_EQUAL( 0, pidx );
       }
@@ -985,7 +985,7 @@
   
   for (const EntityType* t = elem_types; *t != MBMAXTYPE; ++t) {
     const EntityType type = *t;
-    const int dim = MBCN::Dimension(type);
+    const int dim = CN::Dimension(type);
       // calculate number of valid combinations of ho node flags
     int num_comb = 1;
     for (int i = 0; i < dim; ++i)
@@ -994,35 +994,35 @@
     for (int c = 0; c < num_comb; ++c) {
         // calculate corresponding number of vertices in element
       const int* ho_nodes = combinations[c];
-      int num_vtx = MBCN::VerticesPerEntity(type);
+      int num_vtx = CN::VerticesPerEntity(type);
       switch (dim) {
-        case 3: if (ho_nodes[2]) num_vtx += MBCN::NumSubEntities(type,2);
-        case 2: if (ho_nodes[1]) num_vtx += MBCN::NumSubEntities(type,1);
+        case 3: if (ho_nodes[2]) num_vtx += CN::NumSubEntities(type,2);
+        case 2: if (ho_nodes[1]) num_vtx += CN::NumSubEntities(type,1);
       }
       if (ho_nodes[dim]) ++num_vtx;
 
         // start at first higher-order node
-      int pos = MBCN::VerticesPerEntity(type);
+      int pos = CN::VerticesPerEntity(type);
       
         // check mid-edge
       if (dim > 1 && ho_nodes[1]) {
-        for (int i = 0; i < MBCN::NumSubEntities(type,1); ++i) {
-          int idx = MBCN::HONodeIndex( type, num_vtx, 1, i );
+        for (int i = 0; i < CN::NumSubEntities(type,1); ++i) {
+          int idx = CN::HONodeIndex( type, num_vtx, 1, i );
           CHECK_EQUAL( pos++, idx );
         }
       }
       
         // check mid-face
       if (dim > 2 && ho_nodes[2]) {
-        for (int i = 0; i < MBCN::NumSubEntities(type,2); ++i) {
-          int idx = MBCN::HONodeIndex( type, num_vtx, 2, i );
+        for (int i = 0; i < CN::NumSubEntities(type,2); ++i) {
+          int idx = CN::HONodeIndex( type, num_vtx, 2, i );
           CHECK_EQUAL( pos++, idx );
         }
       }
       
         // check mid-volume
       if (ho_nodes[dim]) {
-        int idx = MBCN::HONodeIndex( type, num_vtx, dim, 0 );
+        int idx = CN::HONodeIndex( type, num_vtx, dim, 0 );
         CHECK_EQUAL( pos++, idx );
       }
     } // for ho_node combinatinos
@@ -1031,11 +1031,11 @@
 
 void test_sub_entity_nodes( EntityType parent, int sub_dimension )
 {
-  const int num_corner = MBCN::VerticesPerEntity( parent );
-  const int num_edge   = MBCN::NumSubEntities( parent, 1 );
-  const int num_face   = MBCN::NumSubEntities( parent, 2 );
+  const int num_corner = CN::VerticesPerEntity( parent );
+  const int num_edge   = CN::NumSubEntities( parent, 1 );
+  const int num_face   = CN::NumSubEntities( parent, 2 );
  
-  switch (MBCN::Dimension(parent)) {
+  switch (CN::Dimension(parent)) {
     case 3:
       test_sub_entity_nodes( parent, num_corner+num_face, sub_dimension );
       test_sub_entity_nodes( parent, num_corner+num_edge+num_face, sub_dimension );
@@ -1055,8 +1055,8 @@
 
 void test_sub_entity_nodes( EntityType parent, int num_nodes, int sub_dimension )
 {
-  const int num_sub = MBCN::NumSubEntities( parent, sub_dimension );
-  const int parent_ho = MBCN::HasMidNodes( parent, num_nodes );
+  const int num_sub = CN::NumSubEntities( parent, sub_dimension );
+  const int parent_ho = CN::HasMidNodes( parent, num_nodes );
   int child_ho = 0;
   for (int d = 1; d <= sub_dimension; ++d)
     child_ho |= (parent_ho & (1<<d));
@@ -1065,16 +1065,16 @@
   for (int i = 0; i < num_sub; ++i) {
     int num, conn[MB_MAX_SUB_ENTITY_VERTICES];
     EntityType type;
-    MBCN::SubEntityNodeIndices( parent, num_nodes, sub_dimension, i, type, num, conn );
-    CHECK_EQUAL( MBCN::SubEntityType(parent, sub_dimension, i), type );
+    CN::SubEntityNodeIndices( parent, num_nodes, sub_dimension, i, type, num, conn );
+    CHECK_EQUAL( CN::SubEntityType(parent, sub_dimension, i), type );
   }
  
     // now test that they have the correct number of higher-order node
   for (int i = 0; i < num_sub; ++i) {
     int num, conn[MB_MAX_SUB_ENTITY_VERTICES];
     EntityType type;
-    MBCN::SubEntityNodeIndices( parent, num_nodes, sub_dimension, i, type, num, conn );
-    const int ho = MBCN::HasMidNodes( type, num );
+    CN::SubEntityNodeIndices( parent, num_nodes, sub_dimension, i, type, num, conn );
+    const int ho = CN::HasMidNodes( type, num );
     CHECK_EQUAL( child_ho, ho );
   }
   
@@ -1082,24 +1082,24 @@
   for (int i = 0; i < num_sub; ++i) {
     int num, conn[MB_MAX_SUB_ENTITY_VERTICES], corners[MB_MAX_SUB_ENTITY_VERTICES];
     EntityType type;
-    MBCN::SubEntityNodeIndices( parent, num_nodes, sub_dimension, i, type, num, conn );
+    CN::SubEntityNodeIndices( parent, num_nodes, sub_dimension, i, type, num, conn );
     
       // check corner indices against SubEntityVertexIndices
-    const int num_corner = MBCN::VerticesPerEntity(type);
+    const int num_corner = CN::VerticesPerEntity(type);
     CHECK( num >= num_corner );
-    MBCN::SubEntityVertexIndices( parent, sub_dimension, i, corners );
+    CN::SubEntityVertexIndices( parent, sub_dimension, i, corners );
     for (int j = 0; j < num_corner; ++j)
       CHECK_EQUAL( corners[j], conn[j] );
     
       // check mid-edge indices, if present
     int idx = num_corner;
-    if (child_ho & MBCN::MID_EDGE_BIT) {
+    if (child_ho & CN::MID_EDGE_BIT) {
         // for each edge in the sub-entity type
-      const int num_edge = MBCN::NumSubEntities( type, 1 );
+      const int num_edge = CN::NumSubEntities( type, 1 );
       for (int j = 0; j < num_edge; ++j) {
           // get edge indices for sub-entity connectivity
         int edge_ends[2];
-        MBCN::SubEntityVertexIndices( type, 1, j, edge_ends );
+        CN::SubEntityVertexIndices( type, 1, j, edge_ends );
           // convert to indices into parent type's connectivity
         CHECK( edge_ends[0] < num_corner );
         edge_ends[0] = corners[edge_ends[0]];
@@ -1107,18 +1107,18 @@
         edge_ends[1] = corners[edge_ends[1]];
           // find edge index in parent element
         int side, sense, off;
-        int result = MBCN::SideNumber( parent, edge_ends, 2, 1, side, sense, off );
+        int result = CN::SideNumber( parent, edge_ends, 2, 1, side, sense, off );
         CHECK_EQUAL( 0, result );
           // get location in parent entity connectivity for mid-edge node
-        int loc = MBCN::HONodeIndex( parent, num_nodes, 1, side );
+        int loc = CN::HONodeIndex( parent, num_nodes, 1, side );
         CHECK_EQUAL( loc, conn[idx++] );
       }
     }
     
       // check mid-face indices, if present
-    if (child_ho & MBCN::MID_FACE_BIT) {
-      CHECK_EQUAL( 2, MBCN::Dimension(type) );
-      int loc = MBCN::HONodeIndex( parent, num_nodes, 2, i );
+    if (child_ho & CN::MID_FACE_BIT) {
+      CHECK_EQUAL( 2, CN::Dimension(type) );
+      int loc = CN::HONodeIndex( parent, num_nodes, 2, i );
       CHECK_EQUAL( loc, conn[idx++] );
     }
     

Modified: MOAB/trunk/test/obb/obb_test.cpp
===================================================================
--- MOAB/trunk/test/obb/obb_test.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/obb/obb_test.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -4,7 +4,7 @@
 #include "OrientedBox.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/GeomUtil.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 #include <iostream>
 #include <sstream>
@@ -419,7 +419,7 @@
   bool boundary[6] = { false, false, false, false, false, false };
   for (Range::iterator it = contents.begin(); it != contents.end(); ++it) {
     EntityType type = instance->type_from_handle( *it );
-    int dim = MBCN::Dimension( type );
+    int dim = CN::Dimension( type );
     if (dim != 2) {
       bad_element = true;
       continue;
@@ -1378,9 +1378,9 @@
     EntityType type2 = TYPE_FROM_HANDLE( i->second );
     int id1 = ID_FROM_HANDLE( i->first );
     int id2 = ID_FROM_HANDLE( i->second );
-    std::cout << MBCN::EntityTypeName( type1 ) << " " << id1;
+    std::cout << CN::EntityTypeName( type1 ) << " " << id1;
     if (i->first != i->second) 
-      std::cout << " to " << MBCN::EntityTypeName( type2 ) << " " << id2;
+      std::cout << " to " << CN::EntityTypeName( type2 ) << " " << id2;
     std::cout << std::endl;
   }
 }

Modified: MOAB/trunk/test/parallel/parallel_hdf5_test.cc
===================================================================
--- MOAB/trunk/test/parallel/parallel_hdf5_test.cc	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/test/parallel/parallel_hdf5_test.cc	2010-03-17 20:58:51 UTC (rev 3647)
@@ -4,7 +4,7 @@
 #include "moab/Core.hpp"
 #include "moab/ParallelComm.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include "moab/MBParallelConventions.h"
 
 #include <iostream>
@@ -429,7 +429,7 @@
   if (rank == 0 && !all_equal) {
     std::cerr << "Type\tPartnd\tWritten" << std::endl;
     for (EntityType t = MBVERTEX; t < MBENTITYSET; ++t) 
-      std::cerr << MBCN::EntityTypeName(t) << '\t' << all_counts[t] << '\t' << file_counts[t] << std::endl;
+      std::cerr << CN::EntityTypeName(t) << '\t' << all_counts[t] << '\t' << file_counts[t] << std::endl;
   }
   
   CHECK(all_equal);
@@ -456,7 +456,7 @@
     rval = mb2.get_number_entities_by_type( set2, t, count2 );
     CHECK_ERR(rval);
     if (count1 != count2) {
-      std::cerr << "Sets differ in number of " << MBCN::EntityTypeName(t)
+      std::cerr << "Sets differ in number of " << CN::EntityTypeName(t)
                 << " : " << count1 << " vs. " << count2 << std::endl;
       result = false;
     }

Modified: MOAB/trunk/tools/SphereDecomp.cpp
===================================================================
--- MOAB/trunk/tools/SphereDecomp.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/SphereDecomp.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,7 +1,7 @@
 #include "SphereDecomp.hpp"
 #include "moab/MeshTopoUtil.hpp"
 #include "moab/Range.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 #include <math.h>
 #include <assert.h>
 #include <iostream>
@@ -75,7 +75,7 @@
   MeshTopoUtil mtu(mbImpl);
   double avg_pos[3], vert_pos[12], new_vert_pos[12], new_new_vert_pos[3];
   double radii[4], unitv[3];
-  int num_verts = MBCN::VerticesPerEntity(the_types[dim]);
+  int num_verts = CN::VerticesPerEntity(the_types[dim]);
   
   for (Range::iterator rit = these_ents.begin(); rit != these_ents.end(); rit++) {
     
@@ -437,7 +437,7 @@
   for (size_t i = 0; i < this_conn.size(); ++i)
     conn_tet_indices[i] = std::find(tet_conn, tet_conn+4, this_conn[i]) - tet_conn;
   int sense, side_no, offset;
-  int success = MBCN::SideNumber(MBTET, &conn_tet_indices[0],
+  int success = CN::SideNumber(MBTET, &conn_tet_indices[0],
                                  this_conn.size(), dim, side_no, sense, offset);
   if (-1 == success) return MB_FAILURE;
   

Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -3,7 +3,6 @@
 #include "moab/AdaptiveKDTree.hpp"
 #include "moab/GeomUtil.hpp"
 #include "ElemUtil.hpp"
-#include "moab/MBCN.hpp"
 #include "iostream"
 
 extern "C" 

Modified: MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
===================================================================
--- MOAB/trunk/tools/mbzoltan/MBZoltan.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/mbzoltan/MBZoltan.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -32,7 +32,6 @@
 #include "moab/MeshTopoUtil.hpp"
 #include "moab/ParallelComm.hpp"
 #include "moab/MBTagConventions.hpp"
-#include "moab/MBCN.hpp"
 
 using namespace moab;
 

Modified: MOAB/trunk/tools/measure.hpp
===================================================================
--- MOAB/trunk/tools/measure.hpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/measure.hpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -1,6 +1,6 @@
 #ifndef MEASURE_HPP
 
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 double edge_length( const double* start_vtx_coords,
                     const double* end_vtx_coords );

Modified: MOAB/trunk/tools/qvdual/DrawDual.cpp
===================================================================
--- MOAB/trunk/tools/qvdual/DrawDual.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/qvdual/DrawDual.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -3,7 +3,6 @@
 #include "moab/MeshTopoUtil.hpp"
 #include "moab/MBTagConventions.hpp"
 #include "moab/CartVect.hpp"
-#include "moab/MBCN.hpp"
 #include "vtkMOABUtils.h"
 #include "vtkPolyData.h"
 #include "vtkPolyDataMapper2D.h"

Modified: MOAB/trunk/tools/size.cpp
===================================================================
--- MOAB/trunk/tools/size.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/size.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -136,7 +136,7 @@
   std::vector<double> coords;
   for (EntityType type = MBEDGE; type < MBENTITYSET; ++type)
   {
-    int num_edges = MBCN::NumSubEntities( type, 1 );
+    int num_edges = CN::NumSubEntities( type, 1 );
     
     Range range;
     rval = mb.get_entities_by_type( set, type, range, true );
@@ -162,7 +162,7 @@
             edge_vtx_idx[1] = e+1;
           }
           else
-            MBCN::SubEntityVertexIndices( type, 1, e, edge_vtx_idx );
+            CN::SubEntityVertexIndices( type, 1, e, edge_vtx_idx );
           stats.edge_uses.add( edge_length( &coords[3*edge_vtx_idx[0]],
                                             &coords[3*edge_vtx_idx[1]] ) );
         }
@@ -216,7 +216,7 @@
     if (s.count == 0)
       continue;
     
-    unsigned len = strlen(MBCN::EntityTypeName(i));
+    unsigned len = strlen(CN::EntityTypeName(i));
     if (len > type_width)
       type_width = len;
     
@@ -302,7 +302,7 @@
     }
     
     printf( "%*s %*ld %*.*g %*.*g %*.*g %*.*g %*.*g %*.*g\n",
-            type_width, i == MBMAXTYPE ? edge_use_name : MBCN::EntityTypeName(i),
+            type_width, i == MBMAXTYPE ? edge_use_name : CN::EntityTypeName(i),
             count_width, s.count,
             total_width, total_prec, s.sum,
             val_width, precision, s.min,

Modified: MOAB/trunk/tools/skin.cpp
===================================================================
--- MOAB/trunk/tools/skin.cpp	2010-03-17 20:29:30 UTC (rev 3646)
+++ MOAB/trunk/tools/skin.cpp	2010-03-17 20:58:51 UTC (rev 3647)
@@ -18,7 +18,7 @@
 #include "moab/Range.hpp"
 #include "moab/Skinner.hpp"
 #include "moab/AdaptiveKDTree.hpp"
-#include "moab/MBCN.hpp"
+#include "moab/CN.hpp"
 
 using namespace moab;
 
@@ -482,9 +482,9 @@
     rval = moab.get_connectivity( *i, conn, conn_len, true, &storage );
     if (MB_SUCCESS != rval) return rval;
     
-    int num_edges = MBCN::NumSubEntities( t, 1 );
+    int num_edges = CN::NumSubEntities( t, 1 );
     for (int j = 0; j < num_edges; ++j) {
-      MBCN::SubEntityVertexIndices( t, 1, j, indices );
+      CN::SubEntityVertexIndices( t, 1, j, indices );
       EntityHandle v[2] = { conn[indices[0]], conn[indices[1]] };
       if (v[0] == v[1])
         continue;



More information about the moab-dev mailing list