Back

AnimateBeginEvent

The `AnimateBeginEvent` is an event in the SOFA framework fired by the `Simulation::animate()` function before computing a new animation step. It inherits from the base `sofa::core::objectmodel::Event` class and is part of the Sofa.framework.Simulation.Core module. ### Role and Purpose The primary role of `AnimateBeginEvent` is to signal the beginning of an animation step, providing a mechanism for other components in the simulation pipeline to perform actions or updates at this specific point. This event ensures that all relevant parts of the simulation are synchronized with the start of each new time step. ### Interactions with Other Components - **Simulation::animate()**: The `AnimateBeginEvent` is fired by this function, marking the beginning of a new animation step. - **Other Event Listeners**: Any component that listens for events can handle this event to perform specific operations at the start of an animation step. This includes components responsible for updating simulation states, performing computations, or triggering other dependent processes. ### Practical Usage Guidance and Data Fields - The `AnimateBeginEvent` has a single data field, `SReal dt`, which represents the time interval (delta time) for the upcoming animation step. - Methods include: - `getDt()`: Returns the delta time (`dt`) for the current event. - `checkEventType(event)`: A static method that checks if an event is of type `AnimateBeginEvent`. - `GetClassName()`: Returns a string indicating the class name, which can be useful for logging or debugging purposes. This component is essential for maintaining synchronization and coordination in multi-component simulation scenarios within SOFA.

abstract
`AnimateBeginEvent` signals the start of each animation step in SOFA simulations, providing a synchronization mechanism for other components to perform necessary actions before advancing the simulation.
sheet
# AnimateBeginEvent **Overview** The `AnimateBeginEvent` is an event fired by the `Simulation::animate()` function before computing a new animation step. It inherits from the base `sofa::core::objectmodel::Event` class and ensures that all relevant components are synchronized at the start of each time step. **Parameters and Data** - **SReal dt**: Represents the time interval (delta time) for the upcoming animation step, crucial for numerical integration schemes used in the simulation process.
description
The `AnimateBeginEvent` is an event in the SOFA framework fired by the `Simulation::animate()` function before computing a new animation step. It inherits from the base `sofa::core::objectmodel::Event` class and is part of the Sofa.framework.Simulation.Core module. ### Role and Purpose The primary role of `AnimateBeginEvent` is to signal the beginning of an animation step, providing a mechanism for other components in the simulation pipeline to perform actions or updates at this specific point. This event ensures that all relevant parts of the simulation are synchronized with the start of each new time step. ### Interactions with Other Components - **Simulation::animate()**: The `AnimateBeginEvent` is fired by this function, marking the beginning of a new animation step. - **Other Event Listeners**: Any component that listens for events can handle this event to perform specific operations at the start of an animation step. This includes components responsible for updating simulation states, performing computations, or triggering other dependent processes. ### Practical Usage Guidance and Data Fields - The `AnimateBeginEvent` has a single data field, `SReal dt`, which represents the time interval (delta time) for the upcoming animation step. - Methods include: - `getDt()`: Returns the delta time (`dt`) for the current event. - `checkEventType(event)`: A static method that checks if an event is of type `AnimateBeginEvent`. - `GetClassName()`: Returns a string indicating the class name, which can be useful for logging or debugging purposes. This component is essential for maintaining synchronization and coordination in multi-component simulation scenarios within SOFA.
maths
The `AnimateBeginEvent` is an event in the SOFA framework, which is fired by the `Simulation::animate()` function before computing a new animation step. This event does not directly implement or contribute to any governing equations, constitutive laws, stiffness matrices, internal forces, residuals, or other mathematical operators used in the finite element method (FEM). Instead, it serves as a synchronization mechanism for the simulation pipeline. ### Role in the Global FEM Pipeline - **Time Integration**: The `AnimateBeginEvent` marks the beginning of each time step during animation. It ensures that all relevant components are synchronized and ready to perform their computations at this stage. - **Simulation Coordination**: This event allows other components within the simulation pipeline to react appropriately when a new animation step begins, such as updating states or performing necessary initializations before advancing the simulation in time. ### Numerical Methods and Discretization Choices The `AnimateBeginEvent` itself does not encode any numerical methods or discretization choices. However, it provides a delta-time (`dt`) value that is crucial for various numerical integration schemes used throughout the simulation process. ### Variational/Lagrangian Mechanics Framework While `AnimateBeginEvent` does not directly contribute to the mathematical formulation of variational or Lagrangian mechanics, it plays an essential role in ensuring that all components are synchronized and properly initialized before advancing the simulation state. This ensures consistency across different parts of the simulation pipeline. ### Summary - **Governing Equations/Operators**: None. - **Constitutive/Kinematic Laws**: None. - **Role in FEM Pipeline**: Synchronization mechanism for animation steps. - **Numerical Methods/Discretization**: Provides `dt` for time integration schemes. - **Variational/Lagrangian Mechanics Framework**: Ensures synchronization and initialization of components.
{
  "name": "AnimateBeginEvent",
  "main": {
    "name": "AnimateBeginEvent",
    "namespace": "sofa::simulation",
    "module": "Sofa.framework.Simulation.Core",
    "include": "sofa/simulation/AnimateBeginEvent.h",
    "doc": "Event fired by Simulation::animate() before computing a new animation step.\n  @author Jeremie Allard",
    "inherits": [
      "Event"
    ],
    "templates": [],
    "data_fields": [],
    "links": [],
    "methods": [
      {
        "name": "getEventTypeIndex",
        "return_type": "int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "checkEventType",
        "return_type": "bool",
        "params": [
          {
            "name": "event",
            "type": "const Event *"
          }
        ],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": true,
        "access": "public"
      },
      {
        "name": "getDt",
        "return_type": "SReal",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      },
      {
        "name": "GetClassName",
        "return_type": "const char *",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": true,
        "access": "public"
      }
    ]
  },
  "desc": {
    "description": "The `AnimateBeginEvent` is an event in the SOFA framework fired by the `Simulation::animate()` function before computing a new animation step. It inherits from the base `sofa::core::objectmodel::Event` class and is part of the Sofa.framework.Simulation.Core module.\n\n### Role and Purpose\nThe primary role of `AnimateBeginEvent` is to signal the beginning of an animation step, providing a mechanism for other components in the simulation pipeline to perform actions or updates at this specific point. This event ensures that all relevant parts of the simulation are synchronized with the start of each new time step.\n\n### Interactions with Other Components\n- **Simulation::animate()**: The `AnimateBeginEvent` is fired by this function, marking the beginning of a new animation step.\n- **Other Event Listeners**: Any component that listens for events can handle this event to perform specific operations at the start of an animation step. This includes components responsible for updating simulation states, performing computations, or triggering other dependent processes.\n\n### Practical Usage Guidance and Data Fields\n- The `AnimateBeginEvent` has a single data field, `SReal dt`, which represents the time interval (delta time) for the upcoming animation step.\n- Methods include:\n  - `getDt()`: Returns the delta time (`dt`) for the current event.\n  - `checkEventType(event)`: A static method that checks if an event is of type `AnimateBeginEvent`.\n  - `GetClassName()`: Returns a string indicating the class name, which can be useful for logging or debugging purposes.\n\nThis component is essential for maintaining synchronization and coordination in multi-component simulation scenarios within SOFA."
  },
  "maths": {
    "maths": "The `AnimateBeginEvent` is an event in the SOFA framework, which is fired by the `Simulation::animate()` function before computing a new animation step. This event does not directly implement or contribute to any governing equations, constitutive laws, stiffness matrices, internal forces, residuals, or other mathematical operators used in the finite element method (FEM). Instead, it serves as a synchronization mechanism for the simulation pipeline.\n\n### Role in the Global FEM Pipeline\n- **Time Integration**: The `AnimateBeginEvent` marks the beginning of each time step during animation. It ensures that all relevant components are synchronized and ready to perform their computations at this stage.\n- **Simulation Coordination**: This event allows other components within the simulation pipeline to react appropriately when a new animation step begins, such as updating states or performing necessary initializations before advancing the simulation in time.\n\n### Numerical Methods and Discretization Choices\nThe `AnimateBeginEvent` itself does not encode any numerical methods or discretization choices. However, it provides a delta-time (`dt`) value that is crucial for various numerical integration schemes used throughout the simulation process.\n\n### Variational/Lagrangian Mechanics Framework\nWhile `AnimateBeginEvent` does not directly contribute to the mathematical formulation of variational or Lagrangian mechanics, it plays an essential role in ensuring that all components are synchronized and properly initialized before advancing the simulation state. This ensures consistency across different parts of the simulation pipeline.\n\n### Summary\n- **Governing Equations/Operators**: None.\n- **Constitutive/Kinematic Laws**: None.\n- **Role in FEM Pipeline**: Synchronization mechanism for animation steps.\n- **Numerical Methods/Discretization**: Provides `dt` for time integration schemes.\n- **Variational/Lagrangian Mechanics Framework**: Ensures synchronization and initialization of components."
  },
  "summary": {
    "abstract": "`AnimateBeginEvent` signals the start of each animation step in SOFA simulations, providing a synchronization mechanism for other components to perform necessary actions before advancing the simulation.",
    "sheet": "# AnimateBeginEvent\n\n**Overview**\n\nThe `AnimateBeginEvent` is an event fired by the `Simulation::animate()` function before computing a new animation step. It inherits from the base `sofa::core::objectmodel::Event` class and ensures that all relevant components are synchronized at the start of each time step.\n\n**Parameters and Data**\n\n- **SReal dt**: Represents the time interval (delta time) for the upcoming animation step, crucial for numerical integration schemes used in the simulation process."
  }
}