[ET Trac] [Einstein Toolkit] #798: allow calculations in parameter assignments in parameter files
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Thu Apr 19 11:20:26 CDT 2012
#798: allow calculations in parameter assignments in parameter files
--------------------------+-------------------------------------------------
Reporter: rhaas | Owner:
Type: enhancement | Status: reopened
Priority: optional | Milestone:
Component: Cactus | Version:
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment (by rhaas):
Nono, not just summed. Arbitrary expressions (see UsersGuide section
D2.3.2):
{{{
· ACCUMULATOR specifies that this is an accumulator parameter. Such
parameters cannot be set
directly, but are set by other parameters who specify this one as an
ACCUMULATOR-BASE. The ex-
pression is a two-parameter arithmetical expression of x and y. Setting
the parameter consists of
evaluating this expression successively, with x being the current value
of the parameter (at the first
iteration this is the default value), and y the value of the setting
parameter. This procedure is
repeated, starting from the default value of the parameter, each time
one of the setting parameters
changes.
}}}
Making this not order dependent would require changes to how Cactus parses
parameter files. Non trivial ones at that since you have to track
parameter dependency of some sort (assume A refers to B which refers to
C). The easiest way might be to store the initialization as a string and
mark a parameter as "not initialized", then on first access of the value
via ParameterGet() check this flag and evaluate the expression if needed.
Not sure if that also catches DECLARE_PARAMETERS or if that one uses a
different mechanism to access values (in FORTRAN its just a common data
area, so something _is_ different).
Note that I am emphatically not volunteering to implement this. :-)
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/798#comment:23>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list