<div dir="auto">Dear Roland,<div dir="auto">thank you. Indeed, steering the scalar worked fine for me.</div><div dir="auto"><br></div><div dir="auto">Sincerely,</div><div dir="auto">Lorenzo</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Ven 18 Giu 2021, 17:43 Roland Haas <<a href="mailto:rhaas@illinois.edu">rhaas@illinois.edu</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Lorenzo,<br>
<br>
this has been mentioned already but just to be sure:<br>
<br>
"steerparam" cannot be used to change any of the CarpetRegrid2<br>
parameters since it only uses the values of the parameters to create<br>
the initial set of boxes at t=0. Afterwards it uses (similarly named)<br>
grid scalars (so "steerscalar") and you can see how that is done eg in<br>
the gallery example for bns<br>
<a href="http://einsteintoolkit.org/gallery/bns/nsnstohmns.par" rel="noreferrer noreferrer" target="_blank">http://einsteintoolkit.org/gallery/bns/nsnstohmns.par</a> near the end:<br>
<br>
ActiveThorns = "Trigger"<br>
Trigger::Trigger_Number = 4<br>
<br>
Trigger::Trigger_Checked_Variable[0]="Hydro_Analysis::Hydro_Analysis_rho_max_origin_distance"<br>
Trigger::Trigger_Reduction [0]=""<br>
Trigger::Trigger_Relation [0]="<"<br>
Trigger::Trigger_Checked_Value [0]=10<br>
Trigger::Trigger_Reaction [0]="steerscalar"<br>
Trigger::Trigger_Steered_Scalar [0] = "CarpetRegrid2::num_levels[2]" # == num_levels_3<br>
Trigger::Trigger_Steered_Scalar_Value[0] = "7"<br>
<br>
Yours,<br>
Roland<br>
<br>
> Dear Roland, Gabriele,<br>
> thank you, that's a good point. Indeed, I let the system evolve for well<br>
> more than 32 iterations after the refinement level to be enlarged pops out<br>
> (at the time of checkpoint, before merger, that level is not yet present;<br>
> it appears at the time of merger). But the level was not enlarged by simply<br>
> steering the parameter with Trigger::Trigger_Reaction[0]="steerparam".<br>
> <br>
> One thing that may be important (but I am not sure) is, as I just<br>
> mentioned, that the refinement level I want to enlarge is not yet present<br>
> at the time of checkpoint, it appears after ~2000 iterations.<br>
> <br>
> Sincerely,<br>
> Lorenzo<br>
> <br>
> Il giorno lun 14 giu 2021 alle ore 18:02 Gabriele Bozzola <<br>
> <a href="mailto:bozzola.gabriele@gmail.com" target="_blank" rel="noreferrer">bozzola.gabriele@gmail.com</a>> ha scritto: <br>
> <br>
> > Hi Lorenzo,<br>
> ><br>
> > In my experience, it is not enough to change the value of the parameter:<br>
> > you also need to regrid. If you don't regrid, the grid configuration will<br>
> > not<br>
> > change. (At least, this is what I found using Trigger to change the number<br>
> > of refinement levels.) In your par file you regrid every 32 iterations,<br>
> > have<br>
> > you tried checking the output after regridding?<br>
> ><br>
> > Gabriele<br>
> ><br>
> > On Mon, Jun 14, 2021 at 8:37 AM Lorenzo Ennoggi <<a href="mailto:lorenzo.ennoggi@gmail.com" target="_blank" rel="noreferrer">lorenzo.ennoggi@gmail.com</a>><br>
> > wrote:<br>
> > <br>
> >> Dear Erik,<br>
> >> thank you very much. I am now trying the way Frank suggested before and,<br>
> >> if again the finest refinement level does not get enlarged, I will probably<br>
> >> try to edit the checkpoint files.<br>
> >><br>
> >> Sincerely,<br>
> >> Lorenzo<br>
> >><br>
> >> Il giorno lun 14 giu 2021 alle ore 15:45 Erik Schnetter < <br>
> >> <a href="mailto:schnetter@cct.lsu.edu" target="_blank" rel="noreferrer">schnetter@cct.lsu.edu</a>> ha scritto: <br>
> >> <br>
> >>> On Mon, Jun 14, 2021 at 5:45 AM Lorenzo Ennoggi<br>
> >>> <<a href="mailto:lorenzo.ennoggi@gmail.com" target="_blank" rel="noreferrer">lorenzo.ennoggi@gmail.com</a>> wrote: <br>
> >>> ><br>
> >>> > Dear all,<br>
> >>> > I would like to restart a simulation from a checkpoint enlarging the <br>
> >>> finest refinement level in my grid. In particular, I would like to change<br>
> >>> CarpetRegrid2::radius_1[5] = 20.1 to CarpetRegrid2::radius_1[5] = 25. I<br>
> >>> tried to do that by making the parameter CarpetRegrid2::radius_1 always<br>
> >>> steerable and adding the following lines to my parameter file: <br>
> >>> ><br>
> >>> ><br>
> >>> > ActiveThorns = "Trigger"<br>
> >>> > Trigger::Trigger_Number = 1<br>
> >>> ><br>
> >>> > Trigger::Trigger_Checked_Variable[0] = "hydrobase::rho"<br>
> >>> > Trigger::Trigger_Relation[0] = ">"<br>
> >>> > Trigger::Trigger_Checked_Value[0] = 1.e-4<br>
> >>> > Trigger::Trigger_Reduction[0] = "maximum"<br>
> >>> ><br>
> >>> > Trigger::Trigger_Reaction[0] = "steerparam"<br>
> >>> > Trigger::Trigger_Steered_Parameter_Thorn[0] = "CarpetRegrid2"<br>
> >>> > Trigger::Trigger_Steered_Parameter_Name[0] = "radius_1[5]"<br>
> >>> > Trigger::Trigger_Steered_Parameter_Value[0] = "25." #New value of the <br>
> >>> above parameter <br>
> >>> > Trigger::Trigger_Once[0] = 1 #It means "yes"<br>
> >>> > Trigger::Trigger_Debug = 1 #It means "yes"<br>
> >>> ><br>
> >>> ><br>
> >>> > In this way, the trigger should act immediately, as the maximum of rho <br>
> >>> is ~1e-3 in my case. Indeed, it looks like the trigger is working fine, as<br>
> >>> the standard output says <br>
> >>> ><br>
> >>> > [...]<br>
> >>> > INFO (Trigger): Testing triggers<br>
> >>> > INFO (Trigger): last_checked: -1<br>
> >>> > INFO (Trigger): reducing trigger 0 red_handle 2 varindex 428<br>
> >>> > INFO (Trigger): reducing was ok<br>
> >>> > INFO (Trigger): trigger nr. 0 fullfilled for rho (0.000804>0.000100)<br>
> >>> > INFO (Trigger): Steering parameter<br>
> >>> > INFO (Trigger): Parameter steered<br>
> >>> > [...]<br>
> >>> ><br>
> >>> > but unfortunately, looking at the 2D output with VisIt, the finest <br>
> >>> refinement level does not get enlarged (i.e. radius_1[5] does not appear to<br>
> >>> have been steered at all). Do you have any suggestions on how to get this<br>
> >>> trigger to work? Or, are you aware of other ways of obtaining the same<br>
> >>> result without using the thorn Trigger?<br>
> >>><br>
> >>> Changing these parameters has no effect, even if they were steerable.<br>
> >>><br>
> >>> CarpetRegrid2 uses these parameters to set up the initial grid<br>
> >>> structure, by setting the grid scalars "positions", "radius", etc.<br>
> >>> During regridding, only these grid scalars are examined; the<br>
> >>> parameters are ignored. Other mechanisms to update the grid structure<br>
> >>> (e.g. by tracking horizons or punctures) update these grid scalars,<br>
> >>> which then determines the grid structure during regridding. These grid<br>
> >>> scalars are checkpointed and recovered, as all grid variables are.<br>
> >>><br>
> >>> To modify the grid structure you need to modify these grid scalars.<br>
> >>> You can do this e.g. via Python by doing surgery on the checkpoint<br>
> >>> files, or by scheduling a function that runs right after recovery.<br>
> >>> Carpet performs a regridding step after recovering, before the first<br>
> >>> evolution step.<br>
> >>><br>
> >>> -erik<br>
> >>><br>
> >>> --<br>
> >>> Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank" rel="noreferrer">schnetter@cct.lsu.edu</a>><br>
> >>> <a href="https://urldefense.com/v3/__http://www.perimeterinstitute.ca/personal/eschnetter/__;!!DZ3fjg!qJtg2Dm2iMjbbuuMf08ECoh-wBagefwolYy896CxCjR-URdMDYmN4vPkPBc-9KUA$" rel="noreferrer noreferrer" target="_blank">https://urldefense.com/v3/__http://www.perimeterinstitute.ca/personal/eschnetter/__;!!DZ3fjg!qJtg2Dm2iMjbbuuMf08ECoh-wBagefwolYy896CxCjR-URdMDYmN4vPkPBc-9KUA$</a> <br>
> >>> <br>
> >> _______________________________________________<br>
> >> Users mailing list<br>
> >> <a href="mailto:Users@einsteintoolkit.org" target="_blank" rel="noreferrer">Users@einsteintoolkit.org</a><br>
> >> <a href="https://urldefense.com/v3/__http://lists.einsteintoolkit.org/mailman/listinfo/users__;!!DZ3fjg!qJtg2Dm2iMjbbuuMf08ECoh-wBagefwolYy896CxCjR-URdMDYmN4vPkPI5sd0WV$" rel="noreferrer noreferrer" target="_blank">https://urldefense.com/v3/__http://lists.einsteintoolkit.org/mailman/listinfo/users__;!!DZ3fjg!qJtg2Dm2iMjbbuuMf08ECoh-wBagefwolYy896CxCjR-URdMDYmN4vPkPI5sd0WV$</a> <br>
> >> <br>
> > <br>
<br>
<br>
-- <br>
My email is as private as my paper mail. I therefore support encrypting<br>
and signing email messages. Get my PGP key from <a href="http://pgp.mit.edu" rel="noreferrer noreferrer" target="_blank">http://pgp.mit.edu</a> .<br>
</blockquote></div>