GridProperty: Pass 'Defaulted' Flag to Post-Processor
This commit alters the post-processor API to accept a vector<bool> of defaulted flags (true if defaulted, false if explicitly assigned). This, in turn, enables running the post-processor only on defaulted (or assigned) property values. Update existing post-processor implementation to honour the new calling conventions.
This commit is contained in:
@@ -178,7 +178,7 @@ namespace Opm {
|
||||
/// this method exists for (friend) Eclipse3DProperties to be allowed initializing PORV and ACTNUM keyword
|
||||
void postAddKeyword(const std::string& name,
|
||||
const T defaultValue,
|
||||
std::function< void( std::vector< T >& ) > postProcessor,
|
||||
std::function< void( const std::vector<bool>& defaulted, std::vector< T >& ) > postProcessor,
|
||||
const std::string& dimString,
|
||||
const bool defaultInitializable );
|
||||
|
||||
|
||||
@@ -45,7 +45,10 @@ class GridPropertySupportedKeywordInfo {
|
||||
GridPropertySupportedKeywordInfo() = default;
|
||||
|
||||
using init = std::function< std::vector< T >( size_t ) >;
|
||||
using post = std::function< void( std::vector< T >& ) >;
|
||||
using post = std::function<
|
||||
void(const std::vector<bool>& defaulted,
|
||||
std::vector< T >&)
|
||||
>;
|
||||
|
||||
GridPropertySupportedKeywordInfo(
|
||||
const std::string& name,
|
||||
|
||||
Reference in New Issue
Block a user