|
SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
|
A compile-time registry of equations. More...
#include <registry.hpp>
Public Types | |
| using | Equations = utils::types::TypeList<EquationTs...> |
| The equation types in the registry. | |
| using | Rows = utils::types::TypeList<discretization::forms::Operand<typename EquationTs::Test>...> |
| The residual row types in the registry. | |
Public Member Functions | |
| EquationRegistry (EquationTs... equations) | |
| Construct an equation registry with the given equations. | |
| template<typename FunctionT> | |
| void | for_each (FunctionT &&function) const |
| Apply some function to every type in the registry. | |
| template<Equation EquationT> | |
| const EquationT & | get () const |
| Get the equation of a given type from the registry. | |
Private Attributes | |
| std::tuple< EquationTs... > | m_equations |
| The equations in the registry, stored as a tuple. | |
A compile-time registry of equations.
| EquationTs | Pack of equation types to register. |
| Requirements |
|---|
|
| using serif::equations::EquationRegistry< EquationTs >::Equations = utils::types::TypeList<EquationTs...> |
The equation types in the registry.
| using serif::equations::EquationRegistry< EquationTs >::Rows = utils::types::TypeList<discretization::forms::Operand<typename EquationTs::Test>...> |
The residual row types in the registry.
|
inlineexplicit |
Construct an equation registry with the given equations.
| equations | The equations to register. |
|
inline |
Apply some function to every type in the registry.
| FunctionT | The type of the function to apply. The function must have the signature void(const EquationT&) where EquationT is the type of the equation in the registry. |
| function | The function to apply to each equation in the registry. |
|
inlinenodiscard |
Get the equation of a given type from the registry.
| EquationT | The type of the equation to get. |
|
private |
The equations in the registry, stored as a tuple.