opm-grid icon indicating copy to clipboard operation
opm-grid copied to clipboard

BuildFaceToCell Calling EntityRep::setValue() With Index of "-1"

Open bska opened this issue 4 years ago • 4 comments

I was debugging another issue when an assert triggered in EntityRep<>::setValue(). The direct cause of this assertion failure was function cpgrid::buildFaceToCell() calling setValue() with

other_cell = -1

There are a number of possibilities here

  1. The assertion is wrong and it's okay to call the function with a negative index (unlikely)
  2. The calling code in buildFaceToCell() needs a check for negative cell indices
  3. The pinch processing code is wrong since it generates a negative cell index

At the top of my head I don't know which is which here so I'd like to discuss the matter. For the record, this issue presented when running the VOLVE_2020 model.

bska avatar Jan 04 '21 08:01 bska

1 and 2 should not be needed. 3 seems not to be the case as actnum is checked for both above and below, when inserting. There are issues with some of the logic expressions, though.

Maybe the active cells are changed somewhere in between such that global_to_local[it->second]<0 despite actnum[it->second]>0?

blattms avatar Jan 04 '21 12:01 blattms