11 #ifndef RTW_SOLVER_H__
12 #define RTW_SOLVER_H__
125 #define rtsiSetRTModelPtr(S,rtmp) ((S)->rtModelPtr = (rtmp))
126 #define rtsiGetRTModelPtr(S) (S)->rtModelPtr
128 #define rtsiSetSimTimeStepPtr(S,stp) ((S)->simTimeStepPtr = (stp))
129 #define rtsiGetSimTimeStepPtr(S) ((S)->simTimeStepPtr)
130 #define rtsiGetSimTimeStep(S) *((S)->simTimeStepPtr)
131 #define rtsiSetSimTimeStep(S,st) (*((S)->simTimeStepPtr) = (st))
133 #define rtsiSetSolverData(S,sd) ((S)->solverData = (sd))
134 #define rtsiGetSolverData(S) (S)->solverData
136 #define rtsiSetSolverName(S,sn) ((S)->solverName = (sn))
137 #define rtsiGetSolverName(S) (S)->solverName
139 #define rtsiSetVariableStepSolver(S,vs) ((S)->isVariableStepSolver = (vs))
140 #define rtsiIsVariableStepSolver(S) (S)->isVariableStepSolver
142 #define rtsiSetSolverNeedsReset(S,sn) ((S)->solverNeedsReset = (sn))
143 #define rtsiGetSolverNeedsReset(S) (S)->solverNeedsReset
145 #define rtsiSetContTimeOutputInconsistentWithStateAtMajorStep(S,sn) ((S)->CTOutputIncnstWithState = (sn))
146 #define rtsiGetContTimeOutputInconsistentWithStateAtMajorStep(S) (S)->CTOutputIncnstWithState
148 #define rtsiSetBlkStateChange(S,sn) ((S)->CTOutputIncnstWithState = (sn))
149 #define rtsiGetBlkStateChange(S) (S)->CTOutputIncnstWithState
151 #define rtsiSetBlockStateForSolverChangedAtMajorStep(S,sn) ((S)->solverNeedsReset = (sn))
152 #define rtsiGetBlockStateForSolverChangedAtMajorStep(S) (S)->solverNeedsReset
154 #define rtsiSetSolverMode(S,sm) ((S)->solverMode = (sm))
155 #define rtsiGetSolverMode(S) (S)->solverMode
157 #define rtsiSetSolverStopTime(S,st) ((S)->solverStopTime = (st))
158 #define rtsiGetSolverStopTime(S) (S)->solverStopTime
160 #define rtsiSetStepSizePtr(S,ssp) ((S)->stepSizePtr = (ssp))
161 #define rtsiSetStepSize(S,ss) (*((S)->stepSizePtr) = (ss))
162 #define rtsiGetStepSize(S) *((S)->stepSizePtr)
164 #define rtsiSetMinStepSize(S,ss) (((S)->minStepSize = (ss)))
165 #define rtsiGetMinStepSize(S) (S)->minStepSize
167 #define rtsiSetMaxStepSize(S,ss) ((S)->maxStepSize = (ss))
168 #define rtsiGetMaxStepSize(S) (S)->maxStepSize
170 #define rtsiSetFixedStepSize(S,ss) ((S)->fixedStepSize = (ss))
171 #define rtsiGetFixedStepSize(S) (S)->fixedStepSize
173 #define rtsiSetMaxNumMinSteps(S,mns) ((S)->maxNumMinSteps = (mns))
174 #define rtsiGetMaxNumMinSteps(S) (S)->maxNumMinSteps
176 #define rtsiSetSolverMaxOrder(S,smo) ((S)->solverMaxOrder = (smo))
177 #define rtsiGetSolverMaxOrder(S) (S)->solverMaxOrder
179 #define rtsiSetSolverJacobianMethodControl(S,smcm) (ssGetSolverInfo(S)->solverJacobianMethodControl = (smcm))
180 #define rtsiGetSolverJacobianMethodControl(S) ssGetSolverInfo(S)->solverJacobianMethodControl
182 #define rtsiSetSolverShapePreserveControl(S,smcm) (ssGetSolverInfo(S)->solverShapePreserveControl = (smcm))
183 #define rtsiGetSolverShapePreserveControl(S) ssGetSolverInfo(S)->solverShapePreserveControl
185 #define rtsiSetSolverConsecutiveZCsStepRelTol(S,scr) (ssGetSolverInfo(S)->solverConsecutiveZCsStepRelTol = (scr))
186 #define rtsiGetSolverConsecutiveZCsStepRelTol(S) ssGetSolverInfo(S)->solverConsecutiveZCsStepRelTol
188 #define rtsiSetSolverMaxConsecutiveZCs(S,smcz) (ssGetSolverInfo(S)->solverMaxConsecutiveZCs = (smcz))
189 #define rtsiGetSolverMaxConsecutiveZCs(S) ssGetSolverInfo(S)->solverMaxConsecutiveZCs
191 #define rtsiSetSolverMaxConsecutiveMinStep(S,smcm) (ssGetSolverInfo(S)->solverMaxConsecutiveMinStep = (smcm))
192 #define rtsiGetSolverMaxConsecutiveMinStep(S) ssGetSolverInfo(S)->solverMaxConsecutiveMinStep
194 #define rtsiSetSolverExtrapolationOrder(S,seo) ((S)->solverExtrapolationOrder = (seo))
195 #define rtsiGetSolverExtrapolationOrder(S) (S)->solverExtrapolationOrder
197 #define rtsiSetSolverNumberNewtonIterations(S,nni) ((S)->solverNumberNewtonIterations = (nni))
198 #define rtsiGetSolverNumberNewtonIterations(S) (S)->solverNumberNewtonIterations
200 #define rtsiSetSolverRefineFactor(S,smo) ((S)->solverRefineFactor = (smo))
201 #define rtsiGetSolverRefineFactor(S) (S)->solverRefineFactor
203 #define rtsiSetSolverRelTol(S,smo) ((S)->solverRelTol = (smo))
204 #define rtsiGetSolverRelTol(S) (S)->solverRelTol
206 #define rtsiSetSolverMassMatrixType(S,type) ((S)->massMatrixType = (type))
207 #define rtsiGetSolverMassMatrixType(S) (S)->massMatrixType
209 #define rtsiSetSolverMassMatrixNzMax(S,nzMax) ((S)->massMatrixNzMax = (nzMax))
210 #define rtsiGetSolverMassMatrixNzMax(S) (S)->massMatrixNzMax
212 #define rtsiSetSolverMassMatrixIr(S,ir) ((S)->massMatrixIr = (ir))
213 #define rtsiGetSolverMassMatrixIr(S) (S)->massMatrixIr
215 #define rtsiSetSolverMassMatrixJc(S,jc) ((S)->massMatrixJc = (jc))
216 #define rtsiGetSolverMassMatrixJc(S) (S)->massMatrixJc
218 #define rtsiSetSolverMassMatrixPr(S,pr) ((S)->massMatrixPr = (pr))
219 #define rtsiGetSolverMassMatrixPr(S) (S)->massMatrixPr
221 #define rtsiSetdXPtr(S,dxp) ((S)->dXPtr = (dxp))
222 #define rtsiSetdX(S,dx) (*((S)->dXPtr) = (dx))
223 #define rtsiGetdX(S) *((S)->dXPtr)
225 #define rtsiSetTPtr(S,tp) ((S)->tPtr = (tp))
226 #define rtsiSetT(S,t) ((*((S)->tPtr))[0] = (t))
227 #define rtsiGetT(S) (*((S)->tPtr))[0]
229 #define rtsiSetContStatesPtr(S,cp) ((S)->contStatesPtr = (cp))
230 #define rtsiGetContStates(S) *((S)->contStatesPtr)
232 #define rtsiSetNumContStatesPtr(S,cp) ((S)->numContStatesPtr = (cp))
233 #define rtsiGetNumContStates(S) *((S)->numContStatesPtr)
235 #define rtsiSetNumPeriodicContStatesPtr(S,cp) ((S)->numPeriodicContStatesPtr = (cp))
236 #define rtsiGetNumPeriodicContStates(S) *((S)->numPeriodicContStatesPtr)
238 #define rtsiSetPeriodicContStateIndicesPtr(S,cp) ((S)->periodicContStateIndicesPtr = (cp))
239 #define rtsiGetPeriodicContStateIndices(S) *((S)->periodicContStateIndicesPtr)
241 #define rtsiSetPeriodicContStateRangesPtr(S,cp) ((S)->periodicContStateRangesPtr = (cp))
242 #define rtsiGetPeriodicContStateRanges(S) *((S)->periodicContStateRangesPtr)
244 #define rtsiSetErrorStatusPtr(S,esp) ((S)->errStatusPtr = (esp))
245 #define rtsiSetErrorStatus(S,es) (*((S)->errStatusPtr) = (es))
246 #define rtsiGetErrorStatus(S) *((S)->errStatusPtr)
248 #define rtsiSetModelMethodsPtr(S,mmp) ((S)->modelMethodsPtr = (mmp))
249 #define rtsiGetModelMethodsPtr(S) (S)->modelMethodsPtr
251 #define rtsiSetSolverComputingJacobian(S,val) ((S)->isComputingJacobian = (val))
252 #define rtsiIsSolverComputingJacobian(S) (S)->isComputingJacobian
254 #define rtsiSetSolverOutputComputed(S,val) ((S)->isOutputMethodComputed = (val))
255 #define rtsiIsSolverOutputComputed(S) (S)->isOutputMethodComputed
ssMatrixType
Definition: rtw_continuous.h:21
SimTimeStep
Definition: rtw_continuous.h:35
SolverMode
Definition: rtw_continuous.h:28
ssSolverInfo RTWSolverInfo
Definition: rtw_solver.h:123
SL_SolverToleranceControlFlag_T
Definition: rtw_solver.h:24
@ SL_SOLVER_TOLERANCE_AUTO
Definition: rtw_solver.h:25
@ SL_SOLVER_TOLERANCE_LOCAL
Definition: rtw_solver.h:26
@ SL_SOLVER_TOLERANCE_GLOBAL
Definition: rtw_solver.h:27
@ SL_SOLVER_TOLERANCE_UNDEFINED
Definition: rtw_solver.h:28
struct _ssSolverInfo_tag ssSolverInfo
slJmBdControl
Definition: rtw_solver.h:35
@ SL_JM_BD_SPARSE_PERTURBATION
Definition: rtw_solver.h:37
@ SL_JM_BD_AUTO
Definition: rtw_solver.h:36
@ SL_JM_BD_FULL_PERTURBATION
Definition: rtw_solver.h:38
@ SL_JM_BD_SPARSE_ANALYTICAL
Definition: rtw_solver.h:39
@ SL_JM_BD_FULL_ANALYTICAL
Definition: rtw_solver.h:40
char char_T
Definition: rtwtypes.h:71
unsigned char uint8_T
Definition: rtwtypes.h:50
double real_T
Definition: rtwtypes.h:64
unsigned char boolean_T
Definition: rtwtypes.h:66
double time_T
Definition: rtwtypes.h:65
int int_T
Definition: rtwtypes.h:67
Definition: rtw_continuous.h:62
Definition: rtw_solver.h:44
boolean_T isAtLeftPostOfContZcEvent
Definition: rtw_solver.h:91
uint8_T * zcSignalAttrib
Definition: rtw_solver.h:86
uint8_T * zcEventsVector
Definition: rtw_solver.h:85
uint8_T * reserved
Definition: rtw_solver.h:88
boolean_T consistencyChecking
Definition: rtw_solver.h:100
boolean_T robustResetMethod
Definition: rtw_solver.h:98
real_T unused_real_T_1
Definition: rtw_solver.h:72
boolean_T isComputingJacobian
Definition: rtw_solver.h:115
int_T maxNumMinSteps
Definition: rtw_solver.h:62
boolean_T isOutputMethodComputed
Definition: rtw_solver.h:119
real_T * massMatrixPr
Definition: rtw_solver.h:106
SimTimeStep * simTimeStepPtr
Definition: rtw_solver.h:47
int_T zeroCrossAlgorithm
Definition: rtw_solver.h:112
int_T zcSignalVectorLength
Definition: rtw_solver.h:87
int_T maskedZcDiagnostic
Definition: rtw_solver.h:118
time_T maxStepSize
Definition: rtw_solver.h:57
ssMatrixType massMatrixType
Definition: rtw_solver.h:102
slJmBdControl solverJacobianMethodControl
Definition: rtw_solver.h:116
int_T solverRefineFactor
Definition: rtw_solver.h:70
time_T fixedStepSize
Definition: rtw_solver.h:58
boolean_T foundContZcEvents
Definition: rtw_solver.h:90
int_T solverShapePreserveControl
Definition: rtw_solver.h:60
real_T * zcSignalVector
Definition: rtw_solver.h:84
boolean_T isAtRightPostOfContZcEvent
Definition: rtw_solver.h:92
real_T ** dXPtr
Definition: rtw_solver.h:74
int_T solverExtrapolationOrder
Definition: rtw_solver.h:67
time_T minStepSize
Definition: rtw_solver.h:56
const char_T * solverName
Definition: rtw_solver.h:49
RTWRTModelMethodsInfo * modelMethodsPtr
Definition: rtw_solver.h:110
time_T ** tPtr
Definition: rtw_solver.h:75
time_T * stepSizePtr
Definition: rtw_solver.h:55
real_T zcThreshold
Definition: rtw_solver.h:111
int_T * massMatrixJc
Definition: rtw_solver.h:105
boolean_T stateProjection
Definition: rtw_solver.h:97
void * rtModelPtr
Definition: rtw_solver.h:45
int_T * numPeriodicContStatesPtr
Definition: rtw_solver.h:80
boolean_T solverNeedsReset
Definition: rtw_solver.h:51
int_T * numContStatesPtr
Definition: rtw_solver.h:77
int_T solverMaxConsecutiveZCs
Definition: rtw_solver.h:65
boolean_T adaptiveZcDetection
Definition: rtw_solver.h:93
int_T consecutiveZCsError
Definition: rtw_solver.h:113
real_T solverConsecutiveZCsStepRelTol
Definition: rtw_solver.h:64
time_T solverStopTime
Definition: rtw_solver.h:54
int_T massMatrixNzMax
Definition: rtw_solver.h:103
int_T solverNumberNewtonIterations
Definition: rtw_solver.h:68
int_T ** periodicContStateIndicesPtr
Definition: rtw_solver.h:81
real_T solverRelTol
Definition: rtw_solver.h:71
boolean_T CTOutputIncnstWithState
Definition: rtw_solver.h:114
int_T numZcSignals
Definition: rtw_solver.h:95
real_T ** contStatesPtr
Definition: rtw_solver.h:78
boolean_T updateJacobianAtReset
Definition: rtw_solver.h:99
boolean_T isVariableStepSolver
Definition: rtw_solver.h:50
int_T solverMaxOrder
Definition: rtw_solver.h:63
int_T ignoredZcDiagnostic
Definition: rtw_solver.h:117
const char_T ** errStatusPtr
Definition: rtw_solver.h:108
real_T ** periodicContStateRangesPtr
Definition: rtw_solver.h:82
SolverMode solverMode
Definition: rtw_solver.h:52
int_T * massMatrixIr
Definition: rtw_solver.h:104
int_T solverMaxConsecutiveMinStep
Definition: rtw_solver.h:61
void * solverData
Definition: rtw_solver.h:48