Opened 6 years ago

Last modified 6 years ago

#1077 reopened enhancement

evaluate steered value as formula in AEIThorns::Trigger

Reported by: Roland Haas Owned by:
Priority: minor Milestone:
Component: Other Version:
Keywords: AEIThorn::Trigger Cc:


the attached patch adds functionality to Trigger to use a formula (same syntax as parameters in parameter files) instead of a constant value for its steered values. It supports both grid scalars and parameters as variables. I also include an updated test suite to test the functionality.

Attachments (1)

eval.patch (40.7 KB) - added by Roland Haas 6 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by Roland Haas

Status: newreview

Changed 6 years ago by Roland Haas

Attachment: eval.patch added

comment:2 Changed 6 years ago by Roland Haas

please ignore the check_for_storage.patch. it has already been applied before.

comment:3 Changed 6 years ago by Frank Löffler

The patch looks ok, but duplicates code from the flesh. However, those flesh functions are not accessible to thorns, so that's currently the only way.

Roland: What would it take to provide a function within the flesh which is similar to CCTK_ParameterSet (which already knows about expressions) but which doesn't actually set a parameter but returns what would be set? This could then be used in Trigger so that Trigger wouldn't have to know about how Cactus parses expressions.

comment:4 Changed 6 years ago by Roland Haas

One could make the code in src/eval.c part of the flesh I'd think. It does a bit more than the parameter evaluator since it also uses grid scalars as variables which is not always possible for parameters (since parameters are evaluated before the grid functions have storage for example).

The other option would be to extract code from the beginning of src/main/Parameters.c/ParameterSet* to handle the different parameter types. This is more or less what the proposed patch does for trigger.

If we make it part of the flesh I think it might be useful to expose the two halves (expression parsing and expression evaluation) separately just in case some one wants to apply this to a whole grid function.

comment:5 Changed 6 years ago by Frank Löffler

It would be nice to have a general Cactus interface for parameter parsing, which the flesh itself, but also thorns use - maybe using a flag whether usage of grid scalars is allowed or not.

comment:6 Changed 6 years ago by Roland Haas

Status: reviewreopened

Modify Ticket

Change Properties
Set your email in Preferences
as reopened The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.