[Dune-devel] YaspGrid becomes a tensor product grid

Dominic Kempf dominic.r.kempf at gmail.com
Thu Sep 5 17:28:47 CEST 2013


Hey Oliver,
thanks for your feedback!

> - Your tree contains cleanup together with actual new code.  Can you
>   send the cleanup as separate patches?  I would commit such patches
>   immediately.

I fear I wont be able to do so before mid november, because I will not
be available to the project until then, as mentioned.

> - In fact, major kudos to the person who merges YaspGrid and its base
>   class.

Thats definitely not  me. :D

> - Some YaspGrid constructors take FieldVector<bool> arguments.  Those
>   exist only for backward compatibility.  If you write new constructors
>   those should take std::bitset instead.

I thought it would be nice in the sense of backwards compatibility to
have people not get an error, they arent expecting once they go
tensorproduct. But the additional constructors are of course quickly
deleted.

> - Will you try how much slower the code is now?  Since the new coordinate
>   vectors are only accessed when geometries are created I would expect
>   that the slowdown is minimal.  This would actually be a good use case
>   for the new benchmarking system.  If your code is slower: have you
>   considered adding a static switch that changes between the old
>   and the new behavior?

Actually, that is what I meant by "specialization of the backend code
for the equidistant case". So, see my previous mail. Testing planned,
not done. I would highly appreciate any input form the benchmarking
project.

> - Please use array<int> instead of FieldVector<int>.  FieldVector implements
>   elements of a vector space, but you can't have a vector space based
>   on int.

For this as for the std::bitset matter I sticked to how it was coded
before in grids.hh. I looked into it today and realized its not a mere
replacement, because std::array<T,d> has no constructor taking a
default value of type T and no operator=(T&), which complicates some
stuff that can be done in initialization lists. As I am doing this as
a Hiwi-project with limited time, I will postpone this to when all
functionality is implemented.

Best,
Dominic




More information about the Dune-devel mailing list