<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Nico,<br>
<br>
moab stores dense tags in a hdf5 dataspace of dimension 1, not 2<br>
<br>
I do not understand in your code where you create the dataspace for tag A. I did not dig too much, and I still did not install it.<br>
<br>
So, dimension size should be the number of nodes (for dense node tags)<br>
<br>
data type, instead of being a 64-bit floating point, should be an array of  64-bit floating-point (3), for your example<br>
<br>
Coordinates, on the other hand, are stored in a 2 dimensional dataspace, and also connectivities<br>
<br>
<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF511872"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Nico Schlömer [nico.schloemer@gmail.com]<br>
<b>Sent:</b> Thursday, November 12, 2015 4:10 AM<br>
<b>To:</b> Grindeanu, Iulian R.; moab-dev@mcs.anl.gov<br>
<b>Subject:</b> Re: [MOAB-dev] h5m: class attribute in tags<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">> How do you install h5py? serial or parallel? I was trying to play with your meshio, but I need more stuff installed<br>
<div><br>
</div>
<div>The `requirements.txt` should list ist all;</div>
<div>```</div>
<div>pip install -r requirements.txt<br>
</div>
<div>```</div>
<div>might also help. h5py is needed in serial.</div>
<div><br>
</div>
<div>Thanks for the explanation about the tags. I'm now at another error message, namely</div>
<div>```</div>
<div>[0]MOAB ERROR: Incorrect DataSpace for DataSet.!<br>
</div>
<div>[0]MOAB ERROR: is_error() line 105 in ReadHDF5.hpp<br>
</div>
<div>```</div>
<div>No idea what that wants to say. I'm getting it for the data at [1]. Any idea what might be going wrong?</div>
<div>The respective code is at [2] btw.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Nico</div>
<div><br>
</div>
<div>[1] <a href="http://chunk.io/f/2f94e4ab6bbe458fbdc1d3a3f7edb624" target="_blank">http://chunk.io/f/2f94e4ab6bbe458fbdc1d3a3f7edb624</a></div>
<div>[2] <a href="https://github.com/nschloe/meshio/blob/master/meshio/writer.py#L106" target="_blank">https://github.com/nschloe/meshio/blob/master/meshio/writer.py#L106</a></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Nov 11, 2015 at 10:25 PM Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">How do you install h5py? serial or parallel? I was trying to play with your meshio, but I need more stuff installed<br>
<br>
I was wrong before,<br>
class attribute is an integer attribute, with a value corresponding to the storage type<br>
<br>
/** \brief Was dense tag data in mesh database */<br>
#define mhdf_DENSE_TYPE   2 <br>
/** \brief Was sparse tag data in mesh database */<br>
#define mhdf_SPARSE_TYPE  1 <br>
/** \brief Was bit-field tag data in mesh database */<br>
#define mhdf_BIT_TYPE     0 <br>
/** \brief Unused */<br>
#define mhdf_MESH_TYPE    3 <br>
<br>
the storage type is set here:<br>
./src/io/mhdf/src/tags.c<br>
hid_t create_tag_common( mhdf_FileHandle file_handle,<br>
                         const char* tag_name,<br>
                         enum mhdf_TagDataType tag_type,<br>
                         int size,<br>
                         int storage,<br>
                         const void* default_value,<br>
                         int default_value_size_in,<br>
                         const void* global_value,<br>
                         int global_value_size_in,<br>
                         hid_t hdf_type,<br>
                         hid_t hdf_base_type,<br>
                         mhdf_Status* status )<br>
<br>
about line 340:<br>
  rval = mhdf_create_scalar_attrib( tag_id, <br>
                                   TAG_TYPE_ATTRIB,  // this is "class"<br>
                                   H5T_NATIVE_INT,<br>
                                   &storage,<br>
                                   status );<br>
