GridPropertyFunction interface in init/postprocess
The new GridPropertyFunction processes grid cell property vectors and replaces GridPropertyBase* inheritance model. This implementation re-uses the old implementations as a transition.
This commit is contained in:
@@ -46,15 +46,11 @@ namespace Opm {
|
||||
|
||||
namespace GridPropertyPostProcessor {
|
||||
|
||||
class DistributeTopLayer : public GridPropertyBasePostProcessor<double>
|
||||
class DistributeTopLayer : public GridPropertyBaseInitializer<double>
|
||||
{
|
||||
public:
|
||||
DistributeTopLayer(const EclipseState& eclipseState) :
|
||||
m_eclipseState( eclipseState )
|
||||
{ }
|
||||
|
||||
|
||||
void apply(std::vector<double>& values) const {
|
||||
void apply(std::vector<double>& values, const Deck& m_deck, const EclipseState& m_eclipseState ) const {
|
||||
EclipseGridConstPtr grid = m_eclipseState.getEclipseGrid();
|
||||
size_t layerSize = grid->getNX() * grid->getNY();
|
||||
size_t gridSize = grid->getCartesianSize();
|
||||
@@ -64,23 +60,15 @@ namespace Opm {
|
||||
values[globalIndex] = values[globalIndex - layerSize];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
const EclipseState& m_eclipseState;
|
||||
};
|
||||
|
||||
/*-----------------------------------------------------------------*/
|
||||
|
||||
class InitPORV : public GridPropertyBasePostProcessor<double>
|
||||
class InitPORV : public GridPropertyBaseInitializer<double>
|
||||
{
|
||||
public:
|
||||
InitPORV(const EclipseState& eclipseState) :
|
||||
m_eclipseState( eclipseState )
|
||||
{ }
|
||||
|
||||
|
||||
void apply(std::vector<double>& values) const {
|
||||
void apply(std::vector<double>& values, const Deck& m_deck, const EclipseState& m_eclipseState ) const {
|
||||
EclipseGridConstPtr grid = m_eclipseState.getEclipseGrid();
|
||||
/*
|
||||
Observe that this apply method does not alter the
|
||||
@@ -113,13 +101,7 @@ namespace Opm {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
const EclipseState& m_eclipseState;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -461,8 +443,8 @@ namespace Opm {
|
||||
|
||||
std::shared_ptr<const GridProperty<double> > EclipseState::getDoubleGridProperty( const std::string& keyword ) const {
|
||||
auto gridProperty = m_doubleGridProperties->getKeyword( keyword );
|
||||
if (gridProperty->postProcessorRunRequired())
|
||||
gridProperty->runPostProcessor();
|
||||
|
||||
gridProperty->runPostProcessor();
|
||||
|
||||
return gridProperty;
|
||||
}
|
||||
@@ -528,45 +510,45 @@ namespace Opm {
|
||||
|
||||
static std::vector< GridProperties< double >::SupportedKeywordInfo >
|
||||
makeSupportedDoubleKeywords(const Deck& deck, const EclipseState& es) {
|
||||
const auto SGLLookup = std::make_shared<SGLEndpointInitializer<>>(deck, es);
|
||||
const auto ISGLLookup = std::make_shared<ISGLEndpointInitializer<>>(deck, es);
|
||||
const auto SWLLookup = std::make_shared<SWLEndpointInitializer<>>(deck, es);
|
||||
const auto ISWLLookup = std::make_shared<ISWLEndpointInitializer<>>(deck, es);
|
||||
const auto SGULookup = std::make_shared<SGUEndpointInitializer<>>(deck, es);
|
||||
const auto ISGULookup = std::make_shared<ISGUEndpointInitializer<>>(deck, es);
|
||||
const auto SWULookup = std::make_shared<SWUEndpointInitializer<>>(deck, es);
|
||||
const auto ISWULookup = std::make_shared<ISWUEndpointInitializer<>>(deck, es);
|
||||
const auto SGCRLookup = std::make_shared<SGCREndpointInitializer<>>(deck, es);
|
||||
const auto ISGCRLookup = std::make_shared<ISGCREndpointInitializer<>>(deck, es);
|
||||
const auto SOWCRLookup = std::make_shared<SOWCREndpointInitializer<>>(deck, es);
|
||||
const auto ISOWCRLookup = std::make_shared<ISOWCREndpointInitializer<>>(deck, es);
|
||||
const auto SOGCRLookup = std::make_shared<SOGCREndpointInitializer<>>(deck, es);
|
||||
const auto ISOGCRLookup = std::make_shared<ISOGCREndpointInitializer<>>(deck, es);
|
||||
const auto SWCRLookup = std::make_shared<SWCREndpointInitializer<>>(deck, es);
|
||||
const auto ISWCRLookup = std::make_shared<ISWCREndpointInitializer<>>(deck, es);
|
||||
GridPropertyFunction< double > SGLLookup ( std::make_shared<SGLEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISGLLookup ( std::make_shared<ISGLEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SWLLookup ( std::make_shared<SWLEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISWLLookup ( std::make_shared<ISWLEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SGULookup ( std::make_shared<SGUEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISGULookup ( std::make_shared<ISGUEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SWULookup ( std::make_shared<SWUEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISWULookup ( std::make_shared<ISWUEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SGCRLookup ( std::make_shared<SGCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISGCRLookup ( std::make_shared<ISGCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SOWCRLookup ( std::make_shared<SOWCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISOWCRLookup ( std::make_shared<ISOWCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SOGCRLookup ( std::make_shared<SOGCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISOGCRLookup ( std::make_shared<ISOGCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > SWCRLookup ( std::make_shared<SWCREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > ISWCRLookup ( std::make_shared<ISWCREndpointInitializer>(), &deck, &es );
|
||||
|
||||
const auto PCWLookup = std::make_shared<PCWEndpointInitializer<>>(deck, es);
|
||||
const auto IPCWLookup = std::make_shared<IPCWEndpointInitializer<>>(deck, es);
|
||||
const auto PCGLookup = std::make_shared<PCGEndpointInitializer<>>(deck, es);
|
||||
const auto IPCGLookup = std::make_shared<IPCGEndpointInitializer<>>(deck, es);
|
||||
const auto KRWLookup = std::make_shared<KRWEndpointInitializer<>>(deck, es);
|
||||
const auto IKRWLookup = std::make_shared<IKRWEndpointInitializer<>>(deck, es);
|
||||
const auto KRWRLookup = std::make_shared<KRWREndpointInitializer<>>(deck, es);
|
||||
const auto IKRWRLookup = std::make_shared<IKRWREndpointInitializer<>>(deck, es);
|
||||
const auto KROLookup = std::make_shared<KROEndpointInitializer<>>(deck, es);
|
||||
const auto IKROLookup = std::make_shared<IKROEndpointInitializer<>>(deck, es);
|
||||
const auto KRORWLookup = std::make_shared<KRORWEndpointInitializer<>>(deck, es);
|
||||
const auto IKRORWLookup = std::make_shared<IKRORWEndpointInitializer<>>(deck, es);
|
||||
const auto KRORGLookup = std::make_shared<KRORGEndpointInitializer<>>(deck, es);
|
||||
const auto IKRORGLookup = std::make_shared<IKRORGEndpointInitializer<>>(deck, es);
|
||||
const auto KRGLookup = std::make_shared<KRGEndpointInitializer<>>(deck, es);
|
||||
const auto IKRGLookup = std::make_shared<IKRGEndpointInitializer<>>(deck, es);
|
||||
const auto KRGRLookup = std::make_shared<KRGREndpointInitializer<>>(deck, es);
|
||||
const auto IKRGRLookup = std::make_shared<IKRGREndpointInitializer<>>(deck, es);
|
||||
GridPropertyFunction< double > PCWLookup ( std::make_shared<PCWEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IPCWLookup ( std::make_shared<IPCWEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > PCGLookup ( std::make_shared<PCGEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IPCGLookup ( std::make_shared<IPCGEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KRWLookup ( std::make_shared<KRWEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKRWLookup ( std::make_shared<IKRWEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KRWRLookup ( std::make_shared<KRWREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKRWRLookup ( std::make_shared<IKRWREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KROLookup ( std::make_shared<KROEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKROLookup ( std::make_shared<IKROEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KRORWLookup ( std::make_shared<KRORWEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKRORWLookup ( std::make_shared<IKRORWEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KRORGLookup ( std::make_shared<KRORGEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKRORGLookup ( std::make_shared<IKRORGEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KRGLookup ( std::make_shared<KRGEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKRGLookup ( std::make_shared<IKRGEndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > KRGRLookup ( std::make_shared<KRGREndpointInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > IKRGRLookup ( std::make_shared<IKRGREndpointInitializer>(), &deck, &es );
|
||||
|
||||
const auto tempLookup = std::make_shared<GridPropertyTemperatureLookupInitializer>(deck, es);
|
||||
const auto distributeTopLayer = std::make_shared<GridPropertyPostProcessor::DistributeTopLayer>(es);
|
||||
const auto initPORV = std::make_shared<GridPropertyPostProcessor::InitPORV>(es);
|
||||
GridPropertyFunction< double > tempLookup ( std::make_shared<GridPropertyTemperatureLookupInitializer>(), &deck, &es );
|
||||
GridPropertyFunction< double > initPORV ( std::make_shared<GridPropertyPostProcessor::InitPORV>(), &deck, &es );
|
||||
GridPropertyFunction< double > distributeTopLayer ( std::make_shared<GridPropertyPostProcessor::DistributeTopLayer>(), &deck, &es );
|
||||
|
||||
std::vector< GridProperties< double >::SupportedKeywordInfo > supportedDoubleKeywords;
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/GridProperty.hpp>
|
||||
#include <opm/parser/eclipse/OpmLog/OpmLog.hpp>
|
||||
#include <opm/parser/eclipse/OpmLog/LogUtil.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/OpmLog/OpmLog.hpp>
|
||||
#include <opm/parser/eclipse/OpmLog/LogUtil.hpp>
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace Opm {
|
||||
template< typename T >
|
||||
GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
std::shared_ptr< Initializer > initializer,
|
||||
std::shared_ptr< PostProcessor > postProcessor,
|
||||
GridPropertyFunction< T > initializer,
|
||||
GridPropertyFunction< T > postProcessor,
|
||||
const std::string& dimString ) :
|
||||
m_keywordName( name ),
|
||||
m_initializer( initializer ),
|
||||
@@ -46,7 +46,7 @@ namespace Opm {
|
||||
template< typename T >
|
||||
GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
std::shared_ptr< Initializer > initializer,
|
||||
GridPropertyFunction< T > initializer,
|
||||
const std::string& dimString ) :
|
||||
m_keywordName(name),
|
||||
m_initializer(initializer),
|
||||
@@ -59,7 +59,9 @@ namespace Opm {
|
||||
const T defaultValue,
|
||||
const std::string& dimString ) :
|
||||
m_keywordName( name ),
|
||||
m_initializer( new Opm::GridPropertyConstantInitializer< T >(defaultValue) ),
|
||||
m_initializer( GridPropertyFunction< T >(
|
||||
std::make_shared< GridPropertyConstantInitializer< T > >( defaultValue ),
|
||||
nullptr, nullptr ) ),
|
||||
m_dimensionString( dimString )
|
||||
{}
|
||||
|
||||
@@ -67,10 +69,12 @@ namespace Opm {
|
||||
GridPropertySupportedKeywordInfo< T >::GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
const T defaultValue,
|
||||
std::shared_ptr< PostProcessor > postProcessor,
|
||||
GridPropertyFunction< T > postProcessor,
|
||||
const std::string& dimString ) :
|
||||
m_keywordName( name ),
|
||||
m_initializer( new Opm::GridPropertyConstantInitializer< T >(defaultValue)),
|
||||
m_initializer( GridPropertyFunction< T >(
|
||||
std::make_shared< GridPropertyConstantInitializer< T > >( defaultValue ),
|
||||
nullptr, nullptr ) ),
|
||||
m_postProcessor( postProcessor ),
|
||||
m_dimensionString( dimString )
|
||||
{}
|
||||
@@ -86,20 +90,13 @@ namespace Opm {
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
typename GridPropertySupportedKeywordInfo< T >::Initializer*
|
||||
GridPropertySupportedKeywordInfo< T >::getInitializer() {
|
||||
return this->m_initializer.get();
|
||||
const GridPropertyFunction< T >& GridPropertySupportedKeywordInfo< T >::initializer() const {
|
||||
return this->m_initializer;
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
typename GridPropertySupportedKeywordInfo< T >::PostProcessor*
|
||||
GridPropertySupportedKeywordInfo< T >::getPostProcessor() {
|
||||
return this->m_postProcessor.get();
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
bool GridPropertySupportedKeywordInfo< T >::hasPostProcessor() const {
|
||||
return bool( this->m_postProcessor );
|
||||
const GridPropertyFunction< T >& GridPropertySupportedKeywordInfo< T >::postProcessor() const {
|
||||
return this->m_postProcessor;
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
@@ -110,7 +107,7 @@ namespace Opm {
|
||||
m_kwInfo( kwInfo ),
|
||||
m_data( nx * ny * nz )
|
||||
{
|
||||
m_kwInfo.getInitializer()->apply(m_data);
|
||||
m_kwInfo.initializer()(m_data);
|
||||
m_hasRunPostProcessor = false;
|
||||
}
|
||||
|
||||
@@ -326,23 +323,12 @@ namespace Opm {
|
||||
return m_kwInfo;
|
||||
}
|
||||
|
||||
|
||||
template< typename T >
|
||||
bool GridProperty< T >::postProcessorRunRequired() {
|
||||
return m_kwInfo.hasPostProcessor() && !m_hasRunPostProcessor;
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
void GridProperty< T >::runPostProcessor() {
|
||||
if (postProcessorRunRequired()) {
|
||||
// This is set here before the post processor has actually
|
||||
// completed; this is to protect against circular loops if
|
||||
// the post processor itself calls for the same grid
|
||||
// property.
|
||||
m_hasRunPostProcessor = true;
|
||||
auto postProcessor = m_kwInfo.getPostProcessor();
|
||||
postProcessor->apply( m_data );
|
||||
}
|
||||
if( this->m_hasRunPostProcessor ) return;
|
||||
|
||||
this->m_hasRunPostProcessor = true;
|
||||
this->m_kwInfo.postProcessor()( m_data );
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
|
||||
@@ -42,21 +42,18 @@ namespace Opm {
|
||||
template< typename T >
|
||||
class GridPropertySupportedKeywordInfo {
|
||||
|
||||
typedef GridPropertyBaseInitializer< T > Initializer;
|
||||
typedef GridPropertyBasePostProcessor< T > PostProcessor;
|
||||
|
||||
public:
|
||||
GridPropertySupportedKeywordInfo() = default;
|
||||
|
||||
GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
std::shared_ptr< Initializer > initializer,
|
||||
std::shared_ptr< PostProcessor > postProcessor,
|
||||
GridPropertyFunction< T > initializer,
|
||||
GridPropertyFunction< T > postProcessor,
|
||||
const std::string& dimString );
|
||||
|
||||
GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
std::shared_ptr< Initializer > initializer,
|
||||
GridPropertyFunction< T > initializer,
|
||||
const std::string& dimString);
|
||||
|
||||
/* this is a convenience constructor which can be used if the default
|
||||
@@ -70,19 +67,18 @@ class GridPropertySupportedKeywordInfo {
|
||||
GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
const T defaultValue,
|
||||
std::shared_ptr< PostProcessor > postProcessor,
|
||||
GridPropertyFunction< T > postProcessor,
|
||||
const std::string& dimString );
|
||||
|
||||
const std::string& getKeywordName() const;
|
||||
const std::string& getDimensionString() const;
|
||||
Initializer* getInitializer();
|
||||
PostProcessor* getPostProcessor();
|
||||
bool hasPostProcessor() const;
|
||||
const GridPropertyFunction< T >& initializer() const;
|
||||
const GridPropertyFunction< T >& postProcessor() const;
|
||||
|
||||
private:
|
||||
std::string m_keywordName;
|
||||
std::shared_ptr< Initializer > m_initializer;
|
||||
std::shared_ptr< PostProcessor > m_postProcessor;
|
||||
GridPropertyFunction< T > m_initializer;
|
||||
GridPropertyFunction< T > m_postProcessor;
|
||||
std::string m_dimensionString;
|
||||
};
|
||||
|
||||
@@ -135,7 +131,6 @@ public:
|
||||
const std::string& getKeywordName() const;
|
||||
const SupportedKeywordInfo& getKeywordInfo() const;
|
||||
|
||||
bool postProcessorRunRequired();
|
||||
void runPostProcessor();
|
||||
|
||||
ERT::EclKW<T> getEclKW() const;
|
||||
@@ -155,7 +150,7 @@ private:
|
||||
size_t m_nx,m_ny,m_nz;
|
||||
SupportedKeywordInfo m_kwInfo;
|
||||
std::vector<T> m_data;
|
||||
bool m_hasRunPostProcessor;
|
||||
bool m_hasRunPostProcessor = false;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -13,11 +13,17 @@
|
||||
namespace Opm {
|
||||
|
||||
template< typename T >
|
||||
void GridPropertyConstantInitializer< T >::apply(std::vector< T >& values) const {
|
||||
void GridPropertyConstantInitializer< T >::apply(
|
||||
std::vector< T >& values,
|
||||
const Deck&,
|
||||
const EclipseState& ) const {
|
||||
std::fill(values.begin(), values.end(), m_value);
|
||||
}
|
||||
|
||||
void GridPropertyTemperatureLookupInitializer::apply(std::vector<double>& values) const
|
||||
void GridPropertyTemperatureLookupInitializer::apply(
|
||||
std::vector<double>& values,
|
||||
const Deck& m_deck,
|
||||
const EclipseState& m_eclipseState ) const
|
||||
{
|
||||
if (!m_deck.hasKeyword("EQLNUM")) {
|
||||
// if values are defaulted in the TEMPI keyword, but no
|
||||
@@ -39,6 +45,23 @@ namespace Opm {
|
||||
values[cellIdx] = rtempvdTable.evaluate("Temperature", cellDepth);
|
||||
}
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
GridPropertyFunction< T >::GridPropertyFunction(
|
||||
std::shared_ptr< GridPropertyBaseInitializer< T > > fn,
|
||||
const Deck* d,
|
||||
const EclipseState* state ) :
|
||||
f( fn ), deck( d ), es( state )
|
||||
{}
|
||||
|
||||
|
||||
template< typename T >
|
||||
std::vector< T >& GridPropertyFunction< T >::operator()( std::vector< T >& values ) const {
|
||||
if( !this->f ) return values;
|
||||
|
||||
this->f->apply( values, *this->deck, *this->es );
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
||||
template class Opm::GridPropertyConstantInitializer< int >;
|
||||
@@ -46,5 +69,6 @@ template class Opm::GridPropertyConstantInitializer< double >;
|
||||
|
||||
template class Opm::GridPropertyBaseInitializer< int >;
|
||||
template class Opm::GridPropertyBaseInitializer< double >;
|
||||
template class Opm::GridPropertyBasePostProcessor< int >;
|
||||
template class Opm::GridPropertyBasePostProcessor< double >;
|
||||
|
||||
template class Opm::GridPropertyFunction< int >;
|
||||
template class Opm::GridPropertyFunction< double >;
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
*/
|
||||
namespace Opm {
|
||||
|
||||
// forward definitions
|
||||
class Deck;
|
||||
class EclipseState;
|
||||
|
||||
@@ -40,20 +39,9 @@ protected:
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual void apply(std::vector<ValueType>& values) const = 0;
|
||||
virtual void apply(std::vector<ValueType>& values, const Deck&, const EclipseState& ) const = 0;
|
||||
};
|
||||
|
||||
template <class ValueType>
|
||||
class GridPropertyBasePostProcessor
|
||||
{
|
||||
protected:
|
||||
GridPropertyBasePostProcessor() { }
|
||||
|
||||
public:
|
||||
virtual void apply(std::vector<ValueType>& values) const = 0;
|
||||
};
|
||||
|
||||
|
||||
template <class ValueType>
|
||||
class GridPropertyConstantInitializer
|
||||
: public GridPropertyBaseInitializer<ValueType>
|
||||
@@ -63,7 +51,7 @@ public:
|
||||
: m_value(value)
|
||||
{ }
|
||||
|
||||
void apply(std::vector<ValueType>& values) const;
|
||||
void apply(std::vector<ValueType>& values, const Deck&, const EclipseState& ) const;
|
||||
|
||||
private:
|
||||
ValueType m_value;
|
||||
@@ -75,16 +63,24 @@ class GridPropertyTemperatureLookupInitializer
|
||||
: public GridPropertyBaseInitializer<double>
|
||||
{
|
||||
public:
|
||||
GridPropertyTemperatureLookupInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: m_deck(deck)
|
||||
, m_eclipseState(eclipseState)
|
||||
{ }
|
||||
void apply(std::vector<double>& values, const Deck&, const EclipseState& ) const;
|
||||
};
|
||||
|
||||
void apply(std::vector<double>& values) const;
|
||||
template< typename T >
|
||||
class GridPropertyFunction {
|
||||
public:
|
||||
GridPropertyFunction() = default;
|
||||
|
||||
private:
|
||||
const Deck& m_deck;
|
||||
const EclipseState& m_eclipseState;
|
||||
GridPropertyFunction( std::shared_ptr< GridPropertyBaseInitializer< T > >,
|
||||
const Deck*,
|
||||
const EclipseState* );
|
||||
|
||||
std::vector< T >& operator()( std::vector< T >& ) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr< GridPropertyBaseInitializer< T > > f;
|
||||
const Deck* deck = nullptr;
|
||||
const EclipseState* es = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -47,17 +47,10 @@ class EnptvdTable;
|
||||
class ImptvdTable;
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class EndpointInitializer
|
||||
: public GridPropertyBaseInitializer<double>
|
||||
{
|
||||
public:
|
||||
EndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: m_deck(deck)
|
||||
, m_eclipseState(eclipseState)
|
||||
{ }
|
||||
|
||||
enum SaturationFunctionFamily { noFamily = 0, FamilyI = 1, FamilyII = 2};
|
||||
|
||||
/*
|
||||
@@ -81,7 +74,7 @@ protected:
|
||||
*/
|
||||
|
||||
|
||||
void findSaturationEndpoints( ) const {
|
||||
void findSaturationEndpoints( const EclipseState& m_eclipseState ) const {
|
||||
auto tables = m_eclipseState.getTableManager();
|
||||
auto tabdims = tables->getTabdims();
|
||||
size_t numSatTables = tabdims->getNumSatTables();
|
||||
@@ -90,7 +83,7 @@ protected:
|
||||
m_minGasSat.resize( numSatTables , 0 );
|
||||
m_maxGasSat.resize( numSatTables , 0 );
|
||||
|
||||
switch (getSaturationFunctionFamily()) {
|
||||
switch (getSaturationFunctionFamily( m_eclipseState )) {
|
||||
case SaturationFunctionFamily::FamilyI:
|
||||
{
|
||||
const TableContainer& swofTables = tables->getSwofTables();
|
||||
@@ -145,7 +138,7 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
void findCriticalPoints( ) const {
|
||||
void findCriticalPoints( const EclipseState& m_eclipseState ) const {
|
||||
auto tables = m_eclipseState.getTableManager();
|
||||
auto tabdims = tables->getTabdims();
|
||||
size_t numSatTables = tabdims->getNumSatTables();
|
||||
@@ -155,7 +148,7 @@ protected:
|
||||
m_criticalOilOGSat.resize( numSatTables , 0 );
|
||||
m_criticalOilOWSat.resize( numSatTables , 0 );
|
||||
|
||||
switch (getSaturationFunctionFamily()) {
|
||||
switch (getSaturationFunctionFamily( m_eclipseState )) {
|
||||
case SaturationFunctionFamily::FamilyI:
|
||||
{
|
||||
const TableContainer& swofTables = tables->getSwofTables();
|
||||
@@ -321,7 +314,7 @@ protected:
|
||||
|
||||
}
|
||||
|
||||
void findVerticalPoints( ) const {
|
||||
void findVerticalPoints( const EclipseState& m_eclipseState ) const {
|
||||
auto tables = m_eclipseState.getTableManager();
|
||||
auto tabdims = tables->getTabdims();
|
||||
size_t numSatTables = tabdims->getNumSatTables();
|
||||
@@ -336,7 +329,7 @@ protected:
|
||||
m_maxKrw.resize( numSatTables , 0 );
|
||||
m_krwr.resize( numSatTables , 0 );
|
||||
|
||||
switch (getSaturationFunctionFamily()) {
|
||||
switch (getSaturationFunctionFamily( m_eclipseState )) {
|
||||
case SaturationFunctionFamily::FamilyI:
|
||||
{
|
||||
const TableContainer& swofTables = tables->getSwofTables();
|
||||
@@ -436,8 +429,8 @@ protected:
|
||||
// If SWOF and SGOF are specified in the deck it return FamilyI
|
||||
// If SWFN, SGFN and SOF3 are specified in the deck it return FamilyII
|
||||
// If keywords are missing or mixed, an error is given.
|
||||
SaturationFunctionFamily getSaturationFunctionFamily() const{
|
||||
auto tables = m_eclipseState.getTableManager( );
|
||||
SaturationFunctionFamily getSaturationFunctionFamily( const EclipseState& m_eclipseState ) const{
|
||||
auto tables = m_eclipseState.getTableManager();
|
||||
const TableContainer& swofTables = tables->getSwofTables();
|
||||
const TableContainer& sgofTables = tables->getSgofTables();
|
||||
const TableContainer& slgofTables = tables->getSlgofTables();
|
||||
@@ -496,9 +489,6 @@ protected:
|
||||
return value;
|
||||
}
|
||||
|
||||
const Deck& m_deck;
|
||||
const EclipseState& m_eclipseState;
|
||||
|
||||
mutable std::vector<double> m_criticalGasSat;
|
||||
mutable std::vector<double> m_criticalWaterSat;
|
||||
mutable std::vector<double> m_criticalOilOWSat;
|
||||
@@ -521,47 +511,42 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SatnumEndpointInitializer
|
||||
: public EndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SatnumEndpointInitializer : public EndpointInitializer {
|
||||
public:
|
||||
SatnumEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: EndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& ) const = 0;
|
||||
void apply(std::vector<double>&, const Deck&, const EclipseState& ) const = 0;
|
||||
|
||||
|
||||
void satnumApply( std::vector<double>& values,
|
||||
const std::string& columnName,
|
||||
const std::vector<double>& fallbackValues,
|
||||
bool useOneMinusTableValue) const
|
||||
const Deck& m_deck,
|
||||
const EclipseState& m_eclipseState,
|
||||
bool useOneMinusTableValue
|
||||
) const
|
||||
{
|
||||
auto eclipseGrid = this->m_eclipseState.getEclipseGrid();
|
||||
auto tables = this->m_eclipseState.getTableManager();
|
||||
auto eclipseGrid = m_eclipseState.getEclipseGrid();
|
||||
auto tables = m_eclipseState.getTableManager();
|
||||
auto tabdims = tables->getTabdims();
|
||||
auto satnum = this->m_eclipseState.getIntGridProperty("SATNUM");
|
||||
auto endnum = this->m_eclipseState.getIntGridProperty("ENDNUM");
|
||||
auto satnum = m_eclipseState.getIntGridProperty("SATNUM");
|
||||
auto endnum = m_eclipseState.getIntGridProperty("ENDNUM");
|
||||
int numSatTables = tabdims->getNumSatTables();
|
||||
|
||||
|
||||
satnum->checkLimits(1 , numSatTables);
|
||||
|
||||
// All table lookup assumes three-phase model
|
||||
assert( this->m_eclipseState.getNumPhases() == 3 );
|
||||
assert( m_eclipseState.getNumPhases() == 3 );
|
||||
|
||||
this->findSaturationEndpoints( );
|
||||
this->findCriticalPoints( );
|
||||
this->findVerticalPoints( );
|
||||
this->findSaturationEndpoints( m_eclipseState );
|
||||
this->findCriticalPoints( m_eclipseState );
|
||||
this->findVerticalPoints( m_eclipseState );
|
||||
|
||||
// acctually assign the defaults. if the ENPVD keyword was specified in the deck,
|
||||
// this currently cannot be done because we would need the Z-coordinate of the
|
||||
// cell and we would need to know how the simulator wants to interpolate between
|
||||
// sampling points. Both of these are outside the scope of opm-parser, so we just
|
||||
// assign a NaN in this case...
|
||||
bool useEnptvd = this->m_deck.hasKeyword("ENPTVD");
|
||||
bool useEnptvd = m_deck.hasKeyword("ENPTVD");
|
||||
const auto& enptvdTables = tables->getEnptvdTables();
|
||||
for (size_t cellIdx = 0; cellIdx < eclipseGrid->getCartesianSize(); cellIdx++) {
|
||||
int satTableIdx = satnum->iget( cellIdx ) - 1;
|
||||
@@ -581,42 +566,38 @@ public:
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ImbnumEndpointInitializer
|
||||
: public EndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ImbnumEndpointInitializer : public EndpointInitializer {
|
||||
public:
|
||||
ImbnumEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: EndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& ) const = 0;
|
||||
void apply(std::vector<double>&, const Deck&, const EclipseState& ) const = 0;
|
||||
|
||||
void imbnumApply( std::vector<double>& values,
|
||||
const std::string& columnName,
|
||||
const std::vector<double>& fallBackValues ,
|
||||
bool useOneMinusTableValue) const
|
||||
const Deck& m_deck,
|
||||
const EclipseState& m_eclipseState,
|
||||
bool useOneMinusTableValue
|
||||
) const
|
||||
{
|
||||
auto eclipseGrid = this->m_eclipseState.getEclipseGrid();
|
||||
auto tables = this->m_eclipseState.getTableManager();
|
||||
auto imbnum = this->m_eclipseState.getIntGridProperty("IMBNUM");
|
||||
auto endnum = this->m_eclipseState.getIntGridProperty("ENDNUM");
|
||||
auto eclipseGrid = m_eclipseState.getEclipseGrid();
|
||||
auto tables = m_eclipseState.getTableManager();
|
||||
auto imbnum = m_eclipseState.getIntGridProperty("IMBNUM");
|
||||
auto endnum = m_eclipseState.getIntGridProperty("ENDNUM");
|
||||
|
||||
auto tabdims = tables->getTabdims();
|
||||
int numSatTables = tabdims->getNumSatTables();
|
||||
|
||||
imbnum->checkLimits(1 , numSatTables);
|
||||
this->findSaturationEndpoints( );
|
||||
this->findCriticalPoints( );
|
||||
this->findVerticalPoints( );
|
||||
this->findSaturationEndpoints( m_eclipseState );
|
||||
this->findCriticalPoints( m_eclipseState );
|
||||
this->findVerticalPoints( m_eclipseState );
|
||||
|
||||
// acctually assign the defaults. if the ENPVD keyword was specified in the deck,
|
||||
// this currently cannot be done because we would need the Z-coordinate of the
|
||||
// cell and we would need to know how the simulator wants to interpolate between
|
||||
// sampling points. Both of these are outside the scope of opm-parser, so we just
|
||||
// assign a NaN in this case...
|
||||
bool useImptvd = this->m_deck.hasKeyword("IMPTVD");
|
||||
bool useImptvd = m_deck.hasKeyword("IMPTVD");
|
||||
const TableContainer& imptvdTables = tables->getImptvdTables();
|
||||
for (size_t cellIdx = 0; cellIdx < eclipseGrid->getCartesianSize(); cellIdx++) {
|
||||
int imbTableIdx = imbnum->iget( cellIdx ) - 1;
|
||||
@@ -636,614 +617,346 @@ public:
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SGLEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SGLEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SGLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SGCO" , this->m_minGasSat , false);
|
||||
this->satnumApply(values , "SGCO" , this->m_minGasSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISGLEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISGLEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISGLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SGCO" , this->m_minGasSat , false);
|
||||
this->imbnumApply(values , "SGCO" , this->m_minGasSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SGUEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SGUEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SGUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SGMAX" , this->m_maxGasSat, false);
|
||||
this->satnumApply(values , "SGMAX" , this->m_maxGasSat, deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISGUEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISGUEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISGUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SGMAX" , this->m_maxGasSat , false);
|
||||
this->imbnumApply(values , "SGMAX" , this->m_maxGasSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SWLEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SWLEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SWLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SWCO" , this->m_minWaterSat , false);
|
||||
this->satnumApply(values , "SWCO" , this->m_minWaterSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISWLEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISWLEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISWLEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SWCO" , this->m_minWaterSat , false);
|
||||
this->imbnumApply(values , "SWCO" , this->m_minWaterSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SWUEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SWUEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SWUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SWMAX" , this->m_maxWaterSat , true);
|
||||
this->satnumApply(values , "SWMAX" , this->m_maxWaterSat , deck, es, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISWUEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISWUEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISWUEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SWMAX" , this->m_maxWaterSat , true);
|
||||
this->imbnumApply(values , "SWMAX" , this->m_maxWaterSat , deck, es, true);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SGCREndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SGCREndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SGCRIT" , this->m_criticalGasSat , false);
|
||||
this->satnumApply(values , "SGCRIT" , this->m_criticalGasSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISGCREndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISGCREndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SGCRIT" , this->m_criticalGasSat , false);
|
||||
this->imbnumApply(values , "SGCRIT" , this->m_criticalGasSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SOWCREndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SOWCREndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SOWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SOWCRIT", this->m_criticalOilOWSat , false);
|
||||
this->satnumApply(values , "SOWCRIT", this->m_criticalOilOWSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISOWCREndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
class ISOWCREndpointInitializer : public ImbnumEndpointInitializer
|
||||
{
|
||||
public:
|
||||
ISOWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SOWCRIT" , this->m_criticalOilOWSat , false);
|
||||
this->imbnumApply(values , "SOWCRIT" , this->m_criticalOilOWSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SOGCREndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SOGCREndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SOGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SOGCRIT" , this->m_criticalOilOGSat , false);
|
||||
this->satnumApply(values , "SOGCRIT" , this->m_criticalOilOGSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISOGCREndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISOGCREndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISOGCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SOGCRIT" , this->m_criticalOilOGSat , false);
|
||||
this->imbnumApply(values , "SOGCRIT" , this->m_criticalOilOGSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class SWCREndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class SWCREndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
SWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "SWCRIT" , this->m_criticalWaterSat , false);
|
||||
this->satnumApply(values , "SWCRIT" , this->m_criticalWaterSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class ISWCREndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class ISWCREndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
ISWCREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "SWCRIT" , this->m_criticalWaterSat , false);
|
||||
this->imbnumApply(values , "SWCRIT" , this->m_criticalWaterSat , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class PCWEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class PCWEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
PCWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "PCW" , this->m_maxPcow , false);
|
||||
this->satnumApply(values , "PCW" , this->m_maxPcow , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IPCWEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IPCWEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IPCWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IPCW" , this->m_maxPcow , false);
|
||||
this->imbnumApply(values , "IPCW" , this->m_maxPcow , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class PCGEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class PCGEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
PCGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "PCG" , this->m_maxPcog , false);
|
||||
this->satnumApply(values , "PCG" , this->m_maxPcog , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IPCGEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IPCGEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IPCGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IPCG" , this->m_maxPcog , false);
|
||||
this->imbnumApply(values , "IPCG" , this->m_maxPcog , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KRWEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KRWEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KRWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRW" , this->m_maxKrw , false);
|
||||
this->satnumApply(values , "KRW" , this->m_maxKrw , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKRWEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKRWEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKRWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRW" , this->m_maxKrw , false);
|
||||
this->imbnumApply(values , "IKRW" , this->m_maxKrw , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KRWREndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KRWREndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KRWREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRWR" , this->m_krwr , false);
|
||||
this->satnumApply(values , "KRWR" , this->m_krwr , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKRWREndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKRWREndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKRWREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRWR" , this->m_krwr , false);
|
||||
this->imbnumApply(values , "IKRWR" , this->m_krwr , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KROEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KROEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KROEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRO" , this->m_maxKro , false);
|
||||
this->satnumApply(values , "KRO" , this->m_maxKro , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKROEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKROEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKROEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRO" , this->m_maxKro , false);
|
||||
this->imbnumApply(values , "IKRO" , this->m_maxKro , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KRORWEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KRORWEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KRORWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRORW" , this->m_krorw , false);
|
||||
this->satnumApply(values , "KRORW" , this->m_krorw , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKRORWEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKRORWEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKRORWEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRORW" , this->m_krorw , false);
|
||||
this->imbnumApply(values , "IKRORW" , this->m_krorw , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KRORGEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KRORGEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KRORGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRORG" , this->m_krorg , false);
|
||||
this->satnumApply(values , "KRORG" , this->m_krorg , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKRORGEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKRORGEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKRORGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRORG" , this->m_krorg , false);
|
||||
this->imbnumApply(values , "IKRORG" , this->m_krorg , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KRGEndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KRGEndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KRGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRG" , this->m_maxKrg , false);
|
||||
this->satnumApply(values , "KRG" , this->m_maxKrg , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKRGEndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKRGEndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKRGEndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRG" , this->m_maxKrg , false);
|
||||
this->imbnumApply(values , "IKRG" , this->m_maxKrg , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class KRGREndpointInitializer
|
||||
: public SatnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class KRGREndpointInitializer : public SatnumEndpointInitializer {
|
||||
public:
|
||||
KRGREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: SatnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->satnumApply(values , "KRGR" , this->m_krgr , false);
|
||||
this->satnumApply(values , "KRGR" , this->m_krgr , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class EclipseState=Opm::EclipseState,
|
||||
class Deck=Opm::Deck>
|
||||
class IKRGREndpointInitializer
|
||||
: public ImbnumEndpointInitializer<EclipseState,Deck>
|
||||
{
|
||||
class IKRGREndpointInitializer : public ImbnumEndpointInitializer {
|
||||
public:
|
||||
IKRGREndpointInitializer(const Deck& deck, const EclipseState& eclipseState)
|
||||
: ImbnumEndpointInitializer<EclipseState,Deck>( deck , eclipseState )
|
||||
{ }
|
||||
|
||||
void apply(std::vector<double>& values) const
|
||||
void apply(std::vector<double>& values, const Deck& deck, const EclipseState& es ) const
|
||||
{
|
||||
this->imbnumApply(values , "IKRGR" , this->m_krgr , false);
|
||||
this->imbnumApply(values , "IKRGR" , this->m_krgr , deck, es, false);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -384,14 +384,14 @@ BOOST_AUTO_TEST_CASE(GridPropertyInitialization) {
|
||||
}
|
||||
|
||||
template <class ValueType>
|
||||
class TestPostProcessorMul : public Opm::GridPropertyBasePostProcessor<ValueType>
|
||||
class TestPostProcessorMul : public Opm::GridPropertyBaseInitializer<ValueType>
|
||||
{
|
||||
public:
|
||||
TestPostProcessorMul(ValueType factor) {
|
||||
m_factor = factor;
|
||||
}
|
||||
|
||||
void apply(std::vector<ValueType>& values) const {
|
||||
void apply(std::vector<ValueType>& values, const Opm::Deck&, const Opm::EclipseState& ) const {
|
||||
for (size_t g = 0; g < values.size(); g++)
|
||||
values[g] *= m_factor;
|
||||
};
|
||||
@@ -435,7 +435,7 @@ BOOST_AUTO_TEST_CASE(GridPropertyPostProcessors) {
|
||||
|
||||
typedef Opm::GridPropertySupportedKeywordInfo<double> SupportedKeywordInfo;
|
||||
SupportedKeywordInfo kwInfo1("MULTPV" , 1.0 , "1");
|
||||
SupportedKeywordInfo kwInfo2("PORO" , 1.0 , testPostP , "1");
|
||||
SupportedKeywordInfo kwInfo2("PORO" , 1.0 , Opm::GridPropertyFunction< double >( testPostP, nullptr, nullptr ), "1");
|
||||
std::vector<SupportedKeywordInfo > supportedKeywords = { kwInfo1, kwInfo2 };
|
||||
Opm::DeckPtr deck = createDeck();
|
||||
std::shared_ptr<Opm::EclipseGrid> grid = std::make_shared<Opm::EclipseGrid>(deck);
|
||||
@@ -448,22 +448,16 @@ BOOST_AUTO_TEST_CASE(GridPropertyPostProcessors) {
|
||||
poro->loadFromDeckKeyword( deck->getKeyword("PORO" , 0));
|
||||
multpv->loadFromDeckKeyword( deck->getKeyword("MULTPV" , 0));
|
||||
|
||||
if (poro->postProcessorRunRequired())
|
||||
poro->runPostProcessor();
|
||||
|
||||
if (multpv->postProcessorRunRequired())
|
||||
multpv->runPostProcessor();
|
||||
poro->runPostProcessor();
|
||||
multpv->runPostProcessor();
|
||||
|
||||
for (size_t g = 0; g < 1000; g++) {
|
||||
BOOST_CHECK_EQUAL( multpv->iget(g) , 0.10 );
|
||||
BOOST_CHECK_EQUAL( poro->iget(g) , 0.20 );
|
||||
}
|
||||
|
||||
if (poro->postProcessorRunRequired())
|
||||
poro->runPostProcessor();
|
||||
|
||||
if (multpv->postProcessorRunRequired())
|
||||
multpv->runPostProcessor();
|
||||
poro->runPostProcessor();
|
||||
multpv->runPostProcessor();
|
||||
|
||||
for (size_t g = 0; g < 1000; g++) {
|
||||
BOOST_CHECK_EQUAL( multpv->iget(g) , 0.10 );
|
||||
@@ -471,10 +465,6 @@ BOOST_AUTO_TEST_CASE(GridPropertyPostProcessors) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
BOOST_CHECK( !kwInfo1.hasPostProcessor() );
|
||||
BOOST_CHECK( kwInfo2.hasPostProcessor() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user