mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
added script to convert precision of result checking
This commit is contained in:
parent
f22adabf15
commit
d07594b831
1 changed files with 23 additions and 0 deletions
23
tests/convert_precision.py
Executable file
23
tests/convert_precision.py
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh env python
|
||||
|
||||
import os
|
||||
import glob
|
||||
|
||||
dirs = glob.glob('test_*')
|
||||
|
||||
for adir in dirs:
|
||||
|
||||
os.chdir(adir)
|
||||
|
||||
files = glob.glob('results.py')
|
||||
|
||||
if len(files) > 0:
|
||||
|
||||
files = files[0]
|
||||
with open(files,'r') as fh:
|
||||
intxt = fh.read()
|
||||
intxt = intxt.replace('14.8E','12.6E')
|
||||
with open(files,'w') as fh:
|
||||
fh.write(intxt)
|
||||
|
||||
os.chdir('..')
|
||||
Loading…
Add table
Add a link
Reference in a new issue