<br>
tag_id is the group id associated with the tag <br>
<br>
<br>
<br>
the storage type is retrieved in the hdf5 writer with a code like this<br>
<br>
 // Get tag properties<br>
  rval = iFace->tag_get_type(tag_data.tag_id, mb_storage);CHK_MB_ERR_0(rval);<br>
  switch (mb_storage) {<br>
    case MB_TAG_DENSE:<br>
      storage = mhdf_DENSE_TYPE;<br>
      break;<br>
    case MB_TAG_SPARSE:<br>
      storage = mhdf_SPARSE_TYPE;<br>
      break;<br>
    case MB_TAG_BIT:<br>
      storage = mhdf_BIT_TYPE;<br>
      break;<br>
    case MB_TAG_MESH:<br>
      storage = mhdf_MESH_TYPE;<br>
      break;<br>
    default:<br>
      return error(MB_FAILURE);<br>
  }<br>
<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Nico Schlömer [<a href="mailto:nico.schloemer@gmail.com" target="_blank">nico.schloemer@gmail.com</a>]<br>
<b>Sent:</b> Wednesday, November 11, 2015 1:01 PM<br>
<b>To:</b> Grindeanu, Iulian R.; <a href="mailto:moab-dev@mcs.anl.gov" target="_blank">
moab-dev@mcs.anl.gov</a><br>
<b>Subject:</b> Re: [MOAB-dev] h5m: class attribute in tags<br>
</font><br>
</div>
</div>
</div>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<div></div>
<div>
<div dir="ltr">> Or do you try to understand how are the data / tags stored?<br>
<br>
Indeed. I've converted a bunch of files to h5m using MeshIO [1], but found that they couldn't be read into MOAB because of a missing class attribute.<br>
<br>
> class would correspond to the type of the tag (integer, double, opaque, etc)<br>
<br>
Could you give more detail here?
<div><br>
</div>
<div>Cheers,</div>
<div>Nico</div>
<div><br>
<br>
[1] <a href="https://pypi.python.org/pypi/meshio" target="_blank">https://pypi.python.org/pypi/meshio</a><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Nov 11, 2015 at 7:55 PM Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi Nico,<br>
<br>
Not sure what are you trying to do here.<br>
Do you need to improve the h5m reader writer? Or do you try to understand how are the data / tags stored?<br>
<br>
Do you have a specific problem/bug ? <br>
Suggestions for improvement? <br>
<br>
All these attributes are part of specific moab conventions and hdf5 format. Not much documentation, except what you already found.<br>
<br>
class would correspond to the type of the tag (integer, double, opaque, etc)<br>
default would be the default value<br>
<br>
global is used if the tag is "global", in the sense it refers to the whole mesh instance<br>
<br>
"The tag sub-group may have any or all of the following four attributes: <tt>default</tt>,
<tt>global</tt>, <tt>is_handle</tt>, and <tt>variable_length</tt>. The <tt>default</tt> attribute, if present, must contain a single tag value that is to be considered the 'default' value of the tag. The
<tt>global</tt> attribute, if present, must contain a single tag value that is the value of the tag as set on the mesh instance (MOAB terminology) or root set (ITAPS terminology.) The presence of the
<tt>is_handle</tt> attribute (the value, if any, is meaningless) indicates that the tag values are to be considered entity IDs."<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div style="direction:ltr"><font face="Tahoma" color="#000000" size="2"><b>From:</b>
<a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a> [<a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a>] on behalf of Nico Schlömer [<a href="mailto:nico.schloemer@gmail.com" target="_blank">nico.schloemer@gmail.com</a>]<br>
<b>Sent:</b> Wednesday, November 11, 2015 3:43 AM<br>
<b>To:</b> <a href="mailto:moab-dev@mcs.anl.gov" target="_blank">moab-dev@mcs.anl.gov</a><br>
<b>Subject:</b> [MOAB-dev] h5m: class attribute in tags<br>
</font><br>
</div>
</div>
</div>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<div></div>
<div>
<div dir="ltr">Hi everyone,
<div><br>
</div>
<div>In h5m files [1], I see that tstt->tags typically have three attributes:</div>
<div><br>
</div>
<div> * class</div>
<div> * default</div>
<div> * global</div>
<div><br>
</div>
<div>Where can I find documentation on these attributes?</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Nico</div>
<div><br>
</div>
<div>[1] <a href="https://trac.mcs.anl.gov/projects/ITAPS/wiki/MOAB/h5m" target="_blank">https://trac.mcs.anl.gov/projects/ITAPS/wiki/MOAB/h5m</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>