Permalink
Browse files

Add support for writing 13-node pyramid elements to Exodus files.

These don't seem to display properly in paraview... the issue seems to
be that, at least in the Exodus format, Paraview only reads the first
5 nodes of the 13-node element.  So it will display a mesh containing a
single pyramid just fine by ignoring all the points after the first 5,
but if there are multiple pyramids present in the file, the mesh will
be garbled.
  • Loading branch information...
1 parent a1e623a commit b6a276e6ab6698889fad347cbf7b82343c103fbd @jwpeterson jwpeterson committed Feb 24, 2014
Showing with 26 additions and 1 deletion.
  1. +7 −1 include/mesh/exodusII_io_helper.h
  2. +19 −0 src/mesh/exodusII_io_helper.C
@@ -903,7 +903,13 @@ class ExodusII_IO_Helper::ElementMaps
static const int pyramid5_node_map[5];
/**
- * The Pyramid5 node map. Use this map for biquadratic pyramid elements
+ * The Pyramid13 node map. Use this map for "serendipity" pyramid elements
+ * in 3D.
+ */
+ static const int pyramid13_node_map[13];
+
+ /**
+ * The Pyramid14 node map. Use this map for biquadratic pyramid elements
* in 3D.
*/
static const int pyramid14_node_map[14];
@@ -123,6 +123,9 @@ namespace
element_equivalence_map["PYRAMID"] = PYRAMID5;
element_equivalence_map["PYRAMID5"] = PYRAMID5;
+ // PYRAMID13 equivalences
+ element_equivalence_map["PYRAMID13"] = PYRAMID13;
+
// PYRAMID14 equivalences
element_equivalence_map["PYRAMID14"] = PYRAMID14;
}
@@ -199,6 +202,7 @@ const int ExodusII_IO_Helper::ElementMaps::prism15_node_map[15] = {0, 1, 2, 3,
const int ExodusII_IO_Helper::ElementMaps::prism18_node_map[18] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17};
const int ExodusII_IO_Helper::ElementMaps::pyramid5_node_map[5] = {0, 1, 2, 3, 4};
+const int ExodusII_IO_Helper::ElementMaps::pyramid13_node_map[13] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
const int ExodusII_IO_Helper::ElementMaps::pyramid14_node_map[14] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
// 3D face map definitions
@@ -2094,6 +2098,21 @@ ExodusII_IO_Helper::Conversion ExodusII_IO_Helper::ElementMaps::assign_conversio
return conv;
}
+ case PYRAMID13:
+ {
+ const Conversion conv(pyramid13_node_map,
+ ARRAY_LENGTH(pyramid13_node_map),
+ pyramid13_node_map, // inverse node map same as forward node map
+ ARRAY_LENGTH(pyramid13_node_map),
+ pyramid_face_map,
+ ARRAY_LENGTH(pyramid_face_map),
+ pyramid_inverse_face_map,
+ ARRAY_LENGTH(pyramid_inverse_face_map),
+ PYRAMID13,
+ "PYRAMID13");
+ return conv;
+ }
+
case PYRAMID14:
{
const Conversion conv(pyramid14_node_map,

0 comments on commit b6a276e

Please sign in to comment.