MUQ  0.4.3
muq::Modeling::ODEData Class Reference

A helper class for Sundial's time integration. More...

#include <ODEData.h>

Detailed Description

A helper class for Sundial's time integration.

Stores necessary muq::Modeling::WorkPiece's and thier inputs so Sundials can hold that information.

Definition at line 18 of file ODEData.h.

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< ModPiecerhs
 The right hand side of the ODE. More...
 
std::shared_ptr< ModPieceroot
 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
 

Constructor & Destructor Documentation

◆ ODEData() [1/2]

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.

Parameters
[in]rhsA muq::Modeling::WorkPiece that evalautes the right hand side of an ODE
[in]inputsThe inputs to the rhs — the first is the state, the rest are constant in time
[in]autonomousIs the RHS autonomous?
[in]wrtInThe 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() [2/2]

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.

Parameters
[in]rhsA muq::Modeling::WorkPiece that evalautes the right hand side of an ODE
[in]rootA muq::Modeling::WorkPiece that evalautes a function we are trying to find the root of along an orbit of the ODE
[in]inputsThe inputs to the rhs — the first is the state, the rest are constant in time
[in]autonomousIs the RHS autonomous?
[in]wrtInThe 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.

◆ ~ODEData()

virtual muq::Modeling::ODEData::~ODEData ( )
virtualdefault

Member Function Documentation

◆ UpdateInputs()

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().

Member Data Documentation

◆ actionVec

Eigen::VectorXd muq::Modeling::ODEData::actionVec

Definition at line 72 of file ODEData.h.

◆ autonomous

const bool muq::Modeling::ODEData::autonomous

◆ inputs

◆ isAction

const bool muq::Modeling::ODEData::isAction

Definition at line 73 of file ODEData.h.

◆ rhs

std::shared_ptr<ModPiece> muq::Modeling::ODEData::rhs

◆ root

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().

◆ state

Eigen::VectorXd muq::Modeling::ODEData::state

Definition at line 63 of file ODEData.h.

Referenced by ODEData(), and UpdateInputs().

◆ time

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().

◆ wrtIn

const int muq::Modeling::ODEData::wrtIn = -1

The input we are computing the derivative wrt — negative indicates no derivative is being computed.

Definition at line 70 of file ODEData.h.


The documentation for this class was generated from the following files: