[Dune-devel] [Dune] change to inheritance of vtksequencewriter
Oliver Sander
sander at igpm.rwth-aachen.de
Thu Sep 25 10:33:43 CEST 2014
Hi Andreas,
sorry for writing about things that I haven't thought through entirely myself.
I've tried to mention my problems as a motivation for why I started to think
about the VTKSequenceWriter in the first place. That didn't work out well, apparently :-)
>
> I'm happy to update the documentation (which can of course be improved)
>
Thanks, but nevermind. I'll do that once I have understood how VTKSequenceWriter
works. I need all this for my documentation project anyway.
> I tend to look into the tests to see how things are indented to be used and I don't see how that could be easy improved a lot ... but of course I'm open to suggestions.
>
> Planning on rewriting the whole class just because you are getting i copies of the data seems weird to me.
> [snip]
> If there is no compelling reason to keep your changes then I would like to either revert them or make
> the cast into a VTKWriter possible because that seems a very reasonable thing to have. The
> VTKSequenceWriter is-a VTKWriter with some extra functionality.
I didn't start the rewrite to fix (what I thought were) bugs. The old structure just seemed
very wrong to me, and a remainder of the old days where we used to whack the CRTP onto everything
that moved. For me, a VTKSequenceWriter is not a VTKWriter. The latter saves time-independent
data, the former ties together several writers of time-independent data into one series of
time-dependent data. The VTKSequenceWriter uses A VTKWriter, but it isn't a VTKWriter.
That's much better reflected in the new inheritance structure.
> As a bare minumum the
> vtkWriter_ variable would need to be exported.
>
My ideal proposal goes one step further: The user should be allowed to allocate a VTKWriter,
and hand it to the VTKSeqenceWriter. That would solve your problem, because you could call
your addData method with that VTKWriter object, and addData again wouldn't have to care
whether the VTKWriter object was used standalone or as part of a VTKSequenceWriter.
It would also allow us to get rid of the VTKSubsamplingSequenceWriter: The same functionality
would be achieved by handing a VTKSubsamplingWriter to the VTKSequenceWriter class.
Finally, it would allow to handle all other writers derived from VTKWriter in the same way.
They exist: I actually have one of those.
Opinions?
Greetings,
Oliver
> Greetings
> Andreas
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20140925/4543b360/attachment.sig>
More information about the Dune-devel
mailing list