Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make nonlinear system possible to change #6046

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opm/simulators/flow/BlackoilModelProperties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#define OPM_BLACKOILMODEL_PROPERTIES_HEADER_INCLUDED

#include <opm/simulators/flow/FlowProblemBlackoilProperties.hpp>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you update, you can avoid deleting this line. It is not related to this PR.

#include <tuple>

namespace Opm {
Expand All @@ -38,6 +37,7 @@ namespace Opm::Properties {
namespace TTag {

struct FlowIstlSolver;
struct FlowBaseProblemBlackoil;
struct FlowProblem { using InheritsFrom = std::tuple<FlowBaseProblemBlackoil, BlackOilModel>; };

}
Expand Down
5 changes: 5 additions & 0 deletions opm/simulators/flow/FlowBaseProblemProperties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ struct FlowBaseProblem {

}

template<class TypeTag, class MyTypeTag>
struct NonlinearSystem { using type = UndefinedProperty; };



// The class which deals with ECL aquifers
template<class TypeTag, class MyTypeTag>
struct AquiferModel { using type = UndefinedProperty; };
Expand Down
6 changes: 6 additions & 0 deletions opm/simulators/flow/FlowProblemBlackoilProperties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <opm/simulators/flow/FIBlackoilModel.hpp>
#include <opm/simulators/flow/NewTranFluxModule.hpp>
#include <opm/simulators/flow/OutputBlackoilModule.hpp>
#include <opm/simulators/flow/BlackoilModel.hpp>


#include <tuple>
Expand All @@ -57,6 +58,11 @@ struct FlowBaseProblemBlackoil {
}

// Set the problem property
template<class TypeTag>
struct NonlinearSystem<TypeTag, TTag::FlowBaseProblemBlackoil>
{ using type = BlackoilModel<TypeTag>; };


template<class TypeTag>
struct Problem<TypeTag, TTag::FlowBaseProblemBlackoil>
{ using type = FlowProblemBlackoil<TypeTag>; };
Expand Down
3 changes: 2 additions & 1 deletion opm/simulators/flow/SimulatorFullyImplicitBlackoil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ class SimulatorFullyImplicitBlackoil : private SerializableSim
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
using MaterialLawParams = GetPropType<TypeTag, Properties::MaterialLawParams>;
using AquiferModel = GetPropType<TypeTag, Properties::AquiferModel>;
using Model = GetPropType<TypeTag, Properties::NonlinearSystem>;

using TimeStepper = AdaptiveTimeStepping<TypeTag>;
using PolymerModule = BlackOilPolymerModule<TypeTag>;
using MICPModule = BlackOilMICPModule<TypeTag>;

using Model = BlackoilModel<TypeTag>;

using Solver = NonlinearSolver<TypeTag, Model>;
using ModelParameters = typename Model::ModelParameters;
using SolverParameters = typename Solver::SolverParameters;
Expand Down