[Dune] change to inheritance of vtksequencewriter

Christian Engwer christian.engwer at uni-muenster.de
Wed Sep 24 13:51:08 CEST 2014


Hi Oli,

On Wed, Sep 24, 2014 at 12:41:31PM +0200, Oliver Sander wrote:
> Hi Andreas,
> this was not discussed.  I did the change thinking that it would not imply
> an interface change, but I missed your use case.  If you insist I will revert
> the change, but I actually like the new inheritance better than the old one.
> 
> Actually, though, I am thinking about even more changes, because the current
> VTKSequenceWriter doesn't work for me anyway.  From looking at the code it
> seems to write the same grid at each time step, hence you cannot use it for
> locally evolving grids.

This is not true, as the sequencewriter is only forwarding calls to
the actual writer and this regenerates the grid information upon each
write call. You might consider this expencive, but up to now nobody
had the felling that we need optimizations... so everything should
work for you. Did you test this?

> Also, the current VTKSequenceWriter output makes
> my  ParaView crash, because the output of the i-th time step actually
> contains i copies of the data.  Do you see that, too?

I believe you are using the writer in an errornous way, or better to
say, the correct usage is not sufficiently documented.

You should not add your data multiple times. The idea is to setup your
writer ones, update the grid, update the data and call again
write. And this is somethign that works for me.

Christian

> 
> Best,
> Oliver
> 
> Am 24.09.2014 um 11:00 schrieb Andreas Dedner:
> > Hi.
> > Was this change discussed?
> > It breaks code. Up until now you could write a method
> > addMyData(VtkWriter<..> &)
> > which could then either take a sequence writer or a simple vtk writer.
> > This code
> > is broken now (used e.g. in the examples in dune-alugrid).
> > So this change is not backward compatible and at the moment I don't even
> > see a workaround
> > except to write two addMyData methods.
> > Did I miss the discussion?
> > Andreas
> > 
> > commit 03898df8b04538b577426bdf5e93740cb0fdcf62
> > Author: Oliver Sander <sander at igpm.rwth-aachen.de>
> > Date:   Fri Sep 19 22:56:14 2014 +0200
> > 
> >     Implement VTKSequenceWriterBase without the Curiously Recurring
> > Template Pattern
> >     
> >     ... and without multiple inheritance.  It is simpler that way, and
> > not less
> >     efficient.
> > 
> > 
> > _______________________________________________
> > Dune mailing list
> > Dune at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune
> > 
> 
> 



> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune


-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the Dune mailing list