[cig-commits] r8406 - short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/utils

brad at geodynamics.org brad at geodynamics.org
Fri Dec 7 09:43:56 PST 2007


Author: brad
Date: 2007-12-07 09:43:56 -0800 (Fri, 07 Dec 2007)
New Revision: 8406

Modified:
   short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/utils/vtktoh5.py
Log:
Added attributes.

Modified: short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/utils/vtktoh5.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/utils/vtktoh5.py	2007-12-07 17:16:09 UTC (rev 8405)
+++ short/3D/PyLith/benchmarks/trunk/quasistatic/strikeslipnog/utils/vtktoh5.py	2007-12-07 17:43:56 UTC (rev 8406)
@@ -33,10 +33,19 @@
 ncells = size / (1+ncorners)
 assert((1+ncorners)*ncells == size)
 cellsVtk = numpy.reshape(cellsVtk, (ncells, 1+ncorners))[:,1:1+ncorners]
+
 verticesVtk = data._get_points().to_array()
+(nvertices, spaceDim) = verticesVtk.shape
+
 dispVtk = data._get_point_data()._get_vectors().to_array()
 
+
 h5 = tables.openFile(filenameOut, "w")
+h5.root._v_attrs.space_dim = spaceDim
+h5.root._v_attrs.num_corners = ncorners
+h5.root._v_attrs.num_vertices = nvertices
+h5.root._v_attrs.cell_shape = shape
+
 h5.createGroup("/", "topology")
 h5.createArray("/topology", "cells", cellsVtk)
 h5.createGroup("/", "geometry")



More information about the cig-commits mailing list