[Dune-devel] [Dune] change to inheritance of vtksequencewriter

Oliver Sander sander at igpm.rwth-aachen.de
Wed Sep 24 21:04:07 CEST 2014


Hi Christian,

Am 24.09.2014 um 13:51 schrieb Christian Engwer:
> 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?

No I didn't yet, and I you say that it works I have no reason to believe
otherwise.

> 
>> 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,

That may be possible.  The vtksequencewriter test doesn't show this behavior.

> or better to
> say, the correct usage is not sufficiently documented.
> 

Well, eh, yes, it is not.



> 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.
> 

I may have forgotten to update the grid, because in that particular case
the grid is the same for all time steps.

Thanks for your advice,
Oliver

> 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
> 
> 


-------------- 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/20140924/8318e47e/attachment.sig>


More information about the Dune-devel mailing list