mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 14:40:26 -05:00
Simulation Input: reintroduce OPERNUM+OPERATER/BCCON+BCPROP.
Was incorrectly removed in the refactoring in c47e8ac76f
This commit is contained in:
1 parent
4df9bc49c8
commit
0626c2e199
4 files changed
+58
-12
No files matched your search
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RiaResultNames.h"
|
||||
#include "RigSimulationInputSettings.h"
|
||||
|
||||
#include "RifEclipseInputFileTools.h"
|
||||
@@ -56,7 +57,8 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::expected<void, QString> RigSimulationInputTool::exportSimulationInput( RimEclipseCase& eclipseCase,
|
||||
const RigSimulationInputSettings& settings )
|
||||
const RigSimulationInputSettings& settings,
|
||||
cvf::UByteArray* visibility )
|
||||
{
|
||||
// Load the deck file
|
||||
QString inputDeckFileName = settings.inputDeckFileName();
|
||||
@@ -77,6 +79,27 @@ std::expected<void, QString> RigSimulationInputTool::exportSimulationInput( RimE
|
||||
return result;
|
||||
}
|
||||
|
||||
// Generate BORDNUM result based on visibility
|
||||
if ( visibility && visibility->size() > 0 )
|
||||
{
|
||||
RigEclipseResultTools::generateBorderResult( &eclipseCase, visibility, RiaResultNames::bordnum() );
|
||||
if ( settings.boundaryCondition() == RigSimulationInputSettings::BoundaryCondition::BCCON_BCPROP )
|
||||
{
|
||||
// Generate BCCON result to assign values 1-6 based on which face of the box the border cells are on
|
||||
RigEclipseResultTools::generateBcconResult( &eclipseCase, settings.min(), settings.max() );
|
||||
}
|
||||
else if ( settings.boundaryCondition() == RigSimulationInputSettings::BoundaryCondition::OPERNUM_OPERATER )
|
||||
{
|
||||
// Generate OPERNUM result based on BORDNUM (border cells get max existing OPERNUM + 1)
|
||||
int operNumRegion = RigEclipseResultTools::generateOperNumResult( &eclipseCase );
|
||||
|
||||
if ( auto result = addOperNumRegionAndOperater( &eclipseCase, settings, deckFile, operNumRegion ); !result )
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( auto result = replaceKeywordValuesInDeckFile( &eclipseCase, settings, deckFile ); !result )
|
||||
{
|
||||
return result;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "cafVecIjk.h"
|
||||
#include "cvfArray.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <QString>
|
||||
@@ -48,7 +49,7 @@ class RigSimulationInputTool
|
||||
{
|
||||
public:
|
||||
static std::expected<void, QString>
|
||||
exportSimulationInput( RimEclipseCase& eclipseCase, const RigSimulationInputSettings& settings );
|
||||
exportSimulationInput( RimEclipseCase& eclipseCase, const RigSimulationInputSettings& settings, cvf::UByteArray* visibility );
|
||||
|
||||
static std::expected<Opm::DeckRecord, QString>
|
||||
processEqualsRecord( const Opm::DeckRecord& record, const caf::VecIjk0& min, const caf::VecIjk0& max, const cvf::Vec3st& refinement );
|
||||
|
||||
Reference in new issue
Block a user