SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
control_system::BNSEvent< ControlSystems > Class Template Reference

An Event that computes the center of mass for \(x > 0\) and \(x < 0\) where \(x\) is the in the Frame::Grid. More...

#include <BNSCenterOfMass.hpp>

Public Types

using compute_tags_for_observation_box = tmpl::list<>
using return_tags = tmpl::list<>
using argument_tags
using is_ready_argument_tags = tmpl::list<>

Public Member Functions

template<typename Metavariables, typename ArrayIndex, typename ParallelComponent>
void operator() (const double time, const std::optional< double > &previous_time, const Mesh< 3 > &mesh, const Scalar< DataVector > &inv_det_jacobian, const Scalar< DataVector > &tilde_d, const tnsr::I< DataVector, 3, Frame::Grid > &x_grid, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ParallelComponent *const, const ObservationValue &) const
template<typename Metavariables, typename ArrayIndex, typename Component>
bool is_ready (Parallel::GlobalCache< Metavariables > &, const ArrayIndex &, const Component *const) const
bool needs_evolved_variables () const override
 Whether the event uses anything depending on the evolved_variables. If this returns false, anything depending on the evolved variables may have an incorrect value when the event is run.
Public Member Functions inherited from Event
 Event (CkMigrateMessage *msg)
 WRAPPED_PUPable_abstract (Event)
template<typename ComputeTagsList, typename DataBoxType, typename Metavariables, typename ArrayIndex, typename ComponentPointer>
void run (const gsl::not_null< ObservationBox< ComputeTagsList, DataBoxType > * > box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ComponentPointer, const ObservationValue &observation_value) const
template<typename DbTags, typename Metavariables, typename ArrayIndex, typename ComponentPointer>
bool is_ready (const db::DataBox< DbTags > &box, Parallel::GlobalCache< Metavariables > &cache, const ArrayIndex &array_index, const ComponentPointer) const

Static Public Attributes

static constexpr bool factory_creatable = false

Detailed Description

template<typename ControlSystems>
class control_system::BNSEvent< ControlSystems >

An Event that computes the center of mass for \(x > 0\) and \(x < 0\) where \(x\) is the in the Frame::Grid.

Details

See control_system::measurements::grid_center_of_mass_integral_on_element for the calculation of the CoM. This event then does a reduction and calls control_system::PostReductionSendBNSStarCentersToControlSystem as a post reduction callback.

Template Parameters
ControlSystemstmpl::list of all control systems that use this event.

Member Typedef Documentation

◆ argument_tags

template<typename ControlSystems>
using control_system::BNSEvent< ControlSystems >::argument_tags
Initial value:
The coordinates used for observation.
Definition Tags.hpp:50
The determinant of the inverse Jacobian used for observation.
Definition Tags.hpp:157
The mesh for the observation computational grid. For hybrid methods like DG-FD the observer mesh chan...
Definition Tags.hpp:24
Definition IndexType.hpp:43
Definition IndexType.hpp:46
Previous time at which the trigger activated.
Definition EventsAndDenseTriggers.hpp:48
Tag for the current time as a double.
Definition Time.hpp:19
The densitized rest-mass density .
Definition Tags.hpp:32

Member Function Documentation

◆ needs_evolved_variables()

template<typename ControlSystems>
bool control_system::BNSEvent< ControlSystems >::needs_evolved_variables ( ) const
inlineoverridevirtual

Whether the event uses anything depending on the evolved_variables. If this returns false, anything depending on the evolved variables may have an incorrect value when the event is run.

Implements Event.


The documentation for this class was generated from the following file:
  • src/ControlSystem/Measurements/BNSCenterOfMass.hpp