FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CLowPass.h
1#ifndef CLowPass_H
2#define CLowPass_H
3
55#include <fhsim/simobject/SimObject.h>
56
57class CLowPass : public SimObject
58{
59 public:
61 CLowPass(std::string sSimObjectName, ISimObjectCreator* pCreator);
62 ~CLowPass();
63
64 void InitialConditionSetup(const double T, const double* const currentIC, double* const updatedIC, ISimObjectCreator* const creator);
65
66 void OdeFcn(const double dT, const double* const adX, double* const adXDot) const;
67
68 bool HasJacobians() const override;
69 void OdeJacobian(double T, const double* X, double* J, int nStates) override;
70 int GetJacobianSparsity(int nStates, int* rowPtr, int* colIdx) override;
71
72 bool HasPortJacobians() const override;
73 void OutputPortJacobian(const std::string& portName, double T, const double* X,
74 double* dPort_dX, int portSize, int nStates, int index = -1) override;
75 void InputPortJacobian(const std::string& portName, double T, const double* X,
76 double* dF_dInput, int portSize, int nStates) override;
77
78 const double* Output(const double T, const double* const X);
79
80
81#ifdef FH_VISUALIZATION
83 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator) { }
84
86 virtual void RenderUpdate(const double T, const double* const X) { }
87#endif
88
89 protected:
90 int m_iPortWidth;
91 bool m_bIsUniform;
92 ISignalPort* m_Input;
93 double* m_dConvergenceTimeConstantInv;
94 int m_current_signal;
95};
96
97
98#endif
Definition CLowPass.h:58
CLowPass(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.