<div dir="ltr">Hi Erik,<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In this case, you can declare the grid function to use 0-th order time<br>interpolation, and allocate only a single time level. This would do<br>the same thing. I think the respective time prolongtation operator is<br>called "copy".</blockquote><div><br></div><div>Do I achieveĀ this by setting the tags prolongation="copy" andĀ InterpNumTimelevels = 1</div><div>in the declaration of the grid function in the interface.ccl?</div><div><br></div><div>Thanks again,</div><div>GabrieleĀ </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 7, 2021 at 10:05 AM Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Mar 6, 2021 at 1:58 PM Gabriele Bozzola<br>
<<a href="mailto:bozzola.gabriele@gmail.com" target="_blank">bozzola.gabriele@gmail.com</a>> wrote:<br>
><br>
> Hi Erik,<br>
><br>
> thanks for your response: it is very useful.<br>
><br>
> > > Also, is it a problem if I don't worry about the boundaries If I<br>
> > > want to interpolate the constraints onto a sphere?<br>
> ><br>
> > Yes it is. Interpolation requires a stencil, which requires boundaries.<br>
><br>
> I suspected so. Then, going back to the question in the first email, you<br>
> said that I am essentially forced to compute the diagnostic at<br>
> each timestep. The diagnostic I want to compute is very expensive,<br>
> and it would slow down dramatically the evolution, so I really want to<br>
> compute it only when I am going to output it. What I had in mind was<br>
> to copy grid function to the previous timelevels by setting _p and _p_p.<br>
> If I copy the same values as the one at the current time, this would<br>
> essentially disable time interpolation. But, if I output only when all<br>
> the refinement levels at the same time, this should not be a problem,<br>
> because there shouldn't be a need for time prolongation, right?<br>
<br>
In this case, you can declare the grid function to use 0-th order time<br>
interpolation, and allocate only a single time level. This would do<br>
the same thing. I think the respective time prolongtation operator is<br>
called "copy".<br>
<br>
-erik<br>
<br>
> Thanks again for your help,<br>
> Gabriele<br>
><br>
> On Sat, Mar 6, 2021 at 7:45 AM Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>> wrote:<br>
>><br>
>> On Fri, Mar 5, 2021 at 8:01 PM Gabriele Bozzola<br>
>> <<a href="mailto:bozzola.gabriele@gmail.com" target="_blank">bozzola.gabriele@gmail.com</a>> wrote:<br>
>> ><br>
>> > Hi Erik,<br>
>> ><br>
>> > thank you very much for your answer.<br>
>> ><br>
>> > Just a clarification: what is 'boundary' exactly in this context?<br>
>><br>
>> "Boundary" in the context are all grid points where the constraints<br>
>> cannot be calculated directly, i.e. by evaluating finite differences.<br>
>><br>
>> > Also, is it a problem if I don't worry about the boundaries If I<br>
>> > want to interpolate the constraints onto a sphere?<br>
>><br>
>> Yes it is. Interpolation requires a stencil, which requires boundaries.<br>
>><br>
>> Cactus interpolation supports taking derivatives during interpolation.<br>
>> You can thus interpolate the ADM variables and their derivatives onto<br>
>> a sphere, and calculate the constraints there. You won't need to take<br>
>> derivatives on the sphere since you interpolated all derivatives, so<br>
>> evaluating the constraints on points on a sphere is then a point-wise<br>
>> operation. The horizon finder does this (calculating the expansion,<br>
>> not the constraints, but both have equivalent requirements).<br>
>><br>
>> -erik<br>
>><br>
>> > Thanks,<br>
>> > Gabriele<br>
>> ><br>
>> > Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>> writes:<br>
>> ><br>
>> > > Gabriele<br>
>> > ><br>
>> > > If you do not use the constraints, then you do not need to set<br>
>> > > the<br>
>> > > boundaries. That would simplify many things; for example, you<br>
>> > > can<br>
>> > > calculate them at any time, and you do not need to worry about<br>
>> > > time<br>
>> > > levels. However, you then need to be careful about visualization<br>
>> > > and<br>
>> > > reductions: You need to ensure that you don't accidentally<br>
>> > > visualize<br>
>> > > the boundaries, and you cannot perform vertex-centred reductions<br>
>> > > in<br>
>> > > Carpet because they need some boundary values.<br>
>> > ><br>
>> > > If you do need boundaries, then you need three time levels to<br>
>> > > allow<br>
>> > > prolongation on boundaries, and you are essentially forced to<br>
>> > > evaluate<br>
>> > > the constraints at every iteration. I recommend the schedule bin<br>
>> > > "MoL_PseudoEvolution" for this, which runs once per time step,<br>
>> > > after<br>
>> > > MoL's loop, at the right time (i.e. before restriction).<br>
>> > ><br>
>> > > -erik<br>
>> > ><br>
>> > > On Fri, Mar 5, 2021 at 11:01 AM Gabriele Bozzola<br>
>> > > <<a href="mailto:bozzola.gabriele@gmail.com" target="_blank">bozzola.gabriele@gmail.com</a>> wrote:<br>
>> > >><br>
>> > >> Hello,<br>
>> > >><br>
>> > >> suppose (for clarity) that I want to write a thorn that<br>
>> > >> computes the constraint violations<br>
>> > >> as grid functions. Since this is a diagnostic, I don't need to<br>
>> > >> compute it at every iteration,<br>
>> > >> so I will add a parameter "compute every" and I will schedule<br>
>> > >> the computations in<br>
>> > >> CCTK_ANALYSIS. Then, I will be careful and make sure that<br>
>> > >> compute_every is a<br>
>> > >> multiple of when all the refinement levels are synced up.<br>
>> > >><br>
>> > >> How are boundary conditions handled in this case?<br>
>> > >><br>
>> > >> I can call Boundary_SelectGroupForBC every "compute_every" and<br>
>> > >> schedule the<br>
>> > >> corresponding functions in the scheduler. But, do I need to (1)<br>
>> > >> allocate multiple timelevels<br>
>> > >> for my grid functions, (2) do anything about filling previous<br>
>> > >> timelevels?<br>
>> > >><br>
>> > >> I am looking at WeylScal4 as an example. The thorn has<br>
>> > >> parameters "compute_every",<br>
>> > >> the grid functions have 3 time levels, and<br>
>> > >> Boundary_SelectGroupForBC is called<br>
>> > >> every "compute_every", but nothing is done to fill the previous<br>
>> > >> timelevels. How does this<br>
>> > >> work?<br>
>> > >><br>
>> > >> Assuming that the boundary conditions are 'flat', is there any<br>
>> > >> way to just work with one<br>
>> > >> timelevel?<br>
>> > >><br>
>> > >> Thanks,<br>
>> > >> Gabriele<br>
>> > >><br>
>> > >><br>
>> > >> _______________________________________________<br>
>> > >> Users mailing list<br>
>> > >> <a href="mailto:Users@einsteintoolkit.org" target="_blank">Users@einsteintoolkit.org</a><br>
>> > >> <a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br>
>> <a href="http://www.perimeterinstitute.ca/personal/eschnetter/" rel="noreferrer" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a><br>
<br>
<br>
<br>
-- <br>
Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br>
<a href="http://www.perimeterinstitute.ca/personal/eschnetter/" rel="noreferrer" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a><br>
</blockquote></div>