← Back to team overview

dolfin team mailing list archive

Re: File interface

 

On Thu, Sep 06, 2012 at 07:30:06AM +0100, Garth N. Wells wrote:
> It there any reason that we use the letter-envelope design for file IO
> (i.e. the object File) rather than plain XMLFile, VTKFile, etc? The
> latter would simplify the design, especially as we add more elaborate
> IO. It's already a little clumsy because, at least in the case of VTK,
> the common File interface does take arguments are specific to one
> backend.

The reason is simply to determine file type from suffix. I want to
keep it (and it's been used in tons of examples, papers, books,
tutorials).

Ideally, one should be able to use either File or VTKFile (just as
Matrix and PETScMatrix) and direct use of VTKFile could provide some
extra features.

--
Anders


References