Add support for PINCH item 4 and 5.

This commit is contained in:
Liu Ming
2015-10-09 10:29:33 +08:00
parent b67c183544
commit 7181255d6d
2 changed files with 26 additions and 4 deletions

View File

@@ -41,7 +41,9 @@ namespace Opm {
EclipseGrid::EclipseGrid(const std::string& filename )
: m_minpvValue(0),
m_minpvMode(MinpvMode::ModeEnum::Inactive),
m_pinch("PINCH")
m_pinch("PINCH"),
m_pinchoutMode("TOPBOT"),
m_multzMode("TOP")
{
ecl_grid_type * new_ptr = ecl_grid_load_case( filename.c_str() );
if (new_ptr)
@@ -57,7 +59,9 @@ namespace Opm {
EclipseGrid::EclipseGrid(const ecl_grid_type * src_ptr)
: m_minpvValue(0),
m_minpvMode(MinpvMode::ModeEnum::Inactive),
m_pinch("PINCH")
m_pinch("PINCH"),
m_pinchoutMode("TOPBOT"),
m_multzMode("TOP")
{
m_grid.reset( ecl_grid_alloc_copy( src_ptr ) , ecl_grid_free );
@@ -77,7 +81,9 @@ namespace Opm {
double dx, double dy, double dz)
: m_minpvValue(0),
m_minpvMode(MinpvMode::ModeEnum::Inactive),
m_pinch("PINCH")
m_pinch("PINCH"),
m_pinchoutMode("TOPBOT"),
m_multzMode("TOP")
{
m_nx = nx;
m_ny = ny;
@@ -102,7 +108,9 @@ namespace Opm {
EclipseGrid::EclipseGrid(std::shared_ptr<const Deck> deck)
: m_minpvValue(0),
m_minpvMode(MinpvMode::ModeEnum::Inactive),
m_pinch("PINCH")
m_pinch("PINCH"),
m_pinchoutMode("TOPBOT"),
m_multzMode("TOP")
{
const bool hasRUNSPEC = Section::hasRUNSPEC(deck);
const bool hasGRID = Section::hasGRID(deck);
@@ -164,6 +172,8 @@ namespace Opm {
auto record = deck->getKeyword<ParserKeywords::PINCH>( )->getRecord(0);
auto item = record->getItem<ParserKeywords::PINCH::THRESHOLD_THICKNESS>( );
m_pinch.setValue( item->getSIDouble(0) );
m_pinchoutMode = record->getItem<ParserKeywords::PINCH::PINCHOUT_OPTION>()->getString(0);
m_multzMode = record->getItem<ParserKeywords::PINCH::MULTZ_OPTION>()->getString(0);
}
if (deck->hasKeyword<ParserKeywords::MINPV>() && deck->hasKeyword<ParserKeywords::MINPVFIL>()) {
@@ -212,6 +222,14 @@ namespace Opm {
return m_pinch.getValue();
}
std::string EclipseGrid::getPinchoutOption( ) const {
return m_pinchoutMode;
}
std::string EclipseGrid::getMultzOption( ) const {
return m_multzMode;
}
MinpvMode::ModeEnum EclipseGrid::getMinpvMode() const {
return m_minpvMode;
}