Skip to content

Allow `ReferenceElement::size(i,c,cc)` for `cc<c`

While subEntity(i,c,j,cc) is surely not allowed for cc<c because there's no viable j, there's no reason to not allow this case for size(i,c,cc). Actually the implementation works nicely in this case and returns the correct number size zero. Any grid-specific ReferenceElement implementation should simply return zero in this case.

Allowing this case gives the possibility to seamlessly test

for(int j=0; j < re.size(i,c,cc); ++j)
  foo(subEntity(i,c,j,cc));

for all 0<=c<=dim and 0<=cc<=dim.

Merge request reports

Loading