2013/9/28 Garth N. Wells <[email protected]>

> On 28 September 2013 11:20, Øyvind Evju <[email protected]> wrote:
> > I suggest storing the FunctionSpace data under unique identifiers from
> > hashing the Mesh and FiniteElement, separate from the Function.
> >
>
> Hashing should never be done without the user explicitly asking for it
> - hashing a large mesh is expensive.
>

I don't know how the hash function in Mesh works, but that is very
efficient. On my laptop it took less than 1s to hash a mesh of 50 million
cells. So I still think this option is a good one.


>
> > When writing a new Function to the HDF5File, it can easily be checked
> > whether the FunctionSpace data exists. If not, write it.
> >
>
> I think what we really lack are functions for querying HDF5 files,
> e.g. asking for a list of strings for all Functions in a file, or
> asking for a list of all vectors that are hung under a Function. Would
> having this help with the problem?
>

I can see that this could be useful, but not sure how it would help with
this problem.


-Øyvind



>
> Garth
>
> > This should work without modifying the read-functionality, and for many
> > functions from different meshes, function spaces and number of processes.
> >
> >
> > -Øyvind
> >
> >
> > 2013/9/28 Chris Richardson <[email protected]>
> >>
> >>
> >> This is a continuation of the discussion at:
> >>
> >> https://bitbucket.org/fenics-project/dolfin/pull-request/52
> >>
> >> The question is how best to save a time-series of Function in HDF5, when
> >> the cell and dof layout remains constant.
> >>
> >> It has been suggested to use:
> >>
> >> u = Function(V)
> >> h0 = HDF5File('Timeseries_of_Function.h5', 'w')
> >> h0.write(u, '/Function')
> >> # Then later
> >> h0.write(u.vector(), "/Vector/0")
> >> h0.write(u.vector(), "/Vector/1")
> >>
> >> and to read back:
> >>
> >> u = Function(V)
> >> h0 = HDF5File('Timeseries_of_Function.h5', 'r')
> >> h0.read(u, "/Function")
> >> h0.read(u.vector(), "/Function/vector")
> >>
> >> The problem with this, is not so much the saving of the vector, but the
> >> reading back. It works OK if the vector is distributed in the same way,
> but
> >> will fail
> >> in the general case.
> >>
> >> To fix the problem, there needs to be some kind of connection between
> the
> >> original Function and the subsequent Vectors. This could be provided at
> >> write time, by storing a link back to the original Function when
> writing a
> >> Vector, or at read time by specifying a base Function and an alternative
> >> Vector to read.
> >>
> >> Chris R.
> >> _______________________________________________
> >> fenics mailing list
> >> [email protected]
> >> http://fenicsproject.org/mailman/listinfo/fenics
> >
> >
> >
> > _______________________________________________
> > fenics mailing list
> > [email protected]
> > http://fenicsproject.org/mailman/listinfo/fenics
> >
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to