From 90ecb09c2edb43712f08f05e3f7c909652d2df60 Mon Sep 17 00:00:00 2001 From: Svenn Tveit Date: Fri, 14 Aug 2026 14:30:07 +0200 Subject: [PATCH] Accommodate for renaming BCProp class to BCState --- opm/models/blackoil/blackoillocalresidualtpfa.hh | 2 +- .../discretization/common/tpfalinearizer.hh | 2 +- .../common/tpfalinearizerstructs.hh | 2 +- .../discretization/common/tpsalinearizer.hpp | 2 +- opm/models/tpsa/elasticitylocalresidualtpsa.hpp | 4 ++-- opm/simulators/flow/FlowProblem.hpp | 14 +++++++------- opm/simulators/flow/FlowProblemBlackoil.hpp | 16 ++++++++-------- opm/simulators/flow/FlowProblemComp.hpp | 10 +++++----- opm/simulators/flow/FlowProblemTPSA.hpp | 12 +++++++----- tests/test_tpsa_localresidual.cpp | 2 +- 10 files changed, 34 insertions(+), 32 deletions(-) diff --git a/opm/models/blackoil/blackoillocalresidualtpfa.hh b/opm/models/blackoil/blackoillocalresidualtpfa.hh index 7731e2bd40a..df5ae329f77 100644 --- a/opm/models/blackoil/blackoillocalresidualtpfa.hh +++ b/opm/models/blackoil/blackoillocalresidualtpfa.hh @@ -29,7 +29,7 @@ #define EWOMS_BLACK_OIL_LOCAL_TPFA_RESIDUAL_HH #include -#include +#include #include #include diff --git a/opm/models/discretization/common/tpfalinearizer.hh b/opm/models/discretization/common/tpfalinearizer.hh index 4d77b1fb367..dfef41cefda 100644 --- a/opm/models/discretization/common/tpfalinearizer.hh +++ b/opm/models/discretization/common/tpfalinearizer.hh @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/opm/models/discretization/common/tpfalinearizerstructs.hh b/opm/models/discretization/common/tpfalinearizerstructs.hh index 63dd1cd3ddb..317f52177ac 100644 --- a/opm/models/discretization/common/tpfalinearizerstructs.hh +++ b/opm/models/discretization/common/tpfalinearizerstructs.hh @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/opm/models/discretization/common/tpsalinearizer.hpp b/opm/models/discretization/common/tpsalinearizer.hpp index 77ca7a85b39..1443d398d13 100644 --- a/opm/models/discretization/common/tpsalinearizer.hpp +++ b/opm/models/discretization/common/tpsalinearizer.hpp @@ -31,7 +31,7 @@ #include -#include +#include #include diff --git a/opm/models/tpsa/elasticitylocalresidualtpsa.hpp b/opm/models/tpsa/elasticitylocalresidualtpsa.hpp index 47cbd9c7533..f0135041966 100644 --- a/opm/models/tpsa/elasticitylocalresidualtpsa.hpp +++ b/opm/models/tpsa/elasticitylocalresidualtpsa.hpp @@ -27,7 +27,7 @@ #include -#include +#include #include #include @@ -213,7 +213,7 @@ class ElasticityLocalResidual } /*! - * \brief Calculate boundary conditions in TPSA formulation given by BCCON/BCPROP + * \brief Calculate boundary conditions in TPSA formulation given by BCCON/BCMECH * * \param bndryTerm Boundary term vector * \param materialState Material state container diff --git a/opm/simulators/flow/FlowProblem.hpp b/opm/simulators/flow/FlowProblem.hpp index 87a1ea6fc7d..8fc4ce50582 100644 --- a/opm/simulators/flow/FlowProblem.hpp +++ b/opm/simulators/flow/FlowProblem.hpp @@ -1232,10 +1232,10 @@ class FlowProblem : public GetPropType if (bcindex_(dir)[globalSpaceIdx] == 0) { return { BCType::NONE, RateVector(0.0) }; } - if (schedule[this->episodeIndex()].bcprop.size() == 0) { + if (schedule[this->episodeIndex()].bcstate.size() == 0) { return { BCType::NONE, RateVector(0.0) }; } - const auto& bc = schedule[this->episodeIndex()].bcprop[bcindex_(dir)[globalSpaceIdx]]; + const auto& bc = schedule[this->episodeIndex()].bcstate[bcindex_(dir)[globalSpaceIdx]]; if (bc.bctype!=BCType::RATE) { return { bc.bctype, RateVector(0.0) }; } @@ -1872,15 +1872,15 @@ class FlowProblem : public GetPropType } }; - virtual void handleSolventBC(const BCProp::BCFace&, RateVector&) const = 0; + virtual void handleSolventBC(const BCState::BCFace&, RateVector&) const = 0; - virtual void handlePolymerBC(const BCProp::BCFace&, RateVector&) const = 0; + virtual void handlePolymerBC(const BCState::BCFace&, RateVector&) const = 0; - virtual void handleMicrBC(const BCProp::BCFace&, RateVector&) const = 0; + virtual void handleMicrBC(const BCState::BCFace&, RateVector&) const = 0; - virtual void handleOxygBC(const BCProp::BCFace&, RateVector&) const = 0; + virtual void handleOxygBC(const BCState::BCFace&, RateVector&) const = 0; - virtual void handleUreaBC(const BCProp::BCFace&, RateVector&) const = 0; + virtual void handleUreaBC(const BCState::BCFace&, RateVector&) const = 0; BCData bcindex_; bool nonTrivialBoundaryConditions_ = false; diff --git a/opm/simulators/flow/FlowProblemBlackoil.hpp b/opm/simulators/flow/FlowProblemBlackoil.hpp index bb5a4348a2a..ecd532ebd98 100644 --- a/opm/simulators/flow/FlowProblemBlackoil.hpp +++ b/opm/simulators/flow/FlowProblemBlackoil.hpp @@ -802,8 +802,8 @@ class FlowProblemBlackoil : public FlowProblem InitialFluidState boundaryFluidState(unsigned globalDofIdx, const int directionId) const { OPM_TIMEBLOCK_LOCAL(boundaryFluidState, Subsystem::Assembly); - const auto& bcprop = this->simulator().vanguard().schedule()[this->episodeIndex()].bcprop; - if (bcprop.size() > 0) { + const auto& bcstate = this->simulator().vanguard().schedule()[this->episodeIndex()].bcstate; + if (bcstate.size() > 0) { FaceDir::DirEnum dir = FaceDir::FromIntersectionIndex(directionId); // index == 0: no boundary conditions for this @@ -811,7 +811,7 @@ class FlowProblemBlackoil : public FlowProblem if (this->bcindex_(dir)[globalDofIdx] == 0) return initialFluidStates_[globalDofIdx]; - const auto& bc = bcprop[this->bcindex_(dir)[globalDofIdx]]; + const auto& bc = bcstate[this->bcindex_(dir)[globalDofIdx]]; if (bc.bctype == BCType::DIRICHLET ) { InitialFluidState fluidState; @@ -1614,7 +1614,7 @@ class FlowProblemBlackoil : public FlowProblem } - void handleSolventBC(const BCProp::BCFace& bc, RateVector& rate) const override + void handleSolventBC(const BCState::BCFace& bc, RateVector& rate) const override { if constexpr (!enableSolvent) throw std::logic_error("solvent is disabled and you're trying to add solvent to BC"); @@ -1622,7 +1622,7 @@ class FlowProblemBlackoil : public FlowProblem rate[Indices::solventSaturationIdx] = bc.rate; } - void handlePolymerBC(const BCProp::BCFace& bc, RateVector& rate) const override + void handlePolymerBC(const BCState::BCFace& bc, RateVector& rate) const override { if constexpr (!enablePolymer) throw std::logic_error("polymer is disabled and you're trying to add polymer to BC"); @@ -1630,7 +1630,7 @@ class FlowProblemBlackoil : public FlowProblem rate[Indices::polymerConcentrationIdx] = bc.rate; } - void handleMicrBC(const BCProp::BCFace& bc, RateVector& rate) const override + void handleMicrBC(const BCState::BCFace& bc, RateVector& rate) const override { if constexpr (!enableMICP) throw std::logic_error("MICP is disabled and you're trying to add microbes to BC"); @@ -1638,7 +1638,7 @@ class FlowProblemBlackoil : public FlowProblem rate[Indices::microbialConcentrationIdx] = bc.rate; } - void handleOxygBC(const BCProp::BCFace& bc, RateVector& rate) const override + void handleOxygBC(const BCState::BCFace& bc, RateVector& rate) const override { if constexpr (!enableMICP) throw std::logic_error("MICP is disabled and you're trying to add oxygen to BC"); @@ -1646,7 +1646,7 @@ class FlowProblemBlackoil : public FlowProblem rate[Indices::oxygenConcentrationIdx] = bc.rate; } - void handleUreaBC(const BCProp::BCFace& bc, RateVector& rate) const override + void handleUreaBC(const BCState::BCFace& bc, RateVector& rate) const override { if constexpr (!enableMICP) throw std::logic_error("MICP is disabled and you're trying to add urea to BC"); diff --git a/opm/simulators/flow/FlowProblemComp.hpp b/opm/simulators/flow/FlowProblemComp.hpp index f5f52ea57ce..95f9c7415a2 100644 --- a/opm/simulators/flow/FlowProblemComp.hpp +++ b/opm/simulators/flow/FlowProblemComp.hpp @@ -608,27 +608,27 @@ class FlowProblemComp : public FlowProblem private: - void handleSolventBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override + void handleSolventBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override { throw std::logic_error("solvent is disabled for compositional modeling and you're trying to add solvent to BC"); } - void handlePolymerBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override + void handlePolymerBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override { throw std::logic_error("polymer is disabled for compositional modeling and you're trying to add polymer to BC"); } - void handleMicrBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override + void handleMicrBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override { throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add microbes to BC"); } - void handleOxygBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override + void handleOxygBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override { throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add oxygen to BC"); } - void handleUreaBC(const BCProp::BCFace& /* bc */, RateVector& /* rate */) const override + void handleUreaBC(const BCState::BCFace& /* bc */, RateVector& /* rate */) const override { throw std::logic_error("MICP is disabled for compositional modeling and you're trying to add urea to BC"); } diff --git a/opm/simulators/flow/FlowProblemTPSA.hpp b/opm/simulators/flow/FlowProblemTPSA.hpp index 73bbd6e1944..16a577b893b 100644 --- a/opm/simulators/flow/FlowProblemTPSA.hpp +++ b/opm/simulators/flow/FlowProblemTPSA.hpp @@ -280,20 +280,22 @@ class FlowProblemTPSA : public FlowProblemBlackoil std::pair> mechBoundaryCondition(const unsigned int globalSpaceIdx, const int directionId) { - // Default boundary conditions if BCCON/BCPROP not defined + // Default boundary conditions if BCCON/BCMECH not defined if (!this->nonTrivialBoundaryConditions()) { return { BCMECHType::NONE, Dune::FieldVector{0.0, 0.0, 0.0} }; } - // Default for BCPROP index = 0 or no BCPROP defined at current episode + // Default for BCMECH index = 0 or no BCMECH defined at current episode FaceDir::DirEnum dir = FaceDir::FromIntersectionIndex(directionId); const auto& schedule = this->simulator().vanguard().schedule(); - if (this->bcindex_(dir)[globalSpaceIdx] == 0 || schedule[this->episodeIndex()].bcprop.size() == 0) { - return { BCMECHType::NONE, Dune::FieldVector{0.0, 0.0, 0.0} }; + if (this->bcindex_(dir)[globalSpaceIdx] == 0 + || schedule[this->episodeIndex()].bcstate.size() == 0) { + return {BCMECHType::NONE, Dune::FieldVector{0.0, 0.0, 0.0} }; } // Get current BC - const auto& bc = schedule[this->episodeIndex()].bcprop[this->bcindex_(dir)[globalSpaceIdx]]; + const auto& bc = + schedule[this->episodeIndex()].bcstate[this->bcindex_(dir)[globalSpaceIdx]]; if (bc.bcmechtype == BCMECHType::FREE) { return { BCMECHType::FREE, Dune::FieldVector{0.0, 0.0, 0.0} }; } diff --git a/tests/test_tpsa_localresidual.cpp b/tests/test_tpsa_localresidual.cpp index 454e5195955..d9e2b4bd6c5 100644 --- a/tests/test_tpsa_localresidual.cpp +++ b/tests/test_tpsa_localresidual.cpp @@ -26,7 +26,7 @@ #include -#include +#include #include