2014-01-07 17:39:07 +01:00
|
|
|
/*
|
|
|
|
|
Copyright 2013 Statoil ASA.
|
|
|
|
|
|
|
|
|
|
This file is part of the Open Porous Media project (OPM).
|
|
|
|
|
|
|
|
|
|
OPM is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
OPM is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2016-03-17 10:01:38 +01:00
|
|
|
#include <set>
|
|
|
|
|
|
2014-12-12 19:47:18 +01:00
|
|
|
#include <boost/algorithm/string/join.hpp>
|
2014-12-12 20:56:34 +01:00
|
|
|
|
2016-01-24 21:49:39 +01:00
|
|
|
#include <opm/parser/eclipse/Deck/Section.hpp>
|
2016-03-08 17:07:42 +01:00
|
|
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp>
|
2014-12-16 13:41:44 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
2014-05-30 10:08:35 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/Box.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/BoxManager.hpp>
|
2016-01-15 08:42:57 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/Fault.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/MULTREGTScanner.hpp>
|
2015-06-10 09:02:51 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
2015-03-31 11:56:33 +02:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/SatfuncPropertyInitializers.hpp>
|
2016-01-24 21:49:39 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
|
2016-01-15 08:42:57 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/IOConfig/IOConfig.hpp>
|
|
|
|
|
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
2016-01-24 21:49:39 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
2016-01-15 08:42:57 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
2016-02-26 23:41:39 +01:00
|
|
|
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
2016-01-18 17:51:15 +01:00
|
|
|
#include <opm/parser/eclipse/Parser/ParserKeywords/M.hpp>
|
2016-01-24 21:49:39 +01:00
|
|
|
#include <opm/parser/eclipse/Units/Dimension.hpp>
|
2016-01-15 08:42:57 +01:00
|
|
|
#include <opm/parser/eclipse/Units/UnitSystem.hpp>
|
2016-04-11 10:44:39 +08:00
|
|
|
#include <opm/parser/eclipse/Parser/MessageContainer.hpp>
|
2014-10-01 16:07:44 +02:00
|
|
|
|
2014-01-07 17:39:07 +01:00
|
|
|
|
|
|
|
|
namespace Opm {
|
2014-10-09 13:40:39 +02:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
|
|
|
|
|
EclipseState::EclipseState(std::shared_ptr<const Deck> deckptr, const ParseContext& parseContext) :
|
|
|
|
|
EclipseState(*deckptr, parseContext)
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
EclipseState::EclipseState(const Deck& deck, const ParseContext& parseContext) :
|
|
|
|
|
m_deckUnitSystem( deck.getActiveUnitSystem() ),
|
2016-04-01 15:27:40 +02:00
|
|
|
m_parseContext( parseContext ),
|
2016-05-02 17:46:20 +02:00
|
|
|
m_tables( deck ),
|
2016-04-19 13:05:56 +02:00
|
|
|
m_inputGrid( std::make_shared<EclipseGrid>(deck, nullptr)),
|
2016-05-02 17:46:20 +02:00
|
|
|
m_eclipseProperties( deck, m_tables, *m_inputGrid)
|
2014-05-16 15:58:04 +02:00
|
|
|
{
|
2016-04-13 16:43:29 +02:00
|
|
|
// after Eclipse3DProperties has been constructed, we have complete ACTNUM info
|
|
|
|
|
if (m_eclipseProperties.hasDeckIntGridProperty("ACTNUM"))
|
2016-04-19 13:05:56 +02:00
|
|
|
m_inputGrid->resetACTNUM(m_eclipseProperties.getIntGridProperty("ACTNUM").getData().data());
|
2016-04-13 16:43:29 +02:00
|
|
|
|
2015-05-24 14:40:10 +02:00
|
|
|
initIOConfig(deck);
|
2016-03-08 17:07:42 +01:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
m_schedule = ScheduleConstPtr(new Schedule(m_parseContext, getInputGrid(), deck, m_ioConfig));
|
2015-05-24 14:40:10 +02:00
|
|
|
initIOConfigPostSchedule(deck);
|
2016-04-01 15:27:40 +02:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
if (deck.hasKeyword( "TITLE" )) {
|
|
|
|
|
const auto& titleKeyword = deck.getKeyword( "TITLE" );
|
2016-04-01 15:27:40 +02:00
|
|
|
const auto& item = titleKeyword.getRecord( 0 ).getItem( 0 );
|
|
|
|
|
std::vector<std::string> itemValue = item.getData<std::string>();
|
|
|
|
|
m_title = boost::algorithm::join( itemValue, " " );
|
|
|
|
|
}
|
2016-03-08 17:07:42 +01:00
|
|
|
|
|
|
|
|
m_initConfig = std::make_shared<const InitConfig>(deck);
|
2016-05-02 17:46:20 +02:00
|
|
|
m_simulationConfig = std::make_shared<const SimulationConfig>(m_parseContext, deck,
|
2016-04-01 15:27:40 +02:00
|
|
|
m_eclipseProperties);
|
2016-03-08 17:07:42 +01:00
|
|
|
|
2015-01-16 14:51:57 +01:00
|
|
|
initTransMult();
|
|
|
|
|
initFaults(deck);
|
|
|
|
|
initMULTREGT(deck);
|
2016-05-02 17:46:20 +02:00
|
|
|
m_nnc = NNC(deck, getInputGrid());
|
2016-04-18 14:26:39 +08:00
|
|
|
|
|
|
|
|
m_messageContainer.appendMessages(m_tables.getMessageContainer());
|
|
|
|
|
m_messageContainer.appendMessages(m_schedule->getMessageContainer());
|
2016-04-22 14:53:16 +08:00
|
|
|
m_messageContainer.appendMessages(m_inputGrid->getMessageContainer());
|
2016-04-18 14:26:39 +08:00
|
|
|
m_messageContainer.appendMessages(m_eclipseProperties.getMessageContainer());
|
2014-01-07 17:39:07 +01:00
|
|
|
}
|
2014-09-09 12:16:13 +02:00
|
|
|
|
2016-02-09 12:09:40 +01:00
|
|
|
const UnitSystem& EclipseState::getDeckUnitSystem() const {
|
2014-09-09 12:16:13 +02:00
|
|
|
return m_deckUnitSystem;
|
|
|
|
|
}
|
2014-01-07 17:39:07 +01:00
|
|
|
|
2016-04-19 13:05:56 +02:00
|
|
|
EclipseGridConstPtr EclipseState::getInputGrid() const {
|
2016-04-19 13:05:56 +02:00
|
|
|
return m_inputGrid;
|
2014-04-24 09:01:58 +02:00
|
|
|
}
|
|
|
|
|
|
2016-04-19 13:05:56 +02:00
|
|
|
EclipseGridPtr EclipseState::getInputGridCopy() const {
|
2016-04-19 13:05:56 +02:00
|
|
|
return std::make_shared<EclipseGrid>( m_inputGrid->c_ptr() );
|
2014-07-17 21:20:42 +02:00
|
|
|
}
|
|
|
|
|
|
2016-04-11 14:28:24 +02:00
|
|
|
const Eclipse3DProperties& EclipseState::get3DProperties() const {
|
2016-03-08 17:07:42 +01:00
|
|
|
return m_eclipseProperties;
|
|
|
|
|
}
|
2015-08-28 15:41:04 +02:00
|
|
|
|
2016-04-12 09:01:33 +08:00
|
|
|
const MessageContainer& EclipseState::getMessageContainer() const {
|
|
|
|
|
return m_messageContainer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MessageContainer& EclipseState::getMessageContainer() {
|
2016-04-11 10:44:39 +08:00
|
|
|
return m_messageContainer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-04-01 15:27:40 +02:00
|
|
|
const TableManager& EclipseState::getTableManager() const {
|
2015-08-28 15:41:04 +02:00
|
|
|
return m_tables;
|
2015-03-21 15:22:56 +01:00
|
|
|
}
|
|
|
|
|
|
2016-03-16 17:15:09 +08:00
|
|
|
const ParseContext& EclipseState::getParseContext() const {
|
|
|
|
|
return m_parseContext;
|
2015-09-23 10:36:10 +02:00
|
|
|
}
|
|
|
|
|
|
2014-01-07 17:39:07 +01:00
|
|
|
ScheduleConstPtr EclipseState::getSchedule() const {
|
2016-03-08 17:07:42 +01:00
|
|
|
return m_schedule;
|
2014-01-07 17:39:07 +01:00
|
|
|
}
|
|
|
|
|
|
2015-06-11 16:10:27 +02:00
|
|
|
IOConfigConstPtr EclipseState::getIOConfigConst() const {
|
|
|
|
|
return m_ioConfig;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IOConfigPtr EclipseState::getIOConfig() const {
|
2015-05-24 14:40:10 +02:00
|
|
|
return m_ioConfig;
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-09 09:40:48 +02:00
|
|
|
InitConfigConstPtr EclipseState::getInitConfig() const {
|
|
|
|
|
return m_initConfig;
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-12 16:51:04 +01:00
|
|
|
SimulationConfigConstPtr EclipseState::getSimulationConfig() const {
|
|
|
|
|
return m_simulationConfig;
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-02 17:50:45 +02:00
|
|
|
const FaultCollection& EclipseState::getFaults() const {
|
2014-07-05 13:47:22 +02:00
|
|
|
return m_faults;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-23 11:58:27 +02:00
|
|
|
std::shared_ptr<const TransMult> EclipseState::getTransMult() const {
|
|
|
|
|
return m_transMult;
|
|
|
|
|
}
|
2014-01-07 17:39:07 +01:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
const NNC& EclipseState::getNNC() const {
|
2015-06-10 09:02:51 +02:00
|
|
|
return m_nnc;
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-13 11:03:31 +02:00
|
|
|
bool EclipseState::hasNNC() const {
|
2016-05-02 17:46:20 +02:00
|
|
|
return m_nnc.hasNNC();
|
2015-07-13 11:03:31 +02:00
|
|
|
}
|
|
|
|
|
|
2014-01-29 19:39:33 +01:00
|
|
|
std::string EclipseState::getTitle() const {
|
|
|
|
|
return m_title;
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
void EclipseState::initIOConfig(const Deck& deck) {
|
|
|
|
|
m_ioConfig = std::make_shared<IOConfig>();
|
|
|
|
|
if (Section::hasGRID(deck)) {
|
|
|
|
|
std::shared_ptr<const GRIDSection> gridSection = std::make_shared<const GRIDSection>(deck);
|
2015-05-24 14:40:10 +02:00
|
|
|
m_ioConfig->handleGridSection(gridSection);
|
|
|
|
|
}
|
2016-05-02 17:46:20 +02:00
|
|
|
if (Section::hasRUNSPEC(deck)) {
|
|
|
|
|
std::shared_ptr<const RUNSPECSection> runspecSection = std::make_shared<const RUNSPECSection>(deck);
|
2015-05-24 14:40:10 +02:00
|
|
|
m_ioConfig->handleRunspecSection(runspecSection);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-27 14:06:06 +02:00
|
|
|
// Hmmm - would have thought this should iterate through the SCHEDULE section as well?
|
2016-05-02 17:46:20 +02:00
|
|
|
void EclipseState::initIOConfigPostSchedule(const Deck& deck) {
|
|
|
|
|
if (Section::hasSOLUTION(deck)) {
|
|
|
|
|
std::shared_ptr<const SOLUTIONSection> solutionSection = std::make_shared<const SOLUTIONSection>(deck);
|
2016-03-08 17:07:42 +01:00
|
|
|
m_ioConfig->handleSolutionSection(m_schedule->getTimeMap(), solutionSection);
|
2015-05-24 14:40:10 +02:00
|
|
|
}
|
2016-03-08 17:07:42 +01:00
|
|
|
m_ioConfig->initFirstOutput( *m_schedule );
|
2015-06-10 09:02:51 +02:00
|
|
|
}
|
2015-05-24 14:40:10 +02:00
|
|
|
|
2016-04-11 10:44:39 +08:00
|
|
|
|
2015-01-16 14:51:57 +01:00
|
|
|
void EclipseState::initTransMult() {
|
2016-04-19 13:05:56 +02:00
|
|
|
EclipseGridConstPtr grid = getInputGrid();
|
2014-06-23 11:58:27 +02:00
|
|
|
m_transMult = std::make_shared<TransMult>( grid->getNX() , grid->getNY() , grid->getNZ());
|
2016-04-01 15:27:40 +02:00
|
|
|
|
|
|
|
|
const auto& p = m_eclipseProperties;
|
2016-03-08 17:07:42 +01:00
|
|
|
if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTX"))
|
2016-04-01 15:27:40 +02:00
|
|
|
m_transMult->applyMULT(p.getDoubleGridProperty("MULTX"), FaceDir::XPlus);
|
2016-03-08 17:07:42 +01:00
|
|
|
if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTX-"))
|
2016-04-01 15:27:40 +02:00
|
|
|
m_transMult->applyMULT(p.getDoubleGridProperty("MULTX-"), FaceDir::XMinus);
|
2014-07-15 14:09:56 +02:00
|
|
|
|
2016-03-08 17:07:42 +01:00
|
|
|
if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTY"))
|
2016-04-01 15:27:40 +02:00
|
|
|
m_transMult->applyMULT(p.getDoubleGridProperty("MULTY"), FaceDir::YPlus);
|
2016-03-08 17:07:42 +01:00
|
|
|
if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTY-"))
|
2016-04-01 15:27:40 +02:00
|
|
|
m_transMult->applyMULT(p.getDoubleGridProperty("MULTY-"), FaceDir::YMinus);
|
2014-07-15 14:09:56 +02:00
|
|
|
|
2016-03-08 17:07:42 +01:00
|
|
|
if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTZ"))
|
2016-04-01 15:27:40 +02:00
|
|
|
m_transMult->applyMULT(p.getDoubleGridProperty("MULTZ"), FaceDir::ZPlus);
|
2016-03-08 17:07:42 +01:00
|
|
|
if (m_eclipseProperties.hasDeckDoubleGridProperty("MULTZ-"))
|
2016-04-01 15:27:40 +02:00
|
|
|
m_transMult->applyMULT(p.getDoubleGridProperty("MULTZ-"), FaceDir::ZMinus);
|
2014-06-23 11:58:27 +02:00
|
|
|
}
|
|
|
|
|
|
2016-05-02 17:50:45 +02:00
|
|
|
void EclipseState::initFaults(const Deck& deck) {
|
2016-04-19 13:05:56 +02:00
|
|
|
EclipseGridConstPtr grid = getInputGrid();
|
2016-05-02 17:46:20 +02:00
|
|
|
std::shared_ptr<GRIDSection> gridSection = std::make_shared<GRIDSection>( deck );
|
2014-12-08 13:39:32 +01:00
|
|
|
|
2016-05-02 17:50:45 +02:00
|
|
|
m_faults = FaultCollection(gridSection, grid);
|
2015-01-16 14:51:57 +01:00
|
|
|
setMULTFLT(gridSection);
|
2014-07-09 13:27:26 +02:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
if (Section::hasEDIT(deck)) {
|
|
|
|
|
std::shared_ptr<EDITSection> editSection = std::make_shared<EDITSection>( deck );
|
2015-01-16 14:51:57 +01:00
|
|
|
setMULTFLT(editSection);
|
2014-07-09 13:27:26 +02:00
|
|
|
}
|
|
|
|
|
|
2014-07-05 13:47:22 +02:00
|
|
|
m_transMult->applyMULTFLT( m_faults );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 12:53:46 +02:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
void EclipseState::setMULTFLT(std::shared_ptr<const Section> section) {
|
2014-07-05 13:47:22 +02:00
|
|
|
for (size_t index=0; index < section->count("MULTFLT"); index++) {
|
2016-02-09 12:09:40 +01:00
|
|
|
const auto& faultsKeyword = section->getKeyword("MULTFLT" , index);
|
|
|
|
|
for (auto iter = faultsKeyword.begin(); iter != faultsKeyword.end(); ++iter) {
|
2015-06-09 09:40:48 +02:00
|
|
|
|
2016-02-09 12:09:40 +01:00
|
|
|
const auto& faultRecord = *iter;
|
|
|
|
|
const std::string& faultName = faultRecord.getItem(0).get< std::string >(0);
|
|
|
|
|
double multFlt = faultRecord.getItem(1).get< double >(0);
|
2014-12-08 13:39:32 +01:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
m_faults.setTransMult( faultName , multFlt );
|
2014-07-05 13:47:22 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-23 11:58:27 +02:00
|
|
|
|
2014-12-08 13:39:32 +01:00
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
void EclipseState::initMULTREGT(const Deck& deck) {
|
2016-04-19 13:05:56 +02:00
|
|
|
EclipseGridConstPtr grid = getInputGrid();
|
2014-09-19 12:53:46 +02:00
|
|
|
|
2016-02-09 12:09:40 +01:00
|
|
|
std::vector< const DeckKeyword* > multregtKeywords;
|
2016-05-02 17:46:20 +02:00
|
|
|
if (deck.hasKeyword("MULTREGT"))
|
|
|
|
|
multregtKeywords = deck.getKeywordList("MULTREGT");
|
2014-09-19 12:53:46 +02:00
|
|
|
|
2016-03-08 17:07:42 +01:00
|
|
|
std::shared_ptr<MULTREGTScanner> scanner =
|
|
|
|
|
std::make_shared<MULTREGTScanner>(
|
2016-04-01 15:27:40 +02:00
|
|
|
m_eclipseProperties,
|
2016-03-08 17:07:42 +01:00
|
|
|
multregtKeywords ,
|
|
|
|
|
m_eclipseProperties.getDefaultRegionKeyword());
|
2014-01-07 17:52:20 +01:00
|
|
|
|
2016-03-08 17:07:42 +01:00
|
|
|
m_transMult->setMultregtScanner( scanner );
|
2014-01-07 17:52:20 +01:00
|
|
|
}
|
|
|
|
|
|
2016-04-15 09:14:00 +08:00
|
|
|
|
2016-03-17 10:01:38 +01:00
|
|
|
std::vector< int > EclipseState::getRegions( const std::string& kw ) const {
|
|
|
|
|
if( !this->get3DProperties().hasDeckIntGridProperty( kw ) ) return {};
|
|
|
|
|
|
|
|
|
|
const auto& property = this->get3DProperties().getIntGridProperty( kw );
|
|
|
|
|
|
|
|
|
|
std::set< int > regions( property.getData().begin(),
|
|
|
|
|
property.getData().end() );
|
|
|
|
|
|
|
|
|
|
return { regions.begin(), regions.end() };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2016-05-02 17:46:20 +02:00
|
|
|
void EclipseState::complainAboutAmbiguousKeyword(const Deck& deck, const std::string& keywordName) {
|
2016-04-14 11:03:53 +08:00
|
|
|
m_messageContainer.error("The " + keywordName + " keyword must be unique in the deck. Ignoring all!");
|
2016-05-02 17:46:20 +02:00
|
|
|
auto keywords = deck.getKeywordList(keywordName);
|
2015-01-16 13:01:10 +01:00
|
|
|
for (size_t i = 0; i < keywords.size(); ++i) {
|
|
|
|
|
std::string msg = "Ambiguous keyword "+keywordName+" defined here";
|
2016-04-19 15:06:03 +08:00
|
|
|
m_messageContainer.error(keywords[i]->getFileName(), msg, keywords[i]->getLineNumber());
|
2015-01-16 13:01:10 +01:00
|
|
|
}
|
2014-05-30 13:20:30 +02:00
|
|
|
}
|
|
|
|
|
|
2016-05-02 17:50:45 +02:00
|
|
|
void EclipseState::applyModifierDeck(std::shared_ptr<const Deck> deckptr) {
|
|
|
|
|
applyModifierDeck(*deckptr);
|
|
|
|
|
}
|
2015-11-02 12:18:03 +01:00
|
|
|
|
2016-05-02 17:50:45 +02:00
|
|
|
void EclipseState::applyModifierDeck(const Deck& deck) {
|
2015-11-02 12:18:03 +01:00
|
|
|
using namespace ParserKeywords;
|
2016-05-02 17:50:45 +02:00
|
|
|
for (const auto& keyword : deck) {
|
2015-11-02 12:18:03 +01:00
|
|
|
|
2016-02-09 12:09:40 +01:00
|
|
|
if (keyword.isKeyword<MULTFLT>()) {
|
|
|
|
|
for (const auto& record : keyword) {
|
|
|
|
|
const std::string& faultName = record.getItem<MULTFLT::fault>().get< std::string >(0);
|
2016-05-02 17:50:45 +02:00
|
|
|
auto& fault = m_faults.getFault( faultName );
|
2016-02-09 12:09:40 +01:00
|
|
|
double tmpMultFlt = record.getItem<MULTFLT::factor>().get< double >(0);
|
2016-05-02 17:50:45 +02:00
|
|
|
double oldMultFlt = fault.getTransMult( );
|
2015-11-02 12:18:03 +01:00
|
|
|
double newMultFlt = oldMultFlt * tmpMultFlt;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
This extremely contrived way of doing it is because of difference in
|
|
|
|
|
behavior and section awareness between the Fault object and the
|
|
|
|
|
Transmult object:
|
|
|
|
|
|
|
|
|
|
1. MULTFLT keywords found in the SCHEDULE section should apply the
|
|
|
|
|
transmissibility modifiers cumulatively - i.e. the current
|
|
|
|
|
transmissibility across the fault should be *multiplied* with the
|
|
|
|
|
newly entered MULTFLT value, and the resulting transmissibility
|
|
|
|
|
multplier for this fault should be the product of the newly
|
|
|
|
|
entered value and the current value.
|
|
|
|
|
|
|
|
|
|
2. The TransMult::applyMULTFLT() implementation will *multiply* the
|
|
|
|
|
transmissibility across a face with the value in the fault
|
|
|
|
|
object. Hence the current value has already been multiplied in;
|
|
|
|
|
we therefor first *set* the MULTFLT value to the new value, then
|
|
|
|
|
apply it to the TransMult object and then eventually update the
|
|
|
|
|
MULTFLT value in the fault instance.
|
|
|
|
|
|
|
|
|
|
*/
|
2016-05-02 17:50:45 +02:00
|
|
|
fault.setTransMult( tmpMultFlt );
|
2015-11-02 12:18:03 +01:00
|
|
|
m_transMult->applyMULTFLT( fault );
|
2016-05-02 17:50:45 +02:00
|
|
|
fault.setTransMult( newMultFlt );
|
2015-11-02 12:18:03 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-01-07 17:39:07 +01:00
|
|
|
}
|