[ET Trac] [Einstein Toolkit] #1343: Cactus ParameterGetXXX functions return values for non-active thorns
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Tue Apr 30 22:35:28 CDT 2013
#1343: Cactus ParameterGetXXX functions return values for non-active thorns
----------------------+-----------------------------------------------------
Reporter: rhaas | Owner:
Type: defect | Status: new
Priority: optional | Milestone:
Component: Cactus | Version:
Keywords: |
----------------------+-----------------------------------------------------
using eg. CCTK_ParameterValString it is possible to access parameters of
non-active thorns, eg. the line in CarpetIOHDF5/src/Input.cc lines 280ff
{{{
char *buffer = CCTK_ParameterValString ("refinement_levels",
"CarpetRegrid");
assert (buffer);
CCTK_VInfo (CCTK_THORNSTRING, "Using %i reflevels from checkpoint file.
"
"Ignoring value '%s' in parameter file.",
num_reflevels, buffer);
free (buffer);
}
char buffer[32];
snprintf (buffer, sizeof (buffer), "%d", num_reflevels);
int const retval = CCTK_ParameterSet ("refinement_levels", "CarpetRegrid",
buffer);
}}}
will actually get a value (the default value it seems) and is able to
steer a value of a non-active thorns.
Reading the Cactus docs this behaviour is not forbidden however I
personally find it a bit confusing.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1343>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list