mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -06:00
fix disabled component index
This commit is contained in:
parent
d0421582e1
commit
13cd4b476e
@ -31,7 +31,59 @@
|
||||
|
||||
#include "ebos_gaswater.hh"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Opm::ebosGasWaterMain(argc, argv);
|
||||
#include "ebos.hh"
|
||||
#include "startEbos.hh"
|
||||
|
||||
namespace Opm::Properties {
|
||||
|
||||
namespace TTag {
|
||||
struct EbosGasWaterTypeTag {
|
||||
using InheritsFrom = std::tuple<EbosTypeTag>;
|
||||
};
|
||||
}
|
||||
|
||||
//! The indices indices which only enable oil and water
|
||||
template<class TypeTag>
|
||||
struct Indices<TypeTag, TTag::EbosGasWaterTypeTag>
|
||||
{
|
||||
private:
|
||||
// it is unfortunately not possible to simply use 'TypeTag' here because this leads
|
||||
// to cyclic definitions of some properties. if this happens the compiler error
|
||||
// messages unfortunately are *really* confusing and not really helpful.
|
||||
using FluidSystem = GetPropType<TTag::EbosTypeTag, Properties::FluidSystem>;
|
||||
|
||||
public:
|
||||
typedef Opm::BlackOilTwoPhaseIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
|
||||
getPropValue<TypeTag, Properties::EnablePolymer>(),
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::oilCompIdx> type;
|
||||
};
|
||||
|
||||
} // namespace Opm::Properties
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void ebosGasWaterSetDeck(std::unique_ptr<Opm::Deck> deck,
|
||||
std::unique_ptr<Opm::ParseContext> parseContext,
|
||||
std::unique_ptr<Opm::ErrorGuard> errorGuard,
|
||||
double externalSetupTime)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosOilWaterTypeTag;
|
||||
using Vanguard = GetPropType<ProblemTypeTag, Properties::Vanguard>;
|
||||
|
||||
Vanguard::setExternalSetupTime(externalSetupTime);
|
||||
Vanguard::setExternalParseContext(std::move(parseContext));
|
||||
Vanguard::setExternalErrorGuard(std::move(errorGuard));
|
||||
Vanguard::setExternalDeck(std::move(deck));
|
||||
}
|
||||
|
||||
int ebosGasWaterMain(int argc, char **argv)
|
||||
{
|
||||
using ProblemTypeTag = Properties::TTag::EbosGasWaterTypeTag;
|
||||
return Opm::startEbos<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
getPropValue<TypeTag, Properties::EnableFoam>(),
|
||||
getPropValue<TypeTag, Properties::EnableBrine>(),
|
||||
/*PVOffset=*/0,
|
||||
/*disabledCompIdx=*/FluidSystem::waterCompIdx> type;
|
||||
/*disabledCompIdx=*/FluidSystem::oilCompIdx> type;
|
||||
};
|
||||
}}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user