avoid DAMASK_grid version dependency

This commit is contained in:
Martin Diehl 2021-08-18 10:09:47 +02:00
parent 81bac268f7
commit 4a5e5d8451
7 changed files with 13 additions and 17 deletions

View File

@ -1 +1 @@
d5db0be324a959f00245e42704ea2d6f
a40baead936c79dd4f86f84ad858b9fa

View File

@ -1 +1 @@
fe9ddaf54ac1fb785094251d29fcdc9c
eb506713032481aebf870b965eaca8b5

View File

@ -1 +1 @@
9c8ac0bb1eb4a7b9ebc3e5fd5840b0a4
61953c35f61f3234b98d78a912e7dc83

View File

@ -1 +1 @@
1b9ebd17c5257e2edba48d006f25d4e6
4f85d2613aa70622a2d5f49dc8bf2eb2

View File

@ -1 +1 @@
8967bb1a6c329a072baaa83da534ae56
e1ca5306082fc3ab411f5ddab1a2e370

View File

@ -1 +1 @@
752e8b6186ad2b6b1b5c781940669cb1
1641c3b3641e942ffc325d471bdfaf00

View File

@ -13,6 +13,7 @@ import numpy as np
from damask import Result
from damask import Orientation
from damask import VTK
from damask import tensor
from damask import mechanics
from damask import grid_filters
@ -370,18 +371,13 @@ class TestResult:
def test_vtk(self,request,tmp_path,ref_path,update,patch_execution_stamp,patch_datetime_now,output,fname,inc):
result = Result(ref_path/fname).view('increments',inc)
os.chdir(tmp_path)
result.export_VTK(output)
result.export_VTK(output,parallel=False)
fname = fname.split('.')[0]+f'_inc{(inc if type(inc) == int else inc[0]):0>2}.vti'
last = ''
for i in range(10):
if os.path.isfile(tmp_path/fname):
v = VTK.load(tmp_path/fname)
v.set_comments('n/a')
v.save(tmp_path/fname,parallel=False)
with open(fname) as f:
cur = hashlib.md5(f.read().encode()).hexdigest()
if cur == last:
break
else:
last = cur
time.sleep(.5)
if update:
with open((ref_path/'export_VTK'/request.node.name).with_suffix('.md5'),'w') as f:
f.write(cur)