docs: Claude design-state record and Greif v5 census tools
Consolidated MeltMind design decisions, S1 result review and Drive index; stdlib-only ZIP range-read census (624 logs) with SHA256SUMS. Review material only; not for main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ebad883f58
commit
628a10bad3
11 files changed
+889
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import sys,os,struct,zlib,re,statistics as st,collections
|
||||
d=sys.argv[1]; rows=[]
|
||||
for f in sorted(os.listdir(d)):
|
||||
b=open(os.path.join(d,f),'rb').read()
|
||||
if b[:4]!=b'PK\x03\x04': rows.append((f,None));continue
|
||||
nl,el=struct.unpack('<HH',b[26:30])
|
||||
try: t=zlib.decompressobj(-15).decompress(b[30+nl+el:]).decode('latin1')
|
||||
except Exception as e: rows.append((f,None));continue
|
||||
g=lambda pat:(lambda m: m.group(1) if m else None)(re.search(pat,t))
|
||||
rows.append((f,dict(nodes=g(r'Total number of part nodes\s*=\s*(\d+)'),elems=g(r'Total number of elements\s*=\s*(\d+)'),
|
||||
melt=g(r'Melt temperature\s*=\s*([\d.]+)'),mold=g(r'Mold temperature\s*=\s*([\d.]+)'),
|
||||
fill=g(r'Filling control type\s*=\s*(\S+)'),vp=g(r'Volume filled at velocity/pressure switch-over\s*=\s*([\d.]+)'),
|
||||
pvp=g(r'Injection pressure at velocity/pressure switch-over\s*=\s*([\dE.+-]+)'),
|
||||
short=bool(re.search(r'short shot|did not fill|not completely filled',t,re.I)),
|
||||
mesh=g(r'Mesh Type\s*=\s*(.+)'), vol=g(r'Volume of tetrahedral elements\s*=\s*([\dE.+-]+)'))))
|
||||
bad=[r for r in rows if r[1] is None]; ok=[r[1] for r in rows if r[1]]
|
||||
print('ok',len(ok),'bad',len(bad))
|
||||
def s(k,fn=float):
|
||||
v=sorted(fn(x[k]) for x in ok if x[k]);
|
||||
q=lambda p:v[int(p*(len(v)-1))]
|
||||
print(k,'n',len(v),'min',v[0],'p10',q(.1),'med',q(.5),'p90',q(.9),'max',v[-1],'sum',sum(v))
|
||||
for k in ['nodes','elems','vp','pvp','vol']: s(k)
|
||||
for k in ['melt','mold','fill','mesh','short']: print(k,collections.Counter(x[k] for x in ok).most_common(5))
|
||||
Reference in new issue
Block a user