mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make SummaryState Objects Aware of Undefined UDQ Value
This PR switches to calling the SummaryState constructor which is aware of the value of undefined UDQs (OPM/opm-common#4052) directly. While here, also sort headers, split some long lines, and prefer initialisation lists to constructor body assignments.
This commit is contained in:
@@ -22,16 +22,22 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <opm/simulators/flow//FlowGenericVanguard.hpp>
|
||||
#include <opm/simulators/flow/FlowGenericVanguard.hpp>
|
||||
|
||||
#include <opm/common/utility/MemPacker.hpp>
|
||||
#include <opm/common/utility/Serializer.hpp>
|
||||
|
||||
#include <opm/common/ErrorMacros.hpp>
|
||||
|
||||
#include <opm/common/utility/TimeService.hpp>
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/Aquifer/NumericalAquifer/NumericalAquiferCell.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/Parser/InputErrorAction.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Runspec.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Schedule/Action/Actions.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Action/ASTNode.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Action/State.hpp>
|
||||
@@ -51,6 +57,7 @@
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQASTNode.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQParams.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQState.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/NameOrder.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WDFAC.hpp>
|
||||
@@ -67,8 +74,9 @@
|
||||
#include <opm/input/eclipse/Schedule/Well/WListManager.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WVFPDP.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WVFPEXP.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
|
||||
#include <opm/input/eclipse/Parser/InputErrorAction.hpp>
|
||||
|
||||
#include <opm/simulators/utils/readDeck.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
@@ -239,8 +247,11 @@ void FlowGenericVanguard::init()
|
||||
}
|
||||
|
||||
|
||||
if (!this->summaryState_)
|
||||
this->summaryState_ = std::make_unique<SummaryState>( TimeService::from_time_t(this->eclSchedule_->getStartTime() ));
|
||||
if (!this->summaryState_) {
|
||||
this->summaryState_ = std::make_unique<SummaryState>
|
||||
(TimeService::from_time_t(this->eclSchedule_->getStartTime()),
|
||||
this->eclState_->runspec().udqParams().undefinedValue());
|
||||
}
|
||||
|
||||
// Initialize parallelWells with all local wells
|
||||
const auto& schedule_wells = schedule().getWellsatEnd();
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#include <opm/input/eclipse/Schedule/Action/State.hpp>
|
||||
#include <opm/input/eclipse/Schedule/ArrayDimChecker.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Schedule/SummaryState.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQConfig.hpp>
|
||||
#include <opm/input/eclipse/Schedule/UDQ/UDQState.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Well/WellTestState.hpp>
|
||||
@@ -405,7 +404,7 @@ void Opm::ensureOutputDirExists(const std::string& cmdline_output_dir)
|
||||
|
||||
void Opm::prepareResultOutputDirectory(const std::string& baseName,
|
||||
const std::filesystem::path& outputDir)
|
||||
{
|
||||
{
|
||||
//Loop over all files in the output directory and subdirectories and delete them if their name is baseName + a correct extension
|
||||
std::regex r(baseName + R"(\.(F?(DBG|E?GRID|INIT|PRT|RFT|SMSPEC|UNSMRY|UNRST)|([ABCFGHSTUXYZ]\d{4})|(INFOSTEP|INFOITER|OPMRST)))");
|
||||
for (auto& file : std::filesystem::recursive_directory_iterator(outputDir)) {
|
||||
|
||||
Reference in New Issue
Block a user