[Carpet] Buffer zones in old and new Carpet
Erik Schnetter
schnetter at cct.lsu.edu
Tue Mar 4 01:33:11 CET 2008
On Mar 3, 2008, at 17:43:14, Ian Hinder wrote:
> Hi,
>
> I would like for the moment for my regridding thorn to be compatible
> with both carpet-stable-3 and carpet development. This thorn needs to
> add buffer points to the grid structure it generates. In
> development, I
> think the best way to do this is to copy CarpetRegrid2 and use the
> dd.buffer_width Carpet public variable. However, this variable does
> not
> exist in carpet-stable-3, as it was renamed. What I would like to
> do is
> something along the lines of
>
> #ifdef dd.buffer_width
> <use dd.buffer_width>
> #else
> <use dd.inner_buffer_width>
> #endif
>
> I don't think the above is a valid use of the pre-processor though.
> Does anyone know how I can achieve what I want to? Some ugly hacks
> are:
>
> * Add a preprocessor macro HAVE_BUFFER_WIDTH or CARPET4 to the
> development version, so that I can test it and do something
> accordingly
>
> * Return the inner_buffer_width variable to the development version,
> since it seems that unless you are using CarpetRegrid2, which
> provides a
> thin abstraction over the concept, all buffer zones are inner buffer
> zones anyway,
>
> I'd prefer a solution that didn't involve adding legacy cruft to
> Carpet,
> but I can't think of one.
We can add a #define CARPET_HAVE_BUFFER_WIDTH to dd.hh. Please make
your thorn work before you push this change.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu> http://www.cct.lsu.edu/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url : /archives/developers/attachments/20080303/0c2e5f31/attachment-0001.pgp
More information about the developers
mailing list