fixed typo
This commit is contained in:
parent
9193085913
commit
c4baca0cb6
|
@ -1993,7 +1993,7 @@ class Result:
|
||||||
phase_ID_array[at_cell_ph[c][label]] = count + 1
|
phase_ID_array[at_cell_ph[c][label]] = count + 1
|
||||||
|
|
||||||
job_file_no_ext = self.fname.stem
|
job_file_no_ext = self.fname.stem
|
||||||
o = h5py.File(f'{dream_dir}/{job_file_no_ext}_{inc}.dream3D','w')
|
o = h5py.File(f'{dream_dir}/{job_file_no_ext}_{inc}.dream3d','w')
|
||||||
o.attrs['DADF5toDREAM3D'] = '1.0'
|
o.attrs['DADF5toDREAM3D'] = '1.0'
|
||||||
o.attrs['FileVersion'] = '7.0'
|
o.attrs['FileVersion'] = '7.0'
|
||||||
|
|
||||||
|
@ -2009,14 +2009,14 @@ class Result:
|
||||||
|
|
||||||
# Data eulers
|
# Data eulers
|
||||||
orientation_data = cell_orientation_array.astype(np.float32)
|
orientation_data = cell_orientation_array.astype(np.float32)
|
||||||
o[cell_data_label + '/EulersAngles'] = orientation_data.reshape(tuple(np.flip(self.cells))+(3,))
|
o[cell_data_label + '/EulerAngles'] = orientation_data.reshape(tuple(np.flip(self.cells))+(3,))
|
||||||
|
|
||||||
# Attributes to CellData group
|
# Attributes to CellData group
|
||||||
o[cell_data_label].attrs['AttributeMatrixType'] = np.array([3],np.uint32)
|
o[cell_data_label].attrs['AttributeMatrixType'] = np.array([3],np.uint32)
|
||||||
o[cell_data_label].attrs['TupleDimensions'] = np.array(self.cells,np.uint64)
|
o[cell_data_label].attrs['TupleDimensions'] = np.array(self.cells,np.uint64)
|
||||||
|
|
||||||
# Common Attributes for groups in CellData
|
# Common Attributes for groups in CellData
|
||||||
for dataset in ['/Phases','/Eulers']:
|
for dataset in ['/Phases','/EulerAngles']:
|
||||||
o[cell_data_label + dataset].attrs['DataArrayVersion'] = np.array([2],np.int32)
|
o[cell_data_label + dataset].attrs['DataArrayVersion'] = np.array([2],np.int32)
|
||||||
o[cell_data_label + dataset].attrs['Tuple Axis Dimensions'] = 'x={},y={},z={}'.format(*np.array(self.cells))
|
o[cell_data_label + dataset].attrs['Tuple Axis Dimensions'] = 'x={},y={},z={}'.format(*np.array(self.cells))
|
||||||
|
|
||||||
|
@ -2026,9 +2026,9 @@ class Result:
|
||||||
o[cell_data_label + '/Phases'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64)
|
o[cell_data_label + '/Phases'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64)
|
||||||
|
|
||||||
# Eulers attributes
|
# Eulers attributes
|
||||||
o[cell_data_label + '/Eulers'].attrs['ComponentDimensions'] = np.array([3],np.uint64)
|
o[cell_data_label + '/EulerAngles'].attrs['ComponentDimensions'] = np.array([3],np.uint64)
|
||||||
o[cell_data_label + '/Eulers'].attrs['ObjectType'] = 'DataArray<float>'
|
o[cell_data_label + '/EulerAngles'].attrs['ObjectType'] = 'DataArray<float>'
|
||||||
o[cell_data_label + '/Eulers'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64)
|
o[cell_data_label + '/EulerAngles'].attrs['TupleDimensions'] = np.array(self.cells,np.uint64)
|
||||||
|
|
||||||
# Create EnsembleAttributeMatrix
|
# Create EnsembleAttributeMatrix
|
||||||
ensemble_label = data_container_label + '/CellEnsembleData'
|
ensemble_label = data_container_label + '/CellEnsembleData'
|
||||||
|
|
|
@ -439,9 +439,9 @@ class TestResult:
|
||||||
result = Result(ref_path/fname).view(increments=0) #comparing the initial data only
|
result = Result(ref_path/fname).view(increments=0) #comparing the initial data only
|
||||||
result.export_VTK(target_dir=tmp_path)
|
result.export_VTK(target_dir=tmp_path)
|
||||||
|
|
||||||
ref_file = h5py.File(ref_path/'2phase_irregularGrid.dream3D','r')
|
ref_file = h5py.File(ref_path/'2phase_irregularGrid.dream3d','r')
|
||||||
job_file_no_ext = result.fname.stem
|
job_file_no_ext = result.fname.stem
|
||||||
results_file = h5py.File(tmp_path/f'{job_file_no_ext}_increment_0.dream3D','r')
|
results_file = h5py.File(tmp_path/f'{job_file_no_ext}_increment_0.dream3d','r')
|
||||||
|
|
||||||
error_messages = []
|
error_messages = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue