Please find attached patch that adds this functionality. I've done testing
for the use case that was missing this functionality, but it could probably
use a bit more unit testing. One pitfall I see is that the ExodusII
documentation doesn't seem to include sides for the 1D elements, while
libMesh does have the notion of sides for the 1D elements. It looked like
the side functionality was only used in reading ExodusII files, but, of
course, I could've missed something. Derek, any comments on this? I've at
least include the edge/edge_inverse maps for the 1D elements. Please let me
know if I missed something and I'll fix up the patch.
Best,
Paul
Index: include/mesh/exodusII_io_helper.h
===================================================================
--- include/mesh/exodusII_io_helper.h (revision 4302)
+++ include/mesh/exodusII_io_helper.h (working copy)
@@ -739,6 +739,41 @@
ElementMaps() {}
/**
+ * 1D node maps. These define
+ * mappings from ExodusII-formatted
+ * element numberings.
+ */
+
+ /**
+ * The Edge2 node map.
+ * Use this map for linear elements in 1D.
+ */
+ static const int edge2_node_map[2];
+
+ /**
+ * The Edge3 node map.
+ * Use this map for quadratic elements in 1D.
+ */
+ static const int edge3_node_map[3];
+
+ /**
+ * 1D edge maps
+ */
+ // FIXME: This notion may or may not be defined in ExodusII
+
+ /**
+ * Maps the Exodus edge numbering for line elements.
+ * Useful for reading sideset information.
+ */
+ static const int edge_edge_map[2];
+
+ /**
+ * Maps the Exodus edge numbering for line elements.
+ * Useful for writing sideset information.
+ */
+ static const int edge_inverse_edge_map[2];
+
+ /**
* 2D node maps. These define
* mappings from ExodusII-formatted
* element numberings.
Index: src/mesh/exodusII_io_helper.C
===================================================================
--- src/mesh/exodusII_io_helper.C (revision 4302)
+++ src/mesh/exodusII_io_helper.C (working copy)
@@ -44,6 +44,15 @@
// ------------------------------------------------------------
// ExodusII_IO_Helper::ElementMaps static data
+// 1D node map definitions
+const int ExodusII_IO_Helper::ElementMaps::edge2_node_map[2] = {0, 1};
+const int ExodusII_IO_Helper::ElementMaps::edge3_node_map[3] = {0, 1, 2};
+
+// 1D edge maps
+// FIXME: This notion may or may not be defined in ExodusII
+const int ExodusII_IO_Helper::ElementMaps::edge_edge_map[2] = {0, 1};
+const int ExodusII_IO_Helper::ElementMaps::edge_inverse_edge_map[2] = {1, 2};
+
// 2D node map definitions
const int ExodusII_IO_Helper::ElementMaps::quad4_node_map[4] = {0, 1, 2, 3};
const int ExodusII_IO_Helper::ElementMaps::quad8_node_map[8] = {0, 1, 2, 3, 4, 5, 6, 7};
@@ -1222,7 +1231,13 @@
// TRISHELL = 11
// PYRAMID = 12
- if ((type_str == "QUAD4") || (type_str == "QUAD") || (type_str == "quad"))
+ if (type_str == "EDGE2")
+ return assign_conversion(EDGE2);
+
+ else if (type_str == "EDGE3")
+ return assign_conversion(EDGE3);
+
+ else if ((type_str == "QUAD4") || (type_str == "QUAD") || (type_str == "quad"))
return assign_conversion(QUAD4);
else if (type_str == "QUAD8")
@@ -1282,7 +1297,16 @@
{
switch (type)
{
-
+ case EDGE2:
+ {
+ const Conversion conv(edge2_node_map, edge_edge_map, edge_inverse_edge_map, EDGE2, "EDGE2");
+ return conv;
+ }
+ case EDGE3:
+ {
+ const Conversion conv(edge3_node_map, edge_edge_map, edge_inverse_edge_map, EDGE3, "EDGE3");
+ return conv;
+ }
case QUAD4:
{
const Conversion conv(quad4_node_map, quad_edge_map, quad_inverse_edge_map, QUAD4, "QUAD4");
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and publish
your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel