相较上一版 Jacobian 确定性复用更新,本次补齐事件边界一致性、结果两侧采样及接触事件定位;保留已有物性复用和组件力学公式。 - 统一 UD00 信号求值与下一事件查询的绝对时间边界,修复循环边界浮点舍入导致的阶段错位、重复或漏报,并覆盖零时长、多阶段及长周期场景。 - 引入原生输出语义 v2:保留规则网格真实时间,补充内部时间事件和状态事件的左邻及事件后采样,按保存时间、状态和离散模式重放结果。 - 两条代码生成路径均发出 LSTP 接触描述,默认定位间隙过零及非负力模式的力截断;仅在接受事件时更新防重复记录,增加 contactEvents 诊断计数。 - 补充 MASS/LSTP 独立事件实验、八路全曲线与驱动阶段配对评估,以及 Amesim 不连续点输出对照和力差定位报告;MASS 新增释放机制仍保留为独立实验。 - 保存局部 probe、context 访问与回退、shadow replay、R288 real skip/typed replay 及阀门数值尾部诊断工具和报告;未证明净收益的实验不启用为生产默认优化。 - 更新原生运行说明和元件建模规范,补充信号边界、输出语义、接触事件和实验依赖回归测试。 验证:五组专项回归共 34 项全部通过;37 个待提交 Python 文件语法检查通过;git diff --cached --check 通过。
22 lines
1.2 KiB
C
22 lines
1.2 KiB
C
#ifndef CONTEXT_ACCESS_DIAG_H
|
|
#define CONTEXT_ACCESS_DIAG_H
|
|
#include "kernels.h"
|
|
#include <string.h>
|
|
/* GCC-only diagnostic worker: each expression is evaluated once. */
|
|
void ax_access(const char *,const void *,size_t,const char *,const char *);
|
|
void ax_bind(NativePropertyCache *,NativePipeCache *);
|
|
void ax_begin(unsigned long long,int,int,double,const double *,int);
|
|
void ax_end(const double *,int);
|
|
void ax_result(int);
|
|
void ax_finish(void);
|
|
void ax_query(const char *,const NativeMedium *,double,double);
|
|
void ax_match(const char *,NativePropertyState *);
|
|
void ax_new(NativePropertyCache *,NativePropertyState *,int);
|
|
unsigned ax_test(NativePropertyState *,unsigned,const char *);
|
|
void ax_scalar(const char *,NativeJacobianScalars *,int,int,const double *,size_t,int,const double *);
|
|
#define AX_R(x) ({ __typeof__(x) ax_v=(x); ax_access("read",&(x),sizeof(x),#x,__func__); ax_v; })
|
|
#define AX_W(x,v) do { (x)=(v); ax_access("write",&(x),sizeof(x),#x,__func__); } while(0)
|
|
#define AX_OR(x,v) do { (x)|=(v); ax_access("write",&(x),sizeof(x),#x,__func__); } while(0)
|
|
#define AX_INC(x) ({ __typeof__(x) ax_v=(x)++; ax_access("write",&(x),sizeof(x),#x,__func__); ax_v; })
|
|
#endif
|