Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to RunEventsAndTriggers at steps within a slab for local time-stepping #6360

Merged

Conversation

kidder
Copy link
Member

@kidder kidder commented Nov 4, 2024

Proposed changes

  • Add enum Triggers::WhenToCheck to use as a template parameter for Tags that label EventsAndTriggers
  • Template RunEventsAndTriggers on whether or not LocalTimeStepping is being used
  • Rename input file options EventsAndTriggers to EventsAndTriggersAtIterations for the elliptic executables, and to EventsAndTriggersAtSlabs for evolution executables

Upgrade instructions

  • In elliptic input files, rename EventsAndTriggers to EventsAndTriggersAtIterations
  • In evolution input files, rename EventsAndTriggers to EventsAndTriggersAtSlabs
  • In evolution input files using local time stepping, add a new option EventsAndTriggersAtSteps

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

AtSteps, /**< checked at time step boundaries */
};

/// Output operator for a Flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flag -> WhenToCheck


/// \ingroup EventsAndTriggersGroup
/// \brief Frequency at which Events and Triggers are checked
enum class WhenToCheck : uint8_t {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting seems off here.


Arguments:
event_name: The name of an event like "ObserveTimeSteps".
event__and_triggers_name: The name of a list of events.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: double underscore, missing "s".

@@ -80,14 +84,18 @@ struct ObservationValue {
namespace Tags {
/// \ingroup EventsAndTriggersGroup
/// Contains the events and triggers
template <Triggers::WhenToCheck WhenToCheck>
struct EventsAndTriggers : db::SimpleTag {
using type = ::EventsAndTriggers;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I recall, the original plan was to template the Event class (and possibly Trigger) as well, since most events won't work if run AtSteps. Was that idea abandoned?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No; that is what I plan to do in the next PR. I just thought it would be easier to break things up into separate PRs, as this one will be the one that requires changes to the input files, and I wanted to get the enum finalized before templating the Events on it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that's fine.

@kidder kidder force-pushed the new_lts_events_and_triggers branch from 38fb1a8 to ac6507b Compare November 5, 2024 18:13
@wthrowe
Copy link
Member

wthrowe commented Nov 6, 2024

Looks good. Squash.

WhenToCheck will be used to distinguish input file options for
EventsAndTriggers that are checked at different frequencies (e.g.
after every time slab or after every time step).
The previous hard-coded value for the name will not work for
multiple sets of EventsAndTriggers in an input file.
In evolution executables, the current input option EventsAndTriggers
is replaced with EventsAndTriggersAtSlabs.
In elliptic executables, the current input option EventsAndTriggers
is replaced with EventsAndTriggersAtIterations.
In a future commit, an additional input file option will be added
for evolution executables with local time stepping.
If using LTS, then check EventsAndTriggersAtSteps which can trigger
at steps inside a Slab.
@kidder kidder force-pushed the new_lts_events_and_triggers branch from ac6507b to ca5e87d Compare November 6, 2024 19:22
@wthrowe wthrowe merged commit 24132a0 into sxs-collaboration:develop Nov 6, 2024
22 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants