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