including restart information

needed updated tests after generating new HDF5 file
This commit is contained in:
Martin Diehl 2022-11-09 22:14:09 +01:00
parent b2db825fca
commit 75cf446654
33 changed files with 32 additions and 9 deletions

Binary file not shown.

View File

@ -0,0 +1 @@
85ce65348539cc823f103a29e3e237f0

View File

@ -0,0 +1 @@
27972d6a0955e4e6e27a6ac5762abda8

View File

@ -0,0 +1 @@
3971cf9ac0a9598d3171c049ebb213f3

View File

@ -0,0 +1 @@
e7d52ecf304e56e6ef81702b5a5845f3

View File

@ -0,0 +1 @@
dd71d25ccb52c3fdfd2ab727fc852a98

View File

@ -0,0 +1 @@
17dfe701be0c3a5e1a29d7a2b49c3afe

View File

@ -0,0 +1 @@
ff8883bb1d5c3de706e7c69bc67a366d

View File

@ -1 +0,0 @@
a40baead936c79dd4f86f84ad858b9fa

View File

@ -1 +0,0 @@
6fb37bd65934de859dd6b6e0191e7d64

View File

@ -1 +0,0 @@
61953c35f61f3234b98d78a912e7dc83

View File

@ -1 +0,0 @@
bb783bb80ff04dd435e814f4b82a3234

View File

@ -1 +0,0 @@
e1ca5306082fc3ab411f5ddab1a2e370

View File

@ -1 +0,0 @@
1641c3b3641e942ffc325d471bdfaf00

View File

@ -1 +0,0 @@
ba97286c5d95bf817143f7bb9cf58421

View File

@ -0,0 +1 @@
12grains6x7x8.material.yaml

View File

@ -0,0 +1,18 @@
---
solver:
mechanical: spectral_basic
loadstep:
- boundary_conditions:
mechanical:
dot_F: [[x, 0, 0],
[0, 1.0e-3, 0],
[0, 0, x]]
P: [[0, x, x],
[x, x, x],
[x, x, 0]]
discretization:
t: 10
N: 20
f_out: 4
f_restart: 20

View File

@ -378,7 +378,7 @@ class TestResult:
@pytest.mark.parametrize('fname',['12grains6x7x8_tensionY.hdf5'],ids=range(1)) @pytest.mark.parametrize('fname',['12grains6x7x8_tensionY.hdf5'],ids=range(1))
@pytest.mark.parametrize('inc',[4,0],ids=range(2)) @pytest.mark.parametrize('inc',[4,0],ids=range(2))
@pytest.mark.xfail(int(vtk.vtkVersion.GetVTKVersion().split('.')[0])<9, reason='missing "Direction" attribute') @pytest.mark.xfail(int(vtk.vtkVersion.GetVTKVersion().split('.')[0])<9, reason='missing "Direction" attribute')
def test_vtk(self,request,tmp_path,ref_path,update,patch_execution_stamp,patch_datetime_now,output,fname,inc): def test_export_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) result = Result(ref_path/fname).view(increments=inc)
result.export_VTK(output,target_dir=tmp_path,parallel=False) result.export_VTK(output,target_dir=tmp_path,parallel=False)
fname = fname.split('.')[0]+f'_inc{(inc if type(inc) == int else inc[0]):0>2}.vti' fname = fname.split('.')[0]+f'_inc{(inc if type(inc) == int else inc[0]):0>2}.vti'
@ -395,7 +395,7 @@ class TestResult:
@pytest.mark.parametrize('mode',['point','cell']) @pytest.mark.parametrize('mode',['point','cell'])
@pytest.mark.parametrize('output',[False,True]) @pytest.mark.parametrize('output',[False,True])
def test_vtk_marc(self,tmp_path,ref_path,mode,output): def test_export_vtk_marc(self,tmp_path,ref_path,mode,output):
os.chdir(tmp_path) os.chdir(tmp_path)
result = Result(ref_path/'check_compile_job1.hdf5') result = Result(ref_path/'check_compile_job1.hdf5')
result.export_VTK(output,mode) result.export_VTK(output,mode)
@ -552,6 +552,10 @@ class TestResult:
assert f_hdf5[f'setup/{file}'][()][0].decode() == f.read() assert f_hdf5[f'setup/{file}'][()][0].decode() == f.read()
r.export_simulation_setup(output,target_dir=tmp_path,overwrite=overwrite) r.export_simulation_setup(output,target_dir=tmp_path,overwrite=overwrite)
def test_export_simulation_setup_restart(self,default,tmp_path):
default.export_simulation_setup(target_dir=tmp_path)
assert (tmp_path/'previous').is_dir()
def test_export_simulation_setup_custom_path(self,ref_path,tmp_path): def test_export_simulation_setup_custom_path(self,ref_path,tmp_path):
src = ref_path/'4grains2x4x3_compressionY.hdf5' src = ref_path/'4grains2x4x3_compressionY.hdf5'
subdir = 'export_dir' subdir = 'export_dir'