[Dune-devel] Replacing SGrid by YaspGrid
Oliver Sander
sander at igpm.rwth-aachen.de
Mon Oct 13 10:38:43 CEST 2014
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
>>
>>
>
-------------- 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/20141013/4e5d0fd6/attachment.sig>
More information about the Dune-devel
mailing list