[Users] Grid function timelevels
schnetter at cct.lsu.edu
Tue Jul 3 09:22:07 CDT 2018
What you are doing is correct, and I would not worry about the inefficiencies.
Another, more complicated way, would be the following:
- Since your variable is constant, you declare it and you allocate
only a single time level
- You then don't have to copy any time levels; the current value will
- Whenever your interpolate in time, which might happen implicitly
during spatial interpolation or during prolongation, you need to
ensure that you use zeroth (0th) order interpolation, i.e. are taking
values from the nearest available value. Telling all the respective
part of Cactus and Carpet to do so might be inconvenient, and is
overall probably not worth the trouble.
On Tue, Jul 3, 2018 at 9:57 AM, Jens Mahlmann <jensmahl at alumni.uv.es> wrote:
> Dear all,
> I am currently optimizing some code in the Einstein Toolkit and have a
> general question on time levels and declarations.
> Throughout my evolution, I use some quantities (initialized as grid
> functions with various time levels) which are not changed throughout the
> evolution or only changed explicitly in some moments. At the moment, I
> make sure in every time step via
> variable[i3D] = variable_p[i3D]
> that I have the correct values at the respective time.
> Is there a better way to do this? I.e. is there a way to declare a grid
> function or to register it such that it stays untouched throughout the
> time evolution except when I change it explicitly?
> Thank you very much and my best from Valencia
> Jens Mahlmann
> Users mailing list
> Users at einsteintoolkit.org
Erik Schnetter <schnetter at cct.lsu.edu>
More information about the Users