also use newer regex
This commit is contained in:
parent
4469f2f8f0
commit
3c42368f66
|
@ -927,8 +927,8 @@ class DADF5():
|
||||||
shape = [array.shape[0],np.product(array.shape[1:])]
|
shape = [array.shape[0],np.product(array.shape[1:])]
|
||||||
vtk_data.append(numpy_support.numpy_to_vtk(num_array=array.reshape(shape),
|
vtk_data.append(numpy_support.numpy_to_vtk(num_array=array.reshape(shape),
|
||||||
deep=True,array_type= vtk.VTK_DOUBLE))
|
deep=True,array_type= vtk.VTK_DOUBLE))
|
||||||
ph_name = re.compile(r'(\/[1-9])_([A-Z][a-z]*)_(([a-z]*)|([A-Z]*))') #looking for phase name in dataset name
|
ph_name = re.compile(r'(?<=(constituent\/))(.*?)(?=(generic))') # identify phase name
|
||||||
dset_name = '1_' + re.sub(ph_name,r'',x[0].split('/',1)[1]) #removing phase name from generic dataset
|
dset_name = '1_' + re.sub(ph_name,r'',x[0].split('/',1)[1]) # removing phase name
|
||||||
vtk_data[-1].SetName(dset_name)
|
vtk_data[-1].SetName(dset_name)
|
||||||
vtk_geom.GetCellData().AddArray(vtk_data[-1])
|
vtk_geom.GetCellData().AddArray(vtk_data[-1])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue