[Users] Issue with thorn Trigger
Erik Schnetter
schnetter at cct.lsu.edu
Mon Jun 14 08:45:08 CDT 2021
On Mon, Jun 14, 2021 at 5:45 AM Lorenzo Ennoggi
<lorenzo.ennoggi at gmail.com> wrote:
>
> Dear all,
> I would like to restart a simulation from a checkpoint enlarging the finest refinement level in my grid. In particular, I would like to change CarpetRegrid2::radius_1[5] = 20.1 to CarpetRegrid2::radius_1[5] = 25. I tried to do that by making the parameter CarpetRegrid2::radius_1 always steerable and adding the following lines to my parameter file:
>
>
> ActiveThorns = "Trigger"
> Trigger::Trigger_Number = 1
>
> Trigger::Trigger_Checked_Variable[0] = "hydrobase::rho"
> Trigger::Trigger_Relation[0] = ">"
> Trigger::Trigger_Checked_Value[0] = 1.e-4
> Trigger::Trigger_Reduction[0] = "maximum"
>
> Trigger::Trigger_Reaction[0] = "steerparam"
> Trigger::Trigger_Steered_Parameter_Thorn[0] = "CarpetRegrid2"
> Trigger::Trigger_Steered_Parameter_Name[0] = "radius_1[5]"
> Trigger::Trigger_Steered_Parameter_Value[0] = "25." #New value of the above parameter
> Trigger::Trigger_Once[0] = 1 #It means "yes"
> Trigger::Trigger_Debug = 1 #It means "yes"
>
>
> In this way, the trigger should act immediately, as the maximum of rho is ~1e-3 in my case. Indeed, it looks like the trigger is working fine, as the standard output says
>
> [...]
> INFO (Trigger): Testing triggers
> INFO (Trigger): last_checked: -1
> INFO (Trigger): reducing trigger 0 red_handle 2 varindex 428
> INFO (Trigger): reducing was ok
> INFO (Trigger): trigger nr. 0 fullfilled for rho (0.000804>0.000100)
> INFO (Trigger): Steering parameter
> INFO (Trigger): Parameter steered
> [...]
>
> but unfortunately, looking at the 2D output with VisIt, the finest refinement level does not get enlarged (i.e. radius_1[5] does not appear to have been steered at all). Do you have any suggestions on how to get this trigger to work? Or, are you aware of other ways of obtaining the same result without using the thorn Trigger?
Changing these parameters has no effect, even if they were steerable.
CarpetRegrid2 uses these parameters to set up the initial grid
structure, by setting the grid scalars "positions", "radius", etc.
During regridding, only these grid scalars are examined; the
parameters are ignored. Other mechanisms to update the grid structure
(e.g. by tracking horizons or punctures) update these grid scalars,
which then determines the grid structure during regridding. These grid
scalars are checkpointed and recovered, as all grid variables are.
To modify the grid structure you need to modify these grid scalars.
You can do this e.g. via Python by doing surgery on the checkpoint
files, or by scheduling a function that runs right after recovery.
Carpet performs a regridding step after recovering, before the first
evolution step.
-erik
--
Erik Schnetter <schnetter at cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/
More information about the Users
mailing list