-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Milestone
Description
For PFLOTRAN datasets, the MATERIAL_ID array has int32 values indicating the type of cell. Type 0 indicates an inactive cell that should not be visible. We used some custom/hard-coded logic awhile ago to implement this with a ghost cell array, and would like to add some generalized version of this to Pan3D.
Note that, for pflotran, we also had to transpose the blanking array.
if ADD_BLANKING_ARRAY:
import numpy as np
def blank_cell(mat_id):
return 32 if mat_id < 1 else 0
vblank_cell = np.vectorize(blank_cell, otypes=[np.uint8])
# We are presuming blanking doesn't change w/time
da_mat = ds['Material_ID'][0]
np_blank = vblank_cell(da_mat).transpose().flatten() # MUST TRANSPOSE
grid.cell_data.set_array(np_blank, 'vtkGhostType')
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists