mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-17 04:03:08 -06:00
changed: this is known on compile time
use info to disable code
This commit is contained in:
parent
2a5d908c2e
commit
9b74b5dfac
@ -106,6 +106,8 @@ namespace Opm {
|
|||||||
|
|
||||||
static const int numEq = Indices::numEq;
|
static const int numEq = Indices::numEq;
|
||||||
static const int solventSaturationIdx = Indices::solventSaturationIdx;
|
static const int solventSaturationIdx = Indices::solventSaturationIdx;
|
||||||
|
static constexpr bool has_solvent_ = getPropValue<TypeTag, Properties::EnableSolvent>();
|
||||||
|
static constexpr bool has_polymer_ = getPropValue<TypeTag, Properties::EnablePolymer>();
|
||||||
|
|
||||||
// TODO: where we should put these types, WellInterface or Well Model?
|
// TODO: where we should put these types, WellInterface or Well Model?
|
||||||
// or there is some other strategy, like TypeTag
|
// or there is some other strategy, like TypeTag
|
||||||
@ -315,9 +317,6 @@ namespace Opm {
|
|||||||
|
|
||||||
const ModelParameters param_;
|
const ModelParameters param_;
|
||||||
bool terminal_output_;
|
bool terminal_output_;
|
||||||
bool has_solvent_;
|
|
||||||
bool has_zFraction_;
|
|
||||||
bool has_polymer_;
|
|
||||||
std::vector<int> pvt_region_idx_;
|
std::vector<int> pvt_region_idx_;
|
||||||
PhaseUsage phase_usage_;
|
PhaseUsage phase_usage_;
|
||||||
size_t global_num_cells_;
|
size_t global_num_cells_;
|
||||||
|
@ -34,9 +34,6 @@ namespace Opm {
|
|||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
BlackoilWellModel(Simulator& ebosSimulator)
|
BlackoilWellModel(Simulator& ebosSimulator)
|
||||||
: ebosSimulator_(ebosSimulator)
|
: ebosSimulator_(ebosSimulator)
|
||||||
, has_solvent_(getPropValue<TypeTag, Properties::EnableSolvent>())
|
|
||||||
, has_zFraction_(getPropValue<TypeTag, Properties::EnableExtbo>())
|
|
||||||
, has_polymer_(getPropValue<TypeTag, Properties::EnablePolymer>())
|
|
||||||
{
|
{
|
||||||
terminal_output_ = false;
|
terminal_output_ = false;
|
||||||
if (ebosSimulator.gridView().comm().rank() == 0)
|
if (ebosSimulator.gridView().comm().rank() == 0)
|
||||||
@ -359,7 +356,7 @@ namespace Opm {
|
|||||||
// calculate the efficiency factors for each well
|
// calculate the efficiency factors for each well
|
||||||
calculateEfficiencyFactors(reportStepIdx);
|
calculateEfficiencyFactors(reportStepIdx);
|
||||||
|
|
||||||
if (has_polymer_)
|
if constexpr (has_polymer_)
|
||||||
{
|
{
|
||||||
if (PolymerModule::hasPlyshlog() || getPropValue<TypeTag, Properties::EnablePolymerMW>() ) {
|
if (PolymerModule::hasPlyshlog() || getPropValue<TypeTag, Properties::EnablePolymerMW>() ) {
|
||||||
setRepRadiusPerfLength();
|
setRepRadiusPerfLength();
|
||||||
@ -1620,7 +1617,7 @@ namespace Opm {
|
|||||||
|
|
||||||
B += 1 / fs.invB(phaseIdx).value();
|
B += 1 / fs.invB(phaseIdx).value();
|
||||||
}
|
}
|
||||||
if (has_solvent_) {
|
if constexpr (has_solvent_) {
|
||||||
auto& B = B_avg[solventSaturationIdx];
|
auto& B = B_avg[solventSaturationIdx];
|
||||||
B += 1 / intQuants.solventInverseFormationVolumeFactor().value();
|
B += 1 / intQuants.solventInverseFormationVolumeFactor().value();
|
||||||
}
|
}
|
||||||
@ -1672,7 +1669,7 @@ namespace Opm {
|
|||||||
return numPhases();
|
return numPhases();
|
||||||
}
|
}
|
||||||
int numComp = FluidSystem::numComponents;
|
int numComp = FluidSystem::numComponents;
|
||||||
if (has_solvent_) {
|
if constexpr (has_solvent_) {
|
||||||
numComp ++;
|
numComp ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user