Opm::HybridNewtonConfig Class Reference

Configuration for a Hybrid Newton ML model. More...

#include <HybridNewtonConfig.hpp>

Public Member Functions

 HybridNewtonConfig ()=default
 
 HybridNewtonConfig (const PropertyTree &model_config)
 Construct configuration from a PropertyTree. More...
 
bool hasInputFeature (const std::string &name) const
 
bool hasOutputFeature (const std::string &name) const
 
void validateConfig (bool compositionSwitchEnabled) const
 Validate feature compatibility with simulator settings. More...
 

Public Attributes

std::string model_path
 
std::string cell_indices_file
 
std::vector< int > cell_indices
 
std::size_t n_cells = 0
 
std::vector< double > apply_times
 
std::vector< std::pair< std::string, FeatureSpec > > input_features
 
std::vector< std::pair< std::string, FeatureSpec > > output_features
 

Detailed Description

Configuration for a Hybrid Newton ML model.

Encapsulates model path, cell indices, apply times, input/output features, and validation. Can be constructed from a PropertyTree.

Constructor & Destructor Documentation

◆ HybridNewtonConfig() [1/2]

Opm::HybridNewtonConfig::HybridNewtonConfig ( )
default

◆ HybridNewtonConfig() [2/2]

Opm::HybridNewtonConfig::HybridNewtonConfig ( const PropertyTree model_config)
inlineexplicit

Construct configuration from a PropertyTree.

Loads model path, cell indices, apply times, and features from the provided PropertyTree. Throws on missing or invalid entries.

References apply_times, cell_indices, cell_indices_file, Opm::PropertyTree::get(), Opm::PropertyTree::get_child_optional(), input_features, model_path, n_cells, and output_features.

Member Function Documentation

◆ hasInputFeature()

bool Opm::HybridNewtonConfig::hasInputFeature ( const std::string &  name) const
inline

References input_features.

Referenced by validateConfig().

◆ hasOutputFeature()

bool Opm::HybridNewtonConfig::hasOutputFeature ( const std::string &  name) const
inline

References output_features.

Referenced by validateConfig().

◆ validateConfig()

void Opm::HybridNewtonConfig::validateConfig ( bool  compositionSwitchEnabled) const
inline

Validate feature compatibility with simulator settings.

Ensures RS/RV features are only used if composition support is enabled. Throws std::runtime_error otherwise.

References hasInputFeature(), and hasOutputFeature().

Referenced by Opm::BlackOilHybridNewton< TypeTag >::tryApplyHybridNewton().

Member Data Documentation

◆ apply_times

std::vector<double> Opm::HybridNewtonConfig::apply_times

◆ cell_indices

◆ cell_indices_file

std::string Opm::HybridNewtonConfig::cell_indices_file

Referenced by HybridNewtonConfig().

◆ input_features

std::vector<std::pair<std::string, FeatureSpec> > Opm::HybridNewtonConfig::input_features

◆ model_path

std::string Opm::HybridNewtonConfig::model_path

◆ n_cells

◆ output_features


The documentation for this class was generated from the following file: