OPM / opm-models

The models module for the Open Porous Media Simulation (OPM) framework
Other
17 stars 69 forks source link

[bugfix] Do not try to save FLOWS or FLOWRES values for NNCs. #873

Closed blattms closed 7 months ago

blattms commented 7 months ago

If we would try that then we would index vectors with index -1 and possibly overwrite other system information. This was the case for some models resulting in cryptic errror " corrupted size vs. prev_size"

Now we simply do nothing for NNCs.

blattms commented 7 months ago

jenkins build this please

blattms commented 7 months ago

Of course our manual says that at least FLORES includes flow along NNCs. This was maybe true be chance before if we were lucky. It definitely is not true with this patch.

I still think we should merge this to prevent crashes. We might need to implement proper handling of NNCs, though.

It might even be that NNCs are handled separately in OPM/opm-simulators#4275, anyway. Is that the case @daavid00?

daavid00 commented 7 months ago

If I remember well, this used to work for NNCs (unfortunately we did not add any tests). In the applications I have been using FLOWS/FLORES lately, I do not have NNCs, so I have not face this use. If this currently leads to crashes, then I also think this should be merge and proper handle the NNCs.

atgeirr commented 7 months ago

I agree with the above, avoid the crash now, fix NNCs later.

totto82 commented 7 months ago

I did some refactoring when fixing parallel and adding boundary fluxes and forgot to test for NNC. I will provide a proper fix that output fluxes for NNCs. Note that this works for the release so the documentation should not change.