[MOAB-dev] Writing a tag

Tim Tautges timothy.tautges at cd-adapco.com
Tue Aug 19 15:31:31 CDT 2014


To add some history here... at various times, I've seen requests and thought hard myself about whether to add 
time-dependent tags to MOAB.  But, then I look at how various viz codes to time-dependent I/O, and the majority of 
(open) formats and/or readers I've seen read one file per timestep, with the mesh repeated.  Furthermore, Paraview makes 
it really easy to construct a time-dependent reader from a time-independent one, and at least the original version of 
vtkMoabReaderNew had that capability (the latest version probably does too).  So, in the end, IMO, having the same tag 
for multiple timesteps of the same variable isn't as bad as a kludge, it's arguably the right way to do it.

- tim

On 08/19/2014 03:16 PM, Gerd Heber wrote:
> Thanks for the comments & ideas. Keep'em coming!
> I think I can periodically write a batch of tags and finally
> create a separate HDF5 stub file with just external links that'll
> reference the mesh in one of those files and reference the tags
> in all files.
>
> G.
>
> -----Original Message-----
> From: Vijay S. Mahadevan [mailto:vijay.m at gmail.com]
> Sent: Tuesday, August 19, 2014 3:05 PM
> To: Gerd Heber
> Cc: Grindeanu, Iulian R.; MOAB dev
> Subject: Re: [MOAB-dev] Writing a tag
>
> Sure that is a perfectly acceptable use case but from MOAB's point of view, it doesn't know whether any other entities or tags defined on those entities were changed during the time-dependent analysis. We do not store cached data to see whether tags have changed explicitly.
> This is error prone and needs to be avoided from a library standpoint.
>
> On the other hand, if you are only going to use the file as a checkpointing mechanism, I can see why writing out the entire mesh along with the tags seems overkill. But we consider the parallel h5m format to be a complete set and currently there isn't a way to link to another file for just the mesh information. You probably can just call write_file("checkpoint-time1.h5m"),
> write_file("checkpoint-time2.h5m"), and so on to get a series of files with tag data (along with the meshes).
>
> There might be some NetCDF writers that might have this capability.
> Maybe Iulian can comment more on this. Implementing this functionality in the HDF5 reader/writer will be a bit tricky but I can't explicitly see why it can't be done.
>
> Vijay
>
> On Tue, Aug 19, 2014 at 2:51 PM, Gerd Heber <gheber at hdfgroup.org> wrote:
>> Let's say I do some kind of explicit dynamics or time-dependent
>> analysis and I would like to periodically create/add a few new tags to
>> a "history file". I don't need them in memory and can't keep them all
>> in memory anyway. I can buffer maybe 10 or 100, but then I need to
>> flush those tags to disk. Since the mesh doesn't change, it'd be odd
>> to read or write it over and over again.
>>
>> G.
>>
>> -----Original Message-----
>> From: Grindeanu, Iulian R. [mailto:iulian at mcs.anl.gov]
>> Sent: Tuesday, August 19, 2014 2:38 PM
>> To: Gerd Heber; MOAB dev
>> Subject: RE: Writing a tag
>>
>> Hello,
>>
>> I don't think you can append using moab interface.
>>
>> You would need to load the h5m file (in memory), create the new tag,
>> set values, and save the file again (with the same name if you want)
>>
>> maybe there is an easier way, but I don't know it.
>> Iulian
>> ________________________________________
>> From: moab-dev-bounces at mcs.anl.gov [moab-dev-bounces at mcs.anl.gov] on
>> behalf of Gerd Heber [gheber at hdfgroup.org]
>> Sent: Tuesday, August 19, 2014 2:08 PM
>> To: MOAB dev
>> Subject: [MOAB-dev] Writing a tag
>>
>> How can I append a tag to an existing MOAB file (which has a few other tags already)?
>> Maybe this is so obvious that the documentation doesn't talk about it, but it's unclear to me. I don't see, for example, how to sell this to write_file. Maybe that's not the right call anyway...
>>
>> Thanks for your help.
>> G.
>>
>>

-- 
Timothy J. Tautges
Manager, Directed Meshing, CD-adapco
Phone: 608-354-1459
timothy.tautges at cd-adapco.com


More information about the moab-dev mailing list