From 134b47a5e24619d70ef70ee9bc11ec93f02849ce Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Tue, 27 Oct 2015 00:43:43 +0100 Subject: [PATCH] Fixes SaturationPropsFromDeck handling during redistribution. It needs a material law manager that works on the processes local grid partition. Therfore copying the one from the global representation does not work. Instead we now create an new SaturationPropsFromDeck and initialize it with the local material law manager. --- opm/autodiff/BlackoilPropsAdFromDeck.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/autodiff/BlackoilPropsAdFromDeck.cpp b/opm/autodiff/BlackoilPropsAdFromDeck.cpp index 718ff4d12..3134b651f 100644 --- a/opm/autodiff/BlackoilPropsAdFromDeck.cpp +++ b/opm/autodiff/BlackoilPropsAdFromDeck.cpp @@ -120,7 +120,7 @@ namespace Opm BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck& props, std::shared_ptr materialLawManager, const int number_of_cells) - : rock_(number_of_cells) + : rock_(number_of_cells), satprops_(new SaturationPropsFromDeck()) { const int original_size = props.cellPvtRegionIdx_.size(); if (number_of_cells > original_size) { @@ -133,7 +133,6 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck& materialLawManager_ = materialLawManager; // Copy properties that do not depend on the postion within the grid. - satprops_ = props.satprops_; phase_usage_ = props.phase_usage_; props_ = props.props_; densities_ = props.densities_; @@ -143,6 +142,7 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck& // For data that is dependant on the subgrid we simply allocate space // and initialize with obviously bogus numbers. cellPvtRegionIdx_.resize(number_of_cells, std::numeric_limits::min()); + satprops_->init(phase_usage_, materialLawManager_); } /// Initializes the properties.