Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Dana Robinson
PM To: HDF Users Discussion List Subject: [Hdf-forum] Irregular 2D array write (C++) So I'm wondering if there is a good way to write an irregular shaped 2D array into hdf5. And example of this would be like storing vtk node connections for an unstructured grid. First number noting the cell

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Michael Jackson
We actually do this exact operation for our project. What I decided to do was to first flatten from a "vector of vectors" into a single array, then write that array as a "normal" array to HDF5. Add an attribute to the HDF5 dataset to state what the array represents so that when you read it back

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Werner Benger
Your corresponding C++ type for this array would be std::vector> such as for storing cells in mixed meshes, like quads and triangles mixed? If so, you need a variable-length array data type of type integer, i.e., HDF5 will see it as vector It's not overly efficient to use variable-length da

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Binh-Minh Ribler
at you need? Binh-Minh From: Hdf-forum mailto:hdf-forum-boun...@lists.hdfgroup.org>> on behalf of Steven Walton mailto:walton.stev...@gmail.com>> Sent: Monday, October 17, 2016 12:34 PM To: HDF Users Discussion List Subject: [Hdf-forum] Irregular 2

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Miller, Mark C.
sion List mailto:hdf-forum@lists.hdfgroup.org>> Date: Monday, October 17, 2016 at 9:47 AM To: HDF Users Discussion List mailto:hdf-forum@lists.hdfgroup.org>> Subject: Re: [Hdf-forum] Irregular 2D array write (C++) Hi Steven, Hmm. I am thinking maybe a few approaches. 1. Use "unlimite

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Miller, Mark C.
iscussion List mailto:hdf-forum@lists.hdfgroup.org>> Date: Monday, October 17, 2016 at 9:34 AM To: HDF Users Discussion List mailto:hdf-forum@lists.hdfgroup.org>> Subject: [Hdf-forum] Irregular 2D array write (C++) So I'm wondering if there is a good way to write an irregular shaped 2D ar

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Steven Walton
; > > Binh-Minh > > > -- > *From:* Hdf-forum on behalf of > Steven Walton > *Sent:* Monday, October 17, 2016 12:34 PM > *To:* HDF Users Discussion List > *Subject:* [Hdf-forum] Irregular 2D array write (C++) > > So I'm wondering if there is a good wa

Re: [Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Binh-Minh Ribler
Hi Steven, Would variable-length datatype do what you need? Binh-Minh From: Hdf-forum on behalf of Steven Walton Sent: Monday, October 17, 2016 12:34 PM To: HDF Users Discussion List Subject: [Hdf-forum] Irregular 2D array write (C++) So I'm wonderi

[Hdf-forum] Irregular 2D array write (C++)

2016-10-17 Thread Steven Walton
So I'm wondering if there is a good way to write an irregular shaped 2D array into hdf5. And example of this would be like storing vtk node connections for an unstructured grid. First number noting the cell type and the next numbers denoting the nodes. 9 23 41 54 12 9 46 29 19 60 5 93 18 58 5 29 5