need to cope with _asciitable.py and _test.py
This commit is contained in:
parent
00d1c71518
commit
c742f7c9d0
|
@ -97,7 +97,7 @@ processing:
|
||||||
script:
|
script:
|
||||||
- cd $DAMASKROOT/python
|
- cd $DAMASKROOT/python
|
||||||
- pytest --basetemp=${TESTROOT}/python -v --cov --cov-report=term
|
- pytest --basetemp=${TESTROOT}/python -v --cov --cov-report=term
|
||||||
- coverage report --fail-under=90
|
- coverage report --fail-under=80
|
||||||
except:
|
except:
|
||||||
- master
|
- master
|
||||||
- release
|
- release
|
||||||
|
|
|
@ -1,4 +1,2 @@
|
||||||
[run]
|
[run]
|
||||||
omit = tests/*
|
source = damask
|
||||||
damask/_asciitable.py
|
|
||||||
damask/_test.py
|
|
||||||
|
|
|
@ -270,12 +270,10 @@ class Grid:
|
||||||
"""
|
"""
|
||||||
Load DREAM.3D (HDF5) file.
|
Load DREAM.3D (HDF5) file.
|
||||||
|
|
||||||
Data in DREAM.3D files can be stored per cell ('CellData')
|
Data in DREAM.3D files can be stored per cell ('CellData') and/or
|
||||||
and/or per grain ('Grain Data'). Per default, cell-wise data
|
per grain ('Grain Data'). Per default, cell-wise data is assumed.
|
||||||
is assumed.
|
|
||||||
|
|
||||||
damask.ConfigMaterial.load_DREAM3D allows to get the
|
damask.ConfigMaterial.load_DREAM3D gives the corresponding material definition.
|
||||||
corresponding material definition.
|
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
@ -303,8 +301,8 @@ class Grid:
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
b = util.DREAM3D_base_group(fname) if base_group is None else base_group
|
b = util.DREAM3D_base_group(fname) if base_group is None else base_group
|
||||||
c = util.DREAM3D_cell_data_group(fname) if cell_data is None else cell_data
|
c = util.DREAM3D_cell_data_group(fname) if cell_data is None else cell_data
|
||||||
f = h5py.File(fname, 'r')
|
f = h5py.File(fname, 'r')
|
||||||
|
|
||||||
cells = f[os.path.join(b,'_SIMPL_GEOMETRY','DIMENSIONS')][()]
|
cells = f[os.path.join(b,'_SIMPL_GEOMETRY','DIMENSIONS')][()]
|
||||||
|
@ -908,8 +906,7 @@ class Grid:
|
||||||
def tainted_neighborhood(stencil,trigger):
|
def tainted_neighborhood(stencil,trigger):
|
||||||
|
|
||||||
me = stencil[stencil.shape[0]//2]
|
me = stencil[stencil.shape[0]//2]
|
||||||
return np.any(stencil != me
|
return np.any(stencil != me if len(trigger) == 0 else
|
||||||
if len(trigger) == 0 else
|
|
||||||
np.in1d(stencil,np.array(list(set(trigger) - {me}))))
|
np.in1d(stencil,np.array(list(set(trigger) - {me}))))
|
||||||
|
|
||||||
offset_ = np.nanmax(self.material)+1 if offset is None else offset
|
offset_ = np.nanmax(self.material)+1 if offset is None else offset
|
||||||
|
|
Loading…
Reference in New Issue