[cig-commits] commit: Make checkpointing not crash with P_-1 elements

Mercurial hg at geodynamics.org
Sun Sep 18 12:48:43 PDT 2011


changeset:   796:52aeca915d0d
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Sun Sep 18 12:38:22 2011 -0700
files:       SLE/SystemSetup/src/FiniteElementContext.cxx
description:
Make checkpointing not crash with P_-1 elements


diff -r 44c4deebf68c -r 52aeca915d0d SLE/SystemSetup/src/FiniteElementContext.cxx
--- a/SLE/SystemSetup/src/FiniteElementContext.cxx	Sun Sep 18 12:37:49 2011 -0700
+++ b/SLE/SystemSetup/src/FiniteElementContext.cxx	Sun Sep 18 12:38:22 2011 -0700
@@ -800,10 +800,13 @@ void _FiniteElementContext_DumpMeshHDF5(
       
       for( node_I = 0 ; node_I < nodesPerEl ; node_I++ )
          buf_int[node_I] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[node_I] );
-      /* some reordering is required to account for standard node ordering */ 
-      buf_int[3] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[2] );
-      buf_int[2] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[3] );
-      if( nDims == 3 ) {
+      if(nodesPerEl>3)
+        {
+          /* some reordering is required to account for standard node ordering */ 
+          buf_int[3] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[2] );
+          buf_int[2] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[3] );
+        }
+      if( nDims == 3 && nodesPerEl>7 ) {
          buf_int[7] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[6] );
          buf_int[6] = Mesh_DomainToGlobal( mesh, MT_VERTEX, nodeList[7] );
       }



More information about the CIG-COMMITS mailing list