BCPROP: add correct number of times to properties table.

Also improved defaults.
This commit is contained in:
Kristian Bendiksen
2025-11-12 08:39:20 +01:00
parent b7a4983009
commit ba92dfb825
6 changed files with 100 additions and 59 deletions
@@ -527,12 +527,10 @@ Opm::DeckKeyword bcpropKeyword( const std::vector<RigEclipseResultTools::BorderC
// Add one entry per boundary condition
for ( const auto& bc : boundaryConditions )
{
if ( bc.boundaryCondition <= 0 ) continue; // Skip entries without a valid boundary condition
// Find the corresponding property record
// The properties vector should be indexed by boundaryCondition - 1
size_t propIndex = static_cast<size_t>( bc.boundaryCondition );
if ( propIndex < boundaryConditionProperties.size() )
int propIndex = bc.boundaryCondition - 1;
if ( propIndex >= 0 && propIndex < static_cast<int>( boundaryConditionProperties.size() ) )
{
const auto& propRecord = boundaryConditionProperties[propIndex];