HyperTreeGridSource does not support masking coarse cells
The following snippet fails with the error vtkHyperTreeGridSource: A refined branch must contain material.
vtkNew<vtkHyperTreeGridSource> htGrid;
int maxLevel = 5;
htGrid->SetMaxDepth(maxLevel);
htGrid->SetDimensions(4, 4, 3); // Dimension 3 GridCell 3, 3, 2
htGrid->SetGridScale(1.5, 1., .7);
htGrid->SetBranchFactor(2);
htGrid->SetDescriptor(
"RRR .R. .RR ..R ..R .R.|R....... ........ ........ ...R.... .RRRR.R. RRRRR.RR ........ "
"........ ........|........ ........ ........ RR.RR.RR ........ RR...... ........ ........ "
"........ ........ ........ ........ ........ ..RRR...|........ ..R..... ........ ........ "
"........ ........ ........ ........ ........ ........ ........|........");
htGrid->SetMask(
"111 111 111 110 111 111|11111111 11111111 11111111 11111111 11111111 11111111 11111111 "
"11111111 11111111|11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 "
"11111111 11111111 11111111 11111111 11111111 11111111|11111111 11111111 11111111 11111111 "
"11111111 11111111 11111111 11111111 11111111 11111111 11111111|11111111");
Per HyperTreeGridSource, a refined branch must contain material. However, with the material mask and bit mask now merged, this check does not make sense anymore. We should be able to mask refined cells as any other, but the filter prevents this behavior.