[cig-commits] r4570 - mc/3D/CitcomS/trunk/lib

luis at geodynamics.org luis at geodynamics.org
Tue Sep 19 12:50:59 PDT 2006


Author: luis
Date: 2006-09-19 12:50:58 -0700 (Tue, 19 Sep 2006)
New Revision: 4570

Modified:
   mc/3D/CitcomS/trunk/lib/Output_h5.c
Log:
Allocate tensor field buffer only when necessary.


Modified: mc/3D/CitcomS/trunk/lib/Output_h5.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Output_h5.c	2006-09-19 18:44:17 UTC (rev 4569)
+++ mc/3D/CitcomS/trunk/lib/Output_h5.c	2006-09-19 19:50:58 UTC (rev 4570)
@@ -257,7 +257,8 @@
     h5allocate_field(E, VECTOR_FIELD, 2, 0, dtype, &(E->hdf5.const_vector2d));
     h5allocate_field(E, SCALAR_FIELD, 1, 0, dtype, &(E->hdf5.const_scalar1d));
 
-    h5allocate_field(E, TENSOR_FIELD, 3, 1, dtype, &(E->hdf5.tensor3d));
+    if (E->output.stress == 1)
+        h5allocate_field(E, TENSOR_FIELD, 3, 1, dtype, &(E->hdf5.tensor3d));
 
     h5allocate_field(E, VECTOR_FIELD, 3, 1, dtype, &(E->hdf5.vector3d));
     h5allocate_field(E, VECTOR_FIELD, 2, 1, dtype, &(E->hdf5.vector2d));



More information about the cig-commits mailing list