2013/10/3 Garth N. Wells <[email protected]>:

> What's required is the right abstraction for handling Functions and
> files. I think the hashing approach is more a hack. What about
> something along the lines of:
>
>     Function u(V);
>     Function w(V);
>
>     HDF5Function hdf5_function_file("my_filename.h5", "w");
>     hdf5_function_file.register(u, "u_name");
>     hdf5_function_file.register(w, "w_name");
>
>     hdf5_function_file.parameters["common_mesh"] = true;
>     hdf5_function_file.parameters["write_mesh_once"] = true;
>
>     // Write all registered functions
>     hdf5_function_file.write();
>
>     // Write all registered functions again
>     hdf5_function_file.write();
>
>    // Write u only
>     hdf5_function_file.write("u_name");

I can't comment on the efficienty/implementation side of things, but
from a user's point of view my first reaction is that I like this
idea.

My question is, how does this relate to time-dependent problems? Would
it be easy to associate timestep information with the saved functions
through the interface suggested above? From a UI point of view I would
imagine that something like this makes sense:

    // Write all functions at timestep t=0
    hdf5_function_file.write(t=0);

    // Write u only at timestep t=2.5
    hdf5_function_file.write("u_name", t=2.5);

(If no timestep is provided, it could just increase in steps of 1 or so.)

Are there any fundamental problems with this approach I'm missing? If
not, is it something you'd be willing to implement/support? Also,
could this be easily intergrated with XDMF files, so that animations
(e.g. in Paraview) would use the correct timesteps? I haven't checked
recently, but a while ago whenever a field was saved in dolfin this
created a new timestep in the XDMF file so that it was impossible to
animate a timeseries of two fields simultaneously.

Thanks,
Max
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to