优化雅可比矩阵计算;端口转发情况下仿真结果传输方式优化
This commit is contained in:
1 parent
3bc4be3c06
commit
aa4951b14e
28 files changed
+8038
-23
No files matched your search
@@ -54,6 +54,19 @@ int native_rhs(NativeRun *r, double t, const double *y, double *dy) {
|
||||
return model_eval(t,y,dy,w);
|
||||
}
|
||||
|
||||
/* Derivative probes use deterministic property evaluation: the generated
|
||||
* Jacobian entry point omits cross-storage cache seeds, while the ordinary RHS
|
||||
* retains all existing physical expressions and state-property reuse. */
|
||||
int native_jacobian_rhs(NativeRun *r, double t, const double *y, double *dy) {
|
||||
#if defined(MODEL_JACOBIAN_CANONICAL_RHS) && MODEL_JACOBIAN_CANONICAL_RHS
|
||||
double w[NOUTPUTS];
|
||||
r->nfev++;
|
||||
return model_eval_jacobian(t,y,dy,w);
|
||||
#else
|
||||
return native_rhs(r,t,y,dy);
|
||||
#endif
|
||||
}
|
||||
|
||||
int native_append(NativeRun *r, double t, const double *y) {
|
||||
r->final_time=t; memcpy(r->final_state,y,NSTATES*sizeof(double));
|
||||
if (!r->options.record_samples) return 1;
|
||||
|
||||
Reference in new issue
Block a user