[Dune-devel] Replacing SGrid by YaspGrid

Dominic Kempf dominic.r.kempf at gmail.com
Mon Oct 13 11:21:33 CEST 2014


Hey Oliver,
unfortunately, having the user create his own coordinate object is only a
good idea for sequential grids. For parallel grids, the coordinate object
implicitly contains information about the partitioning. Especially with
TensorProduct grids this should not be touched by the user. It would also
violates the "Simple things should be simple" paradigm.
Best,
Dominic

On Mon, Oct 13, 2014 at 10:38 AM, Oliver Sander <sander at igpm.rwth-aachen.de>
wrote:

> Hi Dominic,
> thanks for measuring.  It's always good to make informed choices.
> Frankly, I wouldn't
> have expected it to make that much of a difference.
> Concerning the additional information: I guess the most general way would
> be to require
> the user to create the Coordinate object herself, and pass it to the
> YaspGrid constructor.
> That way a single YaspGrid constructor works for all possible Coordinate
> types.
> On the other hand I think that one additional YaspGrid constructor for the
> case considered
> here wouldn't be a bad thing.
> Best,
> Oliver
>
>
> Am 13.10.2014 um 10:31 schrieb Dominic Kempf:
> > Hey Oliver,
> > this is indeed something to think about.
> > I have bad news though. I have done a quick measurement of option b).
> > I added a parameter origin to EquidistantCoordinates and defaulted it to
> 0.
> > This slowed down the finitevolume example by roughly 10%.
> > You're option a) is of course VERY simple to implement. The only question
> > that bugs me about it, is how to pass the additional information. I would
> > be very happy
> > if there was a good way, that does not involve introducing an additional
> > constructor.
> > Any opinions?
> > Best,
> > Dominic
> >
> > On Fri, Oct 10, 2014 at 7:13 PM, Oliver Sander <
> sander at igpm.rwth-aachen.de>
> > wrote:
> >
> >> Hi all,
> >> while thinking about how to replace SGrid by YaspGrid I came about the
> >> following
> >> small inconvenience: SGrid are uniformly spaced, and both the lower left
> >> and the
> >> upper right corners are free.  YaspGrid, OTOH, when they are not
> >> tensor-product grids,
> >> constrain the lower-left corner to be (0,...,0).  So currently, in order
> >> to replace
> >> SGrids I sometimes have to use tensor-product YaspGrids even though they
> >> are uniformly
> >> spaced.
> >> Should we
> >> a) introduce a third Coordinates class in YaspGrid for uniformly spaced
> >> grids with
> >>    a nonzero left corner?
> >> b) generalize the current EquidistantCoordinate class to allow for a
> >> nonzero left
> >>    corner?
> >>
> >> a) would be preferable if b) would lead to a measurable slowdown.  Does
> >> anybody
> >> have experience with this?
> >> Thanks,
> >> Oliver
> >>
> >>
> >> _______________________________________________
> >> Dune-devel mailing list
> >> Dune-devel at dune-project.org
> >> http://lists.dune-project.org/mailman/listinfo/dune-devel
> >>
> >>
> >
>
>
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20141013/1af6875b/attachment.htm>


More information about the Dune-devel mailing list