FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CIntegrator.h
1#ifndef CIntegrator_H
2#define CIntegrator_H
3
60#include <fhsim/simobject/SimObject.h>
61#include "SignalBlock.h"
62#include <string>
63
65{
66 public:
68 CIntegrator(std::string sSimObjectName, ISimObjectCreator* pCreator);
69
71 void OdeFcn(const double dT, const double* const adX, double* const adXDot) const;
72
73 bool HasJacobians() const override;
74 void OdeJacobian(double T, const double* X, double* J, int nStates) override;
75 int GetJacobianSparsity(int nStates, int* rowPtr, int* colIdx) override;
76
77 bool HasPortJacobians() const override;
78 void OutputPortJacobian(const std::string& portName, double T, const double* X,
79 double* dPort_dX, int portSize, int nStates, int index = -1) override;
80 void InputPortJacobian(const std::string& portName, double T, const double* X,
81 double* dF_dInput, int portSize, int nStates) override;
82
83 const double* Output(const double T, const double* const X);
84
85 void InitialConditionSetup(const double T, const double* const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
86
87
88 protected:
89 ISignalPort* m_IcPort;
90 ISignalPort* m_Input;
91 int m_StateIndex;
92};
93#endif
Definition CIntegrator.h:65
CIntegrator(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.
Definition SignalBlock.h:18