A helper class for Sundial's time integration. More...
#include <ODEData.h>
A helper class for Sundial's time integration.
Stores necessary muq::Modeling::WorkPiece's and thier inputs so Sundials can hold that information.
Public Member Functions | |
| ODEData (std::shared_ptr< ModPiece > const &rhs, ref_vector< Eigen::VectorXd > const &refinputs, bool const autonomous, int const wrtIn, Eigen::VectorXd const &actionVec=Eigen::VectorXd()) | |
| Construct basic ode data. More... | |
| ODEData (std::shared_ptr< ModPiece > const &rhs, std::shared_ptr< ModPiece > const &root, ref_vector< Eigen::VectorXd > const &refinputs, bool const autonomous, int const wrtIn, Eigen::VectorXd const &actionVec=Eigen::VectorXd()) | |
| Construct with root function. More... | |
| virtual | ~ODEData ()=default |
| void | UpdateInputs (Eigen::Ref< const Eigen::VectorXd > const &newState, double const time) |
| Update the time and state inputs. More... | |
Public Attributes | |
| std::shared_ptr< ModPiece > | rhs |
| The right hand side of the ODE. More... | |
| std::shared_ptr< ModPiece > | root |
| A function we are trying to find the root of along an orbit of the ODE (nullptr if we are not doing a root finding problem) More... | |
| Eigen::VectorXd | time |
| The inputs to the rhs — the first is the state, the rest are constant in time. More... | |
| Eigen::VectorXd | state |
| ref_vector< Eigen::VectorXd > | inputs |
| const bool | autonomous |
| Is the RHS autonomous? More... | |
| const int | wrtIn = -1 |
| The input we are computing the derivative wrt — negative indicates no derivative is being computed. More... | |
| Eigen::VectorXd | actionVec |
| const bool | isAction |
| ODEData::ODEData | ( | std::shared_ptr< ModPiece > const & | rhs, |
| ref_vector< Eigen::VectorXd > const & | refinputs, | ||
| bool const | autonomous, | ||
| int const | wrtIn, | ||
| Eigen::VectorXd const & | actionVec = Eigen::VectorXd() |
||
| ) |
Construct basic ode data.
| [in] | rhs | A muq::Modeling::WorkPiece that evalautes the right hand side of an ODE |
| [in] | inputs | The inputs to the rhs — the first is the state, the rest are constant in time |
| [in] | autonomous | Is the RHS autonomous? |
| [in] | wrtIn | The input we are computing the derivative wrt — negative indicates no derivative is being computed |
Definition at line 8 of file ODEData.cpp.
References autonomous, inputs, and time.
| ODEData::ODEData | ( | std::shared_ptr< ModPiece > const & | rhs, |
| std::shared_ptr< ModPiece > const & | root, | ||
| ref_vector< Eigen::VectorXd > const & | refinputs, | ||
| bool const | autonomous, | ||
| int const | wrtIn, | ||
| Eigen::VectorXd const & | actionVec = Eigen::VectorXd() |
||
| ) |
Construct with root function.
| [in] | rhs | A muq::Modeling::WorkPiece that evalautes the right hand side of an ODE |
| [in] | root | A muq::Modeling::WorkPiece that evalautes a function we are trying to find the root of along an orbit of the ODE |
| [in] | inputs | The inputs to the rhs — the first is the state, the rest are constant in time |
| [in] | autonomous | Is the RHS autonomous? |
| [in] | wrtIn | The input we are computing the derivative wrt — negative indicates no derivative is being computed |
Definition at line 27 of file ODEData.cpp.
References autonomous, inputs, and state.
|
virtualdefault |
| void ODEData::UpdateInputs | ( | Eigen::Ref< const Eigen::VectorXd > const & | newState, |
| double const | time | ||
| ) |
Update the time and state inputs.
Definition at line 47 of file ODEData.cpp.
References autonomous, inputs, state, and time.
Referenced by muq::Modeling::ODE::Interface::RHS(), muq::Modeling::ODE::Interface::RHSJacobian(), and muq::Modeling::ODE::Interface::RHSJacobianAction().
| const bool muq::Modeling::ODEData::autonomous |
Is the RHS autonomous?
Definition at line 67 of file ODEData.h.
Referenced by ODEData(), muq::Modeling::ODE::Interface::RHSJacobian(), muq::Modeling::ODE::Interface::RHSJacobianAction(), and UpdateInputs().
| ref_vector<Eigen::VectorXd> muq::Modeling::ODEData::inputs |
Definition at line 64 of file ODEData.h.
Referenced by muq::Modeling::RootfindingIVP::EvaluateRoot(), ODEData(), muq::Modeling::ODE::Interface::RHS(), muq::Modeling::ODE::Interface::RHSJacobian(), muq::Modeling::ODE::Interface::RHSJacobianAction(), and UpdateInputs().
| std::shared_ptr<ModPiece> muq::Modeling::ODEData::rhs |
The right hand side of the ODE.
Definition at line 56 of file ODEData.h.
Referenced by muq::Modeling::RootfindingIVP::EvaluateRoot(), muq::Modeling::ODE::Interface::RHS(), muq::Modeling::ODE::Interface::RHSJacobian(), and muq::Modeling::ODE::Interface::RHSJacobianAction().
| std::shared_ptr<ModPiece> muq::Modeling::ODEData::root |
A function we are trying to find the root of along an orbit of the ODE (nullptr if we are not doing a root finding problem)
Definition at line 59 of file ODEData.h.
Referenced by muq::Modeling::RootfindingIVP::EvaluateRoot().
| Eigen::VectorXd muq::Modeling::ODEData::state |
Definition at line 63 of file ODEData.h.
Referenced by ODEData(), and UpdateInputs().
| Eigen::VectorXd muq::Modeling::ODEData::time |
The inputs to the rhs — the first is the state, the rest are constant in time.
Definition at line 62 of file ODEData.h.
Referenced by ODEData(), and UpdateInputs().
| const int muq::Modeling::ODEData::wrtIn = -1 |