Make Schedule.tuning auto, not a shared_ptr
This commit is contained in:
@@ -76,9 +76,9 @@ namespace Opm {
|
||||
Schedule::Schedule( const ParseContext& parseContext,
|
||||
const EclipseGrid& grid,
|
||||
const Deck& deck ) :
|
||||
m_timeMap( std::make_shared< TimeMap>( deck ))
|
||||
m_timeMap( std::make_shared< TimeMap>( deck )),
|
||||
m_tuning( m_timeMap )
|
||||
{
|
||||
m_tuning.reset(new Tuning(m_timeMap));
|
||||
m_events.reset(new Events(m_timeMap));
|
||||
m_modifierDeck.reset( new DynamicVector<std::shared_ptr<Deck> >( m_timeMap , std::shared_ptr<Deck>( 0 ) ));
|
||||
m_controlModeWHISTCTL = WellProducer::CMODE_UNDEFINED;
|
||||
@@ -1051,36 +1051,36 @@ namespace Opm {
|
||||
const auto& record1 = keyword.getRecord(0);
|
||||
|
||||
double TSINIT = record1.getItem("TSINIT").getSIDouble(0);
|
||||
m_tuning->setTSINIT(currentStep, TSINIT);
|
||||
this->m_tuning.setTSINIT(currentStep, TSINIT);
|
||||
|
||||
double TSMAXZ = record1.getItem("TSMAXZ").getSIDouble(0);
|
||||
m_tuning->setTSMAXZ(currentStep, TSMAXZ);
|
||||
this->m_tuning.setTSMAXZ(currentStep, TSMAXZ);
|
||||
|
||||
double TSMINZ = record1.getItem("TSMINZ").getSIDouble(0);
|
||||
m_tuning->setTSMINZ(currentStep, TSMINZ);
|
||||
this->m_tuning.setTSMINZ(currentStep, TSMINZ);
|
||||
|
||||
double TSMCHP = record1.getItem("TSMCHP").getSIDouble(0);
|
||||
m_tuning->setTSMCHP(currentStep, TSMCHP);
|
||||
this->m_tuning.setTSMCHP(currentStep, TSMCHP);
|
||||
|
||||
double TSFMAX = record1.getItem("TSFMAX").get< double >(0);
|
||||
m_tuning->setTSFMAX(currentStep, TSFMAX);
|
||||
this->m_tuning.setTSFMAX(currentStep, TSFMAX);
|
||||
|
||||
double TSFMIN = record1.getItem("TSFMIN").get< double >(0);
|
||||
m_tuning->setTSFMIN(currentStep, TSFMIN);
|
||||
this->m_tuning.setTSFMIN(currentStep, TSFMIN);
|
||||
|
||||
double TSFCNV = record1.getItem("TSFCNV").get< double >(0);
|
||||
m_tuning->setTSFCNV(currentStep, TSFCNV);
|
||||
this->m_tuning.setTSFCNV(currentStep, TSFCNV);
|
||||
|
||||
double TFDIFF = record1.getItem("TFDIFF").get< double >(0);
|
||||
m_tuning->setTFDIFF(currentStep, TFDIFF);
|
||||
this->m_tuning.setTFDIFF(currentStep, TFDIFF);
|
||||
|
||||
double THRUPT = record1.getItem("THRUPT").get< double >(0);
|
||||
m_tuning->setTHRUPT(currentStep, THRUPT);
|
||||
this->m_tuning.setTHRUPT(currentStep, THRUPT);
|
||||
|
||||
const auto& TMAXWCdeckItem = record1.getItem("TMAXWC");
|
||||
if (TMAXWCdeckItem.hasValue(0)) {
|
||||
double TMAXWC = TMAXWCdeckItem.getSIDouble(0);
|
||||
m_tuning->setTMAXWC(currentStep, TMAXWC);
|
||||
this->m_tuning.setTMAXWC(currentStep, TMAXWC);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1089,46 +1089,46 @@ namespace Opm {
|
||||
const auto& record2 = keyword.getRecord(1);
|
||||
|
||||
double TRGTTE = record2.getItem("TRGTTE").get< double >(0);
|
||||
m_tuning->setTRGTTE(currentStep, TRGTTE);
|
||||
this->m_tuning.setTRGTTE(currentStep, TRGTTE);
|
||||
|
||||
double TRGCNV = record2.getItem("TRGCNV").get< double >(0);
|
||||
m_tuning->setTRGCNV(currentStep, TRGCNV);
|
||||
this->m_tuning.setTRGCNV(currentStep, TRGCNV);
|
||||
|
||||
double TRGMBE = record2.getItem("TRGMBE").get< double >(0);
|
||||
m_tuning->setTRGMBE(currentStep, TRGMBE);
|
||||
this->m_tuning.setTRGMBE(currentStep, TRGMBE);
|
||||
|
||||
double TRGLCV = record2.getItem("TRGLCV").get< double >(0);
|
||||
m_tuning->setTRGLCV(currentStep, TRGLCV);
|
||||
this->m_tuning.setTRGLCV(currentStep, TRGLCV);
|
||||
|
||||
double XXXTTE = record2.getItem("XXXTTE").get< double >(0);
|
||||
m_tuning->setXXXTTE(currentStep, XXXTTE);
|
||||
this->m_tuning.setXXXTTE(currentStep, XXXTTE);
|
||||
|
||||
double XXXCNV = record2.getItem("XXXCNV").get< double >(0);
|
||||
m_tuning->setXXXCNV(currentStep, XXXCNV);
|
||||
this->m_tuning.setXXXCNV(currentStep, XXXCNV);
|
||||
|
||||
double XXXMBE = record2.getItem("XXXMBE").get< double >(0);
|
||||
m_tuning->setXXXMBE(currentStep, XXXMBE);
|
||||
this->m_tuning.setXXXMBE(currentStep, XXXMBE);
|
||||
|
||||
double XXXLCV = record2.getItem("XXXLCV").get< double >(0);
|
||||
m_tuning->setXXXLCV(currentStep, XXXLCV);
|
||||
this->m_tuning.setXXXLCV(currentStep, XXXLCV);
|
||||
|
||||
double XXXWFL = record2.getItem("XXXWFL").get< double >(0);
|
||||
m_tuning->setXXXWFL(currentStep, XXXWFL);
|
||||
this->m_tuning.setXXXWFL(currentStep, XXXWFL);
|
||||
|
||||
double TRGFIP = record2.getItem("TRGFIP").get< double >(0);
|
||||
m_tuning->setTRGFIP(currentStep, TRGFIP);
|
||||
this->m_tuning.setTRGFIP(currentStep, TRGFIP);
|
||||
|
||||
const auto& TRGSFTdeckItem = record2.getItem("TRGSFT");
|
||||
if (TRGSFTdeckItem.hasValue(0)) {
|
||||
double TRGSFT = TRGSFTdeckItem.get< double >(0);
|
||||
m_tuning->setTRGSFT(currentStep, TRGSFT);
|
||||
this->m_tuning.setTRGSFT(currentStep, TRGSFT);
|
||||
}
|
||||
|
||||
double THIONX = record2.getItem("THIONX").get< double >(0);
|
||||
m_tuning->setTHIONX(currentStep, THIONX);
|
||||
this->m_tuning.setTHIONX(currentStep, THIONX);
|
||||
|
||||
int TRWGHT = record2.getItem("TRWGHT").get< int >(0);
|
||||
m_tuning->setTRWGHT(currentStep, TRWGHT);
|
||||
this->m_tuning.setTRWGHT(currentStep, TRWGHT);
|
||||
}
|
||||
|
||||
|
||||
@@ -1136,36 +1136,36 @@ namespace Opm {
|
||||
const auto& record3 = keyword.getRecord(2);
|
||||
|
||||
int NEWTMX = record3.getItem("NEWTMX").get< int >(0);
|
||||
m_tuning->setNEWTMX(currentStep, NEWTMX);
|
||||
this->m_tuning.setNEWTMX(currentStep, NEWTMX);
|
||||
|
||||
int NEWTMN = record3.getItem("NEWTMN").get< int >(0);
|
||||
m_tuning->setNEWTMN(currentStep, NEWTMN);
|
||||
this->m_tuning.setNEWTMN(currentStep, NEWTMN);
|
||||
|
||||
int LITMAX = record3.getItem("LITMAX").get< int >(0);
|
||||
m_tuning->setLITMAX(currentStep, LITMAX);
|
||||
this->m_tuning.setLITMAX(currentStep, LITMAX);
|
||||
|
||||
int LITMIN = record3.getItem("LITMIN").get< int >(0);
|
||||
m_tuning->setLITMIN(currentStep, LITMIN);
|
||||
this->m_tuning.setLITMIN(currentStep, LITMIN);
|
||||
|
||||
int MXWSIT = record3.getItem("MXWSIT").get< int >(0);
|
||||
m_tuning->setMXWSIT(currentStep, MXWSIT);
|
||||
this->m_tuning.setMXWSIT(currentStep, MXWSIT);
|
||||
|
||||
int MXWPIT = record3.getItem("MXWPIT").get< int >(0);
|
||||
m_tuning->setMXWPIT(currentStep, MXWPIT);
|
||||
this->m_tuning.setMXWPIT(currentStep, MXWPIT);
|
||||
|
||||
double DDPLIM = record3.getItem("DDPLIM").getSIDouble(0);
|
||||
m_tuning->setDDPLIM(currentStep, DDPLIM);
|
||||
this->m_tuning.setDDPLIM(currentStep, DDPLIM);
|
||||
|
||||
double DDSLIM = record3.getItem("DDSLIM").get< double >(0);
|
||||
m_tuning->setDDSLIM(currentStep, DDSLIM);
|
||||
this->m_tuning.setDDSLIM(currentStep, DDSLIM);
|
||||
|
||||
double TRGDPR = record3.getItem("TRGDPR").getSIDouble(0);
|
||||
m_tuning->setTRGDPR(currentStep, TRGDPR);
|
||||
this->m_tuning.setTRGDPR(currentStep, TRGDPR);
|
||||
|
||||
const auto& XXXDPRdeckItem = record3.getItem("XXXDPR");
|
||||
if (XXXDPRdeckItem.hasValue(0)) {
|
||||
double XXXDPR = XXXDPRdeckItem.getSIDouble(0);
|
||||
m_tuning->setXXXDPR(currentStep, XXXDPR);
|
||||
this->m_tuning.setXXXDPR(currentStep, XXXDPR);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1551,8 +1551,8 @@ namespace Opm {
|
||||
return ncwmax;
|
||||
}
|
||||
|
||||
TuningPtr Schedule::getTuning() const {
|
||||
return m_tuning;
|
||||
const Tuning& Schedule::getTuning() const {
|
||||
return this->m_tuning;
|
||||
}
|
||||
|
||||
std::shared_ptr<const Deck> Schedule::getModifierDeck(size_t timeStep) const {
|
||||
|
||||
@@ -24,14 +24,15 @@
|
||||
|
||||
#include <boost/date_time/posix_time/posix_time_types.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Tuning.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
|
||||
#include <opm/parser/eclipse/Parser/MessageContainer.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
template< typename > class DynamicState;
|
||||
template< typename > class DynamicVector;
|
||||
|
||||
class Deck;
|
||||
@@ -45,7 +46,6 @@ namespace Opm
|
||||
class ParseContext;
|
||||
class SCHEDULESection;
|
||||
class TimeMap;
|
||||
class Tuning;
|
||||
class UnitSystem;
|
||||
class Well;
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Opm
|
||||
bool hasGroup(const std::string& groupName) const;
|
||||
const Group* getGroup(const std::string& groupName) const;
|
||||
std::vector< const Group* > getGroups() const;
|
||||
std::shared_ptr< Tuning > getTuning() const;
|
||||
const Tuning& getTuning() const;
|
||||
|
||||
const Events& getEvents() const;
|
||||
bool hasOilVaporizationProperties();
|
||||
@@ -102,7 +102,7 @@ namespace Opm
|
||||
std::shared_ptr<DynamicState<std::shared_ptr< OilVaporizationProperties > > > m_oilvaporizationproperties;
|
||||
std::shared_ptr<Events> m_events;
|
||||
std::shared_ptr<DynamicVector<std::shared_ptr<Deck> > > m_modifierDeck;
|
||||
std::shared_ptr< Tuning > m_tuning;
|
||||
Tuning m_tuning;
|
||||
MessageContainer m_messages;
|
||||
WellProducer::ControlModeEnum m_controlModeWHISTCTL;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule( ParseContext() , grid , deck );
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
const double diff = 1.0e-14;
|
||||
@@ -80,112 +80,112 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
/*** TIMESTEP 4***/
|
||||
/********* Record 1 ***********/
|
||||
size_t timestep = 4;
|
||||
double TSINIT_default = tuning->getTSINIT(timestep);
|
||||
double TSINIT_default = tuning.getTSINIT(timestep);
|
||||
BOOST_CHECK_CLOSE(TSINIT_default, 1 * Metric::Time, diff);
|
||||
|
||||
double TSMAXZ_default = tuning->getTSMAXZ(timestep);
|
||||
double TSMAXZ_default = tuning.getTSMAXZ(timestep);
|
||||
BOOST_CHECK_CLOSE(TSMAXZ_default, 365 * Metric::Time, diff);
|
||||
|
||||
double TSMINZ_default = tuning->getTSMINZ(timestep);
|
||||
double TSMINZ_default = tuning.getTSMINZ(timestep);
|
||||
BOOST_CHECK_CLOSE(TSMINZ_default, 0.1 * Metric::Time, diff);
|
||||
|
||||
double TSMCHP_default = tuning->getTSMCHP(timestep);
|
||||
double TSMCHP_default = tuning.getTSMCHP(timestep);
|
||||
BOOST_CHECK_CLOSE(TSMCHP_default, 0.15 * Metric::Time, diff);
|
||||
|
||||
double TSFMAX_default = tuning->getTSFMAX(timestep);
|
||||
double TSFMAX_default = tuning.getTSFMAX(timestep);
|
||||
BOOST_CHECK_CLOSE(TSFMAX_default, 3.0, diff);
|
||||
|
||||
double TSFMIN_default = tuning->getTSFMIN(timestep);
|
||||
double TSFMIN_default = tuning.getTSFMIN(timestep);
|
||||
BOOST_CHECK_CLOSE(TSFMIN_default, 0.3, diff);
|
||||
|
||||
double TSFCNV_default = tuning->getTSFCNV(timestep);
|
||||
double TSFCNV_default = tuning.getTSFCNV(timestep);
|
||||
BOOST_CHECK_CLOSE(TSFCNV_default, 0.1, diff);
|
||||
|
||||
double TFDIFF_default = tuning->getTFDIFF(timestep);
|
||||
double TFDIFF_default = tuning.getTFDIFF(timestep);
|
||||
BOOST_CHECK_CLOSE(TFDIFF_default, 1.25, diff);
|
||||
|
||||
double THRUPT_default = tuning->getTHRUPT(timestep);
|
||||
double THRUPT_default = tuning.getTHRUPT(timestep);
|
||||
BOOST_CHECK_CLOSE(THRUPT_default, 1E20, diff);
|
||||
|
||||
bool TMAXWC_has_value = tuning->getTMAXWChasValue(timestep);
|
||||
double TMAXWC_default = tuning->getTMAXWC(timestep);
|
||||
bool TMAXWC_has_value = tuning.getTMAXWChasValue(timestep);
|
||||
double TMAXWC_default = tuning.getTMAXWC(timestep);
|
||||
BOOST_CHECK_EQUAL(false, TMAXWC_has_value);
|
||||
BOOST_CHECK_CLOSE(TMAXWC_default, 0.0 * Metric::Time, diff);
|
||||
|
||||
|
||||
/********* Record 2 ************/
|
||||
double TRGTTE_default = tuning->getTRGTTE(timestep);
|
||||
double TRGTTE_default = tuning.getTRGTTE(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGTTE_default, 0.1, diff);
|
||||
|
||||
double TRGCNV_default = tuning->getTRGCNV(timestep);
|
||||
double TRGCNV_default = tuning.getTRGCNV(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGCNV_default, 0.001, diff);
|
||||
|
||||
double TRGMBE_default = tuning->getTRGMBE(timestep);
|
||||
double TRGMBE_default = tuning.getTRGMBE(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGMBE_default, 1.0E-7, diff);
|
||||
|
||||
double TRGLCV_default = tuning->getTRGLCV(timestep);
|
||||
double TRGLCV_default = tuning.getTRGLCV(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGLCV_default, 0.0001, diff);
|
||||
|
||||
double XXXTTE_default = tuning->getXXXTTE(timestep);
|
||||
double XXXTTE_default = tuning.getXXXTTE(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXTTE_default, 10.0, diff);
|
||||
|
||||
double XXXCNV_default = tuning->getXXXCNV(timestep);
|
||||
double XXXCNV_default = tuning.getXXXCNV(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXCNV_default, 0.01, diff);
|
||||
|
||||
double XXXMBE_default = tuning->getXXXMBE(timestep);
|
||||
double XXXMBE_default = tuning.getXXXMBE(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXMBE_default, 1.0E-6, diff);
|
||||
|
||||
double XXXLCV_default = tuning->getXXXLCV(timestep);
|
||||
double XXXLCV_default = tuning.getXXXLCV(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXLCV_default, 0.001, diff);
|
||||
|
||||
double XXXWFL_default = tuning->getXXXWFL(timestep);
|
||||
double XXXWFL_default = tuning.getXXXWFL(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXWFL_default, 0.001, diff);
|
||||
|
||||
double TRGFIP_default = tuning->getTRGFIP(timestep);
|
||||
double TRGFIP_default = tuning.getTRGFIP(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGFIP_default, 0.025, diff);
|
||||
|
||||
bool TRGSFT_has_value = tuning->getTRGSFThasValue(timestep);
|
||||
double TRGSFT_default = tuning->getTRGSFT(timestep);
|
||||
bool TRGSFT_has_value = tuning.getTRGSFThasValue(timestep);
|
||||
double TRGSFT_default = tuning.getTRGSFT(timestep);
|
||||
BOOST_CHECK_EQUAL(false, TRGSFT_has_value);
|
||||
BOOST_CHECK_CLOSE(TRGSFT_default, 0.0, diff);
|
||||
|
||||
double THIONX_default = tuning->getTHIONX(timestep);
|
||||
double THIONX_default = tuning.getTHIONX(timestep);
|
||||
BOOST_CHECK_CLOSE(THIONX_default, 0.01, diff);
|
||||
|
||||
int TRWGHT_default = tuning->getTRWGHT(timestep);
|
||||
int TRWGHT_default = tuning.getTRWGHT(timestep);
|
||||
BOOST_CHECK_EQUAL(TRWGHT_default, 1);
|
||||
|
||||
|
||||
/********* Record 3 ************/
|
||||
int NEWTMX_default = tuning->getNEWTMX(timestep);
|
||||
int NEWTMX_default = tuning.getNEWTMX(timestep);
|
||||
BOOST_CHECK_EQUAL(NEWTMX_default, 12);
|
||||
|
||||
int NEWTMN_default = tuning->getNEWTMN(timestep);
|
||||
int NEWTMN_default = tuning.getNEWTMN(timestep);
|
||||
BOOST_CHECK_EQUAL(NEWTMN_default, 1);
|
||||
|
||||
int LITMAX_default = tuning->getLITMAX(timestep);
|
||||
int LITMAX_default = tuning.getLITMAX(timestep);
|
||||
BOOST_CHECK_EQUAL(LITMAX_default, 25);
|
||||
|
||||
int LITMIN_default = tuning->getLITMIN(timestep);
|
||||
int LITMIN_default = tuning.getLITMIN(timestep);
|
||||
BOOST_CHECK_EQUAL(LITMIN_default, 1);
|
||||
|
||||
int MXWSIT_default = tuning->getMXWSIT(timestep);
|
||||
int MXWSIT_default = tuning.getMXWSIT(timestep);
|
||||
BOOST_CHECK_EQUAL(MXWSIT_default, 8);
|
||||
|
||||
int MXWPIT_default = tuning->getMXWPIT(timestep);
|
||||
int MXWPIT_default = tuning.getMXWPIT(timestep);
|
||||
BOOST_CHECK_EQUAL(MXWPIT_default, 8);
|
||||
|
||||
double DDPLIM_default = tuning->getDDPLIM(timestep);
|
||||
double DDPLIM_default = tuning.getDDPLIM(timestep);
|
||||
BOOST_CHECK_CLOSE(DDPLIM_default, 1.0E6 * Metric::Pressure, diff);
|
||||
|
||||
double DDSLIM_default = tuning->getDDSLIM(timestep);
|
||||
double DDSLIM_default = tuning.getDDSLIM(timestep);
|
||||
BOOST_CHECK_CLOSE(DDSLIM_default, 1.0E6, diff);
|
||||
|
||||
double TRGDPR_default = tuning->getTRGDPR(timestep);
|
||||
double TRGDPR_default = tuning.getTRGDPR(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGDPR_default, 1.0E6 * Metric::Pressure, diff);
|
||||
|
||||
bool XXXDPR_has_value = tuning->getXXXDPRhasValue(timestep);
|
||||
double XXXDPR_default = tuning->getXXXDPR(timestep);
|
||||
bool XXXDPR_has_value = tuning.getXXXDPRhasValue(timestep);
|
||||
double XXXDPR_default = tuning.getXXXDPR(timestep);
|
||||
BOOST_CHECK_EQUAL(false, XXXDPR_has_value);
|
||||
BOOST_CHECK_CLOSE(XXXDPR_default, 0.0, diff);
|
||||
|
||||
@@ -195,110 +195,110 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
/*** TIMESTEP 5***/
|
||||
/********* Record 1 ***********/
|
||||
timestep = 5;
|
||||
double TSINIT = tuning->getTSINIT(timestep);
|
||||
double TSINIT = tuning.getTSINIT(timestep);
|
||||
BOOST_CHECK_CLOSE(TSINIT, 2 * Metric::Time, diff);
|
||||
|
||||
double TSMAXZ = tuning->getTSMAXZ(timestep);
|
||||
double TSMAXZ = tuning.getTSMAXZ(timestep);
|
||||
BOOST_CHECK_CLOSE(TSMAXZ, 300 * Metric::Time, diff);
|
||||
|
||||
double TSMINZ = tuning->getTSMINZ(timestep);
|
||||
double TSMINZ = tuning.getTSMINZ(timestep);
|
||||
BOOST_CHECK_CLOSE(TSMINZ, 0.3 * Metric::Time, diff);
|
||||
|
||||
double TSMCHP = tuning->getTSMCHP(timestep);
|
||||
double TSMCHP = tuning.getTSMCHP(timestep);
|
||||
BOOST_CHECK_CLOSE(TSMCHP, 0.30 * Metric::Time, diff);
|
||||
|
||||
double TSFMAX = tuning->getTSFMAX(timestep);
|
||||
double TSFMAX = tuning.getTSFMAX(timestep);
|
||||
BOOST_CHECK_CLOSE(TSFMAX, 6.0, 1.0);
|
||||
|
||||
double TSFMIN = tuning->getTSFMIN(timestep);
|
||||
double TSFMIN = tuning.getTSFMIN(timestep);
|
||||
BOOST_CHECK_CLOSE(TSFMIN, 0.6, 1.0);
|
||||
|
||||
double TSFCNV = tuning->getTSFCNV(timestep);
|
||||
double TSFCNV = tuning.getTSFCNV(timestep);
|
||||
BOOST_CHECK_CLOSE(TSFCNV, 0.2, diff);
|
||||
|
||||
double TFDIFF = tuning->getTFDIFF(timestep);
|
||||
double TFDIFF = tuning.getTFDIFF(timestep);
|
||||
BOOST_CHECK_CLOSE(TFDIFF, 2.25, diff);
|
||||
|
||||
double THRUPT = tuning->getTHRUPT(timestep);
|
||||
double THRUPT = tuning.getTHRUPT(timestep);
|
||||
BOOST_CHECK_CLOSE(THRUPT, 2E20, diff);
|
||||
|
||||
TMAXWC_has_value = tuning->getTMAXWChasValue(timestep);
|
||||
TMAXWC_default = tuning->getTMAXWC(timestep);
|
||||
TMAXWC_has_value = tuning.getTMAXWChasValue(timestep);
|
||||
TMAXWC_default = tuning.getTMAXWC(timestep);
|
||||
BOOST_CHECK_EQUAL(false, TMAXWC_has_value);
|
||||
BOOST_CHECK_CLOSE(TMAXWC_default, 0.0 * Metric::Time, diff);
|
||||
|
||||
/********* Record 2 ***********/
|
||||
double TRGTTE = tuning->getTRGTTE(timestep);
|
||||
double TRGTTE = tuning.getTRGTTE(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGTTE, 0.2, diff);
|
||||
|
||||
double TRGCNV = tuning->getTRGCNV(timestep);
|
||||
double TRGCNV = tuning.getTRGCNV(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGCNV, 0.002, diff);
|
||||
|
||||
double TRGMBE = tuning->getTRGMBE(timestep);
|
||||
double TRGMBE = tuning.getTRGMBE(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGMBE, 2.0E-7, diff);
|
||||
|
||||
double TRGLCV = tuning->getTRGLCV(timestep);
|
||||
double TRGLCV = tuning.getTRGLCV(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGLCV, 0.0002, diff);
|
||||
|
||||
double XXXTTE = tuning->getXXXTTE(timestep);
|
||||
double XXXTTE = tuning.getXXXTTE(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXTTE, 11.0, diff);
|
||||
|
||||
double XXXCNV = tuning->getXXXCNV(timestep);
|
||||
double XXXCNV = tuning.getXXXCNV(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXCNV, 0.02, diff);
|
||||
|
||||
double XXXMBE = tuning->getXXXMBE(timestep);
|
||||
double XXXMBE = tuning.getXXXMBE(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXMBE, 2.0E-6, diff);
|
||||
|
||||
double XXXLCV = tuning->getXXXLCV(timestep);
|
||||
double XXXLCV = tuning.getXXXLCV(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXLCV, 0.002, diff);
|
||||
|
||||
double XXXWFL = tuning->getXXXWFL(timestep);
|
||||
double XXXWFL = tuning.getXXXWFL(timestep);
|
||||
BOOST_CHECK_CLOSE(XXXWFL, 0.002, diff);
|
||||
|
||||
double TRGFIP = tuning->getTRGFIP(timestep);
|
||||
double TRGFIP = tuning.getTRGFIP(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGFIP, 0.035, diff);
|
||||
|
||||
TRGSFT_has_value = tuning->getTRGSFThasValue(timestep);
|
||||
double TRGSFT = tuning->getTRGSFT(timestep);
|
||||
TRGSFT_has_value = tuning.getTRGSFThasValue(timestep);
|
||||
double TRGSFT = tuning.getTRGSFT(timestep);
|
||||
BOOST_CHECK_EQUAL(true, TRGSFT_has_value);
|
||||
BOOST_CHECK_CLOSE(TRGSFT, 66.0, diff);
|
||||
|
||||
double THIONX = tuning->getTHIONX(timestep);
|
||||
double THIONX = tuning.getTHIONX(timestep);
|
||||
BOOST_CHECK_CLOSE(THIONX, 0.02, diff);
|
||||
|
||||
int TRWGHT = tuning->getTRWGHT(timestep);
|
||||
int TRWGHT = tuning.getTRWGHT(timestep);
|
||||
BOOST_CHECK_EQUAL(TRWGHT, 2);
|
||||
|
||||
/********* Record 3 ***********/
|
||||
int NEWTMX = tuning->getNEWTMX(timestep);
|
||||
int NEWTMX = tuning.getNEWTMX(timestep);
|
||||
BOOST_CHECK_EQUAL(NEWTMX, 13);
|
||||
|
||||
int NEWTMN = tuning->getNEWTMN(timestep);
|
||||
int NEWTMN = tuning.getNEWTMN(timestep);
|
||||
BOOST_CHECK_EQUAL(NEWTMN, 2);
|
||||
|
||||
int LITMAX = tuning->getLITMAX(timestep);
|
||||
int LITMAX = tuning.getLITMAX(timestep);
|
||||
BOOST_CHECK_EQUAL(LITMAX, 26);
|
||||
|
||||
int LITMIN = tuning->getLITMIN(timestep);
|
||||
int LITMIN = tuning.getLITMIN(timestep);
|
||||
BOOST_CHECK_EQUAL(LITMIN, 2);
|
||||
|
||||
int MXWSIT = tuning->getMXWSIT(timestep);
|
||||
int MXWSIT = tuning.getMXWSIT(timestep);
|
||||
BOOST_CHECK_EQUAL(MXWSIT, 9);
|
||||
|
||||
int MXWPIT = tuning->getMXWPIT(timestep);
|
||||
int MXWPIT = tuning.getMXWPIT(timestep);
|
||||
BOOST_CHECK_EQUAL(MXWPIT, 9);
|
||||
|
||||
double DDPLIM= tuning->getDDPLIM(timestep);
|
||||
double DDPLIM= tuning.getDDPLIM(timestep);
|
||||
BOOST_CHECK_CLOSE(DDPLIM, 4.0E6 * Metric::Pressure, diff);
|
||||
|
||||
double DDSLIM= tuning->getDDSLIM(timestep);
|
||||
double DDSLIM= tuning.getDDSLIM(timestep);
|
||||
BOOST_CHECK_CLOSE(DDSLIM, 4.0E6, diff);
|
||||
|
||||
double TRGDPR = tuning->getTRGDPR(timestep);
|
||||
double TRGDPR = tuning.getTRGDPR(timestep);
|
||||
BOOST_CHECK_CLOSE(TRGDPR, 4.0E6 * Metric::Pressure, diff);
|
||||
|
||||
XXXDPR_has_value = tuning->getXXXDPRhasValue(timestep);
|
||||
double XXXDPR = tuning->getXXXDPR(timestep);
|
||||
XXXDPR_has_value = tuning.getXXXDPRhasValue(timestep);
|
||||
double XXXDPR = tuning.getXXXDPR(timestep);
|
||||
BOOST_CHECK_EQUAL(true, XXXDPR_has_value);
|
||||
BOOST_CHECK_CLOSE(XXXDPR, 1.0 * Metric::Pressure, diff);
|
||||
|
||||
@@ -308,8 +308,8 @@ BOOST_AUTO_TEST_CASE(TuningTest) {
|
||||
/*** TIMESTEP 10 ***/
|
||||
/********* Record 1 ***********/
|
||||
timestep = 10;
|
||||
TMAXWC_has_value = tuning->getTMAXWChasValue(timestep);
|
||||
TMAXWC_default = tuning->getTMAXWC(timestep);
|
||||
TMAXWC_has_value = tuning.getTMAXWChasValue(timestep);
|
||||
TMAXWC_default = tuning.getTMAXWC(timestep);
|
||||
BOOST_CHECK_EQUAL(true, TMAXWC_has_value);
|
||||
BOOST_CHECK_CLOSE(TMAXWC_default, 10.0 * Metric::Time, diff);
|
||||
|
||||
@@ -323,7 +323,7 @@ BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
const double diff = 1.0e-14;
|
||||
@@ -332,13 +332,13 @@ BOOST_AUTO_TEST_CASE(TuningInitTest) {
|
||||
/********* Record 1 ***********/
|
||||
size_t timestep = 0;
|
||||
double value = 100.00;
|
||||
tuning->setTuningInitialValue("TSINIT",value, false);
|
||||
double TSINIT_default = tuning->getTSINIT(timestep);
|
||||
tuning.setTuningInitialValue("TSINIT",value, false);
|
||||
double TSINIT_default = tuning.getTSINIT(timestep);
|
||||
BOOST_CHECK_CLOSE(TSINIT_default, 100.00, diff);
|
||||
|
||||
timestep = 10;
|
||||
bool TMAXWC_has_value = tuning->getTMAXWChasValue(timestep);
|
||||
double TMAXWC_default = tuning->getTMAXWC(timestep);
|
||||
bool TMAXWC_has_value = tuning.getTMAXWChasValue(timestep);
|
||||
double TMAXWC_default = tuning.getTMAXWC(timestep);
|
||||
BOOST_CHECK_EQUAL(true, TMAXWC_has_value);
|
||||
BOOST_CHECK_CLOSE(TMAXWC_default, 10.0 * Metric::Time, diff);
|
||||
|
||||
@@ -351,7 +351,7 @@ BOOST_AUTO_TEST_CASE(TuningResetTest) {
|
||||
DeckPtr deck = createDeck(deckStr);
|
||||
EclipseGrid grid(10,10,10);
|
||||
Schedule schedule(ParseContext() , grid , deck);
|
||||
TuningPtr tuning = schedule.getTuning();
|
||||
auto tuning = schedule.getTuning();
|
||||
|
||||
|
||||
const double diff = 1.0e-14;
|
||||
@@ -360,12 +360,12 @@ BOOST_AUTO_TEST_CASE(TuningResetTest) {
|
||||
/********* Record 1 ***********/
|
||||
size_t timestep = 0;
|
||||
double value = 666.00;
|
||||
tuning->setTuningInitialValue("TSINIT",value, true);
|
||||
double TSINIT_default = tuning->getTSINIT(timestep);
|
||||
tuning.setTuningInitialValue("TSINIT",value, true);
|
||||
double TSINIT_default = tuning.getTSINIT(timestep);
|
||||
BOOST_CHECK_CLOSE(TSINIT_default, 666.00, diff);
|
||||
|
||||
timestep = 10;
|
||||
TSINIT_default = tuning->getTSINIT(timestep);
|
||||
TSINIT_default = tuning.getTSINIT(timestep);
|
||||
BOOST_CHECK_CLOSE(TSINIT_default, 666.00, diff);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user