# EulerExplicitSolver

The EulerExplicitSolver (or EulerSolver) component belongs to the category of integration schemes or ODE Solver. This scheme allows to solve dynamic systems explicitely: all forces will be computed based on the state information at the current time step .

Looking at continuum mechanics, the linear system arises from the dynamic equation. This dynamic is written as follows but other physics (like heat transfer) result in a similar equation:

where is the degrees of freedom, the mass matrix and a function of (and possibly its derivatives) acting on our system. In the case of the EulerExplicitSolver, this equation can be written:

since forces only depend on known state (at our current time step). These forces are computed by the ForceField in the `addForce()`

function. The system matrix is only equal to the mass matrix .

In SOFA, the EulerExplicitSolver only handles diagonal mass matrices, thus making the resolution of the linear system trivial. being only equal to a diagonal mass matrix, the result can easily be computed:

where is only a vector. The division operation of by the mass, is actually directly computed by the Mass component in the `accFromF()`

function. Therefore, no LinearSolver is needed to compute directly or iteratively a solution.

## Sequence diagram

## Data

The data **symplectic** allows to modify the scheme to make is symplectic, i.e. velocities are updated before the positions. This option makes the scheme more robust in time.

## Usage

The EulerExplicitSolver **requires** a MechanicalObject to store the state vectors. However, as explained above, no LinearSolver is needed and the EulerExplicitSolver is **only working using a UniformMass or DiagonalMass**, which ensures to have a diagonal system matrix.

## Example

This component is used as follows in XML format:

`<EulerExplicitSolver name="odeExplicitSolver" />`

or using Python:

`node.createObject('EulerExplicitSolver', name='odeExplicitSolver')`

An example scene involving a EulerExplicitSolver is available in *examples/Components/solver/EulerExplicitSolver.scn*

Last modified: 29 March 2019