Thanks a lot for your answer.
I meant unstructured meshes.
I can nowhere find any examples on this case with HDF5 in general and
PyTables in particular (only some obscure info on some HDF5 Mesh API
that is 4 years old since last modification). My case is: one big
unstructured mesh is split into sub-meshes, some calculations are
performed on each sub-mesh resulting in some solutions (scalars or
vectors) per node and/or per element. Such meshes have to be merged back
at the end in a smart way such that the duplicate nodes (that will be
there on sub-domains boundaries) are corrected for. Therefore, I would
split my question into 2 subquestions:
- where can I get started with HDF5/PyTables and unstructured meshes,
handling scalars and vectors per node and element,
- can I merge/append such meshes while avoiding duplicate nodes and
ensuring consistent numbering of elements.
Thanks a lot for any hints,
Francesc Altet wrote:
> Hi Dominik,
> El dj 21 de 06 del 2007 a les 14:26 +0200, en/na Dominik Szczerba va
>> Is there an easy way to merge hdf5 datasets in pytables?
> What kind of datasets? The most easy way for merging Table objects is
> Table.whereAppend() method. See:
> for more info.
> For Array objects, you can always iterate over one array and append it
> row to row to the other. Look at this example:
> In :import numpy
> In :import tables
> In :f=tables.openFile('/tmp/test.h5', 'w')
> In :e1=f.createEArray(f.root, 'array1', tables.Float64Atom(),
> In :e2=f.createEArray(f.root, 'array2', tables.Float64Atom(),
> In :e1.append(numpy.empty(shape=(200,300)))In
> In :for row in e1:
> ...: e2.append(row[numpy.newaxis,:]) # append e1 rows to e2
> In :e2
> /array2 (EArray(400L, 300)) ''
> atom := Float64Atom(shape=(), dflt=0.0)
> maindim := 0
> flavor := 'numpy'
> byteorder := 'little'
> Of course, you can always add complexity to the "for row in e1:" loop in
> order to conveniently filter the desired subset of rows.
>> I cannot google it out anywhere.
>> I have unstructured sub-meshes coming from domain decomposition and I
>> want to stich them back together. They share some nodes on the
>> sub-domain boundaries so I want to stitch them in a clever way (like
>> AppendDatasets and CleanToGrid in Paraview). Any options available?
> I have no experience with Paraview. If the solution above doesn't work
> for you, ask again please.
Dominik Szczerba, Ph.D.
Computer Vision Lab CH-8092 Zurich