Merge branch '249-mark-dadf5-file-format-as-stable' into 'development'
DADF5 v1.0 Closes #249 See merge request damask/DAMASK!715
This commit is contained in:
commit
430084cf35
|
@ -106,7 +106,7 @@ class Result:
|
|||
self.version_major = f.attrs['DADF5_version_major']
|
||||
self.version_minor = f.attrs['DADF5_version_minor']
|
||||
|
||||
if self.version_major != 0 or not 12 <= self.version_minor <= 14:
|
||||
if (self.version_major != 0 or not 12 <= self.version_minor <= 14) and self.version_major != 1:
|
||||
raise TypeError(f'unsupported DADF5 version "{self.version_major}.{self.version_minor}"')
|
||||
if self.version_major == 0 and self.version_minor < 14:
|
||||
self.export_simulation_setup = None # type: ignore
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -26,7 +26,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_0/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_0/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -177,7 +177,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_4/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_4/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -328,7 +328,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_8/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_8/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -479,7 +479,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_12/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_12/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -630,7 +630,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_16/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_16/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -781,7 +781,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_20/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_20/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -932,7 +932,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_24/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_24/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -1083,7 +1083,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_28/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_28/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -1234,7 +1234,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_32/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_32/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -1385,7 +1385,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_36/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_36/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
@ -1536,7 +1536,7 @@
|
|||
<Attribute Name="phase/mechanical/L_p / 1/s" Center="Cell" AttributeType="Tensor">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 9">6grains6x7x8_single_phase_tensionY.hdf5:increment_40/phase/pheno_fcc/mechanical/L_p</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/O / q_0 (q_1 q_2 q_3)" Center="Cell" AttributeType="Matrix">
|
||||
<Attribute Name="phase/mechanical/O / 1" Center="Cell" AttributeType="Matrix">
|
||||
<DataItem Format="HDF" NumberType="Float" Precision="8" Dimensions="8 7 6 4">6grains6x7x8_single_phase_tensionY.hdf5:increment_40/phase/pheno_fcc/mechanical/O</DataItem>
|
||||
</Attribute>
|
||||
<Attribute Name="phase/mechanical/P / Pa" Center="Cell" AttributeType="Tensor">
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
27972d6a0955e4e6e27a6ac5762abda8
|
||||
c7280da4e7cb4d993b9d26d0285cf85e
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
b1d4ed9f72a7a2a261ca4c8c7ce3ecca
|
|
@ -0,0 +1 @@
|
|||
fa58dc50516d0e31c7b84ea06728c477
|
|
@ -0,0 +1 @@
|
|||
db4278b2b1a3cd854595dd62eeef7ac4
|
|
@ -0,0 +1 @@
|
|||
e8fe1c752a781f31bd5edd79976c58d9
|
|
@ -0,0 +1 @@
|
|||
33475f722f1e39e0952cc121e6e0a59f
|
|
@ -0,0 +1 @@
|
|||
72f7ff57a40b26f1f39511259e4dbbfc
|
|
@ -0,0 +1 @@
|
|||
0861eb141de14a929e4f32aa87bba99f
|
|
@ -0,0 +1 @@
|
|||
3189b1a625401dc9fd9209e55192cab2
|
|
@ -1 +1 @@
|
|||
dd71d25ccb52c3fdfd2ab727fc852a98
|
||||
53598d0052bf9ddfdf6d755cd375e015
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
472e040094eaed7cceb6cdcc82a08e8f
|
|
@ -0,0 +1 @@
|
|||
83c0accce11142b5b0b6be7ee56c0d5a
|
|
@ -0,0 +1 @@
|
|||
06de227b18a955cb5b2ea325b4e22fc6
|
|
@ -0,0 +1 @@
|
|||
ed793b6089fda37453731d5f820581bd
|
|
@ -0,0 +1 @@
|
|||
4f85d2613aa70622a2d5f49dc8bf2eb2
|
|
@ -0,0 +1 @@
|
|||
0aca2c9895589569da20459e64ff58a2
|
|
@ -0,0 +1 @@
|
|||
878d7ae32630ec6651fffe7e1b91048d
|
|
@ -0,0 +1 @@
|
|||
9c5b55db21eec2ea0b1c784684b746b6
|
|
@ -385,7 +385,9 @@ class TestResult:
|
|||
assert np.allclose(a,b)
|
||||
|
||||
@pytest.mark.parametrize('output',['F','*',['P'],['P','F']],ids=range(4))
|
||||
@pytest.mark.parametrize('fname',['12grains6x7x8_tensionY.hdf5'],ids=range(1))
|
||||
@pytest.mark.parametrize('fname',['12grains6x7x8_tensionY.hdf5',
|
||||
'4grains2x4x3_compressionY.hdf5',
|
||||
'6grains6x7x8_single_phase_tensionY.hdf5'],ids=range(3))
|
||||
@pytest.mark.parametrize('inc',[4,0],ids=range(2))
|
||||
@pytest.mark.xfail(int(vtk.vtkVersion.GetVTKVersion().split('.')[0])<9, reason='missing "Direction" attribute')
|
||||
def test_export_vtk(self,request,tmp_path,ref_path,update,patch_execution_stamp,patch_datetime_now,output,fname,inc):
|
||||
|
@ -395,8 +397,8 @@ class TestResult:
|
|||
v = VTK.load(tmp_path/fname)
|
||||
v.comments = ['n/a']
|
||||
v.save(tmp_path/fname,parallel=False)
|
||||
with open(tmp_path/fname) as f:
|
||||
cur = hashlib.md5(f.read().encode()).hexdigest()
|
||||
with open(tmp_path/fname,'rb') as f:
|
||||
cur = hashlib.md5(f.read()).hexdigest()
|
||||
if update:
|
||||
with open((ref_path/'export_VTK'/request.node.name).with_suffix('.md5'),'w') as f:
|
||||
f.write(cur+'\n')
|
||||
|
|
|
@ -115,11 +115,6 @@ subroutine grid_mechanical_spectral_basic_init()
|
|||
PetscInt, dimension(0:worldsize-1) :: localK
|
||||
real(pReal), dimension(3,3,product(cells(1:2))*cells3) :: temp33n
|
||||
integer(HID_T) :: fileHandle, groupHandle
|
||||
#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>14) && !defined(PETSC_HAVE_MPI_F90MODULE_VISIBILITY)
|
||||
type(MPI_File) :: fileUnit
|
||||
#else
|
||||
integer :: fileUnit
|
||||
#endif
|
||||
type(tDict), pointer :: &
|
||||
num_grid
|
||||
type(tList), pointer :: &
|
||||
|
|
|
@ -128,11 +128,6 @@ subroutine grid_mechanical_spectral_polarisation_init()
|
|||
PetscInt, dimension(0:worldsize-1) :: localK
|
||||
real(pReal), dimension(3,3,product(cells(1:2))*cells3) :: temp33n
|
||||
integer(HID_T) :: fileHandle, groupHandle
|
||||
#if (PETSC_VERSION_MAJOR==3 && PETSC_VERSION_MINOR>14) && !defined(PETSC_HAVE_MPI_F90MODULE_VISIBILITY)
|
||||
type(MPI_File) :: fileUnit
|
||||
#else
|
||||
integer :: fileUnit
|
||||
#endif
|
||||
type(tDict), pointer :: &
|
||||
num_grid
|
||||
type(tList), pointer :: &
|
||||
|
@ -140,6 +135,7 @@ subroutine grid_mechanical_spectral_polarisation_init()
|
|||
character(len=pStringLen) :: &
|
||||
extmsg = ''
|
||||
|
||||
|
||||
print'(/,1x,a)', '<<<+- grid_mechanical_spectral_polarization init -+>>>'; flush(IO_STDOUT)
|
||||
|
||||
print'(/,1x,a)', 'P. Shanthraj et al., International Journal of Plasticity 66:31–45, 2015'
|
||||
|
|
|
@ -83,8 +83,8 @@ subroutine result_init(restart)
|
|||
|
||||
if (.not. restart) then
|
||||
resultFile = HDF5_openFile(getSolverJobName()//'.hdf5','w')
|
||||
call result_addAttribute('DADF5_version_major',0)
|
||||
call result_addAttribute('DADF5_version_minor',14)
|
||||
call result_addAttribute('DADF5_version_major',1)
|
||||
call result_addAttribute('DADF5_version_minor',0)
|
||||
call get_command_argument(0,commandLine)
|
||||
call result_addAttribute('creator',trim(commandLine)//' '//DAMASKVERSION)
|
||||
call result_addAttribute('created',now())
|
||||
|
|
Loading…
Reference in New Issue