<div dir="ltr">Hi Erik,<div><br></div><div>thanks for your response: it is very useful.</div><div><br></div><div><span class="gmail-im" style="color:rgb(80,0,80)">> > 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></span>> Yes it is. Interpolation requires a stencil, which requires boundaries.<br></div><div><br></div><div>I suspected so. Then, going back to the question in the first email, you</div><div>said that I am essentially forced to compute the diagnostic at</div><div>each timestep. The diagnostic I want to compute is very expensive,</div><div>and it would slow down dramatically the evolution, so I really want to</div><div>compute it only when I am going to output it. What I had in mind was</div><div>to copy grid function to the previous timelevels by setting _p and _p_p. </div><div>If I copy the same values as the one at the current time, this would</div><div>essentially disable time interpolation. But, if I output only when all</div><div>the refinement levels at the same time, this should not be a problem,</div><div>because there shouldn't be a need for time prolongation, right?</div><div><br></div><div>Thanks again for your help,</div><div>Gabriele</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 6, 2021 at 7:45 AM Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu">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 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>
</blockquote></div>