mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
moved cd to xxx_impl.hh to avoid
this way we do not have to add explicit initiation of all variants of grids and gridView iterators in the library
This commit is contained in:
committed by
Arne Morten Kvarving
parent
030c06afb2
commit
3442a549cd
@@ -27,14 +27,14 @@
|
||||
|
||||
#include <dune/common/parametertree.hh>
|
||||
|
||||
#include <ebos/eclsolutioncontainers.hh>
|
||||
|
||||
#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/OverburdTable.hpp>
|
||||
#include <opm/input/eclipse/EclipseState/Tables/RockwnodTable.hpp>
|
||||
#include <opm/input/eclipse/Schedule/Schedule.hpp>
|
||||
#include <opm/input/eclipse/Units/Units.hpp>
|
||||
|
||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
@@ -97,18 +97,12 @@ serializationTestObject(const EclipseState& eclState,
|
||||
{
|
||||
EclGenericProblem result(eclState, schedule, gridView);
|
||||
result.maxOilSaturation_ = {1.0, 2.0};
|
||||
result.maxPolymerAdsorption_ = {3.0, 4.0, 5.0};
|
||||
result.maxWaterSaturation_ = {6.0};
|
||||
result.minOilPressure_ = {7.0, 8.0, 9.0, 10.0};
|
||||
result.overburdenPressure_ = {11.0};
|
||||
result.polymerConcentration_ = {12.0};
|
||||
result.polymerMoleWeight_ = {13.0, 14.0};
|
||||
result.solventSaturation_ = {15.0};
|
||||
result.microbialConcentration_ = {16.0};
|
||||
result.oxygenConcentration_ = {17.0};
|
||||
result.ureaConcentration_ = {18.0};
|
||||
result.biofilmConcentration_ = {19.0};
|
||||
result.calciteConcentration_ = {20.0};
|
||||
result.polymer_ = PolymerSolutionContainer<Scalar>::serializationTestObject();
|
||||
result.micp_ = MICPSolutionContainer<Scalar>::serializationTestObject();
|
||||
result.lastRv_ = {21.0};
|
||||
result.maxDRv_ = {22.0, 23.0};
|
||||
result.convectiveDrs_ = {24.0, 25.0, 26.0};
|
||||
@@ -558,40 +552,47 @@ readBlackoilExtentionsInitialConditions_(size_t numDof,
|
||||
}
|
||||
|
||||
if (enablePolymer) {
|
||||
if (eclState_.fieldProps().has_double("SPOLY"))
|
||||
polymerConcentration_ = eclState_.fieldProps().get_double("SPOLY");
|
||||
else
|
||||
polymerConcentration_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SPOLY")) {
|
||||
polymer_.concentration = eclState_.fieldProps().get_double("SPOLY");
|
||||
} else {
|
||||
polymer_.concentration.resize(numDof, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
if (enablePolymerMolarWeight) {
|
||||
if (eclState_.fieldProps().has_double("SPOLYMW"))
|
||||
polymerMoleWeight_ = eclState_.fieldProps().get_double("SPOLYMW");
|
||||
else
|
||||
polymerMoleWeight_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SPOLYMW")) {
|
||||
polymer_.moleWeight = eclState_.fieldProps().get_double("SPOLYMW");
|
||||
} else {
|
||||
polymer_.moleWeight.resize(numDof, 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
if (enableMICP) {
|
||||
if (eclState_.fieldProps().has_double("SMICR"))
|
||||
microbialConcentration_ = eclState_.fieldProps().get_double("SMICR");
|
||||
else
|
||||
microbialConcentration_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SOXYG"))
|
||||
oxygenConcentration_ = eclState_.fieldProps().get_double("SOXYG");
|
||||
else
|
||||
oxygenConcentration_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SUREA"))
|
||||
ureaConcentration_ = eclState_.fieldProps().get_double("SUREA");
|
||||
else
|
||||
ureaConcentration_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SBIOF"))
|
||||
biofilmConcentration_ = eclState_.fieldProps().get_double("SBIOF");
|
||||
else
|
||||
biofilmConcentration_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SCALC"))
|
||||
calciteConcentration_ = eclState_.fieldProps().get_double("SCALC");
|
||||
else
|
||||
calciteConcentration_.resize(numDof, 0.0);
|
||||
if (eclState_.fieldProps().has_double("SMICR")) {
|
||||
micp_.microbialConcentration = eclState_.fieldProps().get_double("SMICR");
|
||||
} else {
|
||||
micp_.microbialConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
if (eclState_.fieldProps().has_double("SOXYG")) {
|
||||
micp_.oxygenConcentration = eclState_.fieldProps().get_double("SOXYG");
|
||||
} else {
|
||||
micp_.oxygenConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
if (eclState_.fieldProps().has_double("SUREA")) {
|
||||
micp_.ureaConcentration = eclState_.fieldProps().get_double("SUREA");
|
||||
} else {
|
||||
micp_.ureaConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
if (eclState_.fieldProps().has_double("SBIOF")) {
|
||||
micp_.biofilmConcentration = eclState_.fieldProps().get_double("SBIOF");
|
||||
} else {
|
||||
micp_.biofilmConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
if (eclState_.fieldProps().has_double("SCALC")) {
|
||||
micp_.calciteConcentration = eclState_.fieldProps().get_double("SCALC");
|
||||
} else {
|
||||
micp_.calciteConcentration.resize(numDof, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -655,70 +656,77 @@ template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
polymerConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (polymerConcentration_.empty())
|
||||
if (polymer_.concentration.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return polymerConcentration_[elemIdx];
|
||||
return polymer_.concentration[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
polymerMolecularWeight(const unsigned elemIdx) const
|
||||
{
|
||||
if (polymerMoleWeight_.empty())
|
||||
if (polymer_.moleWeight.empty()) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return polymerMoleWeight_[elemIdx];
|
||||
return polymer_.moleWeight[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
microbialConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (microbialConcentration_.empty())
|
||||
if (micp_.microbialConcentration.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return microbialConcentration_[elemIdx];
|
||||
return micp_.microbialConcentration[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
oxygenConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (oxygenConcentration_.empty())
|
||||
if (micp_.oxygenConcentration.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return oxygenConcentration_[elemIdx];
|
||||
return micp_.oxygenConcentration[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
ureaConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (ureaConcentration_.empty())
|
||||
if (micp_.ureaConcentration.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ureaConcentration_[elemIdx];
|
||||
return micp_.ureaConcentration[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
biofilmConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (biofilmConcentration_.empty())
|
||||
if (micp_.biofilmConcentration.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return biofilmConcentration_[elemIdx];
|
||||
return micp_.biofilmConcentration[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
calciteConcentration(unsigned elemIdx) const
|
||||
{
|
||||
if (calciteConcentration_.empty())
|
||||
if (micp_.calciteConcentration.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return calciteConcentration_[elemIdx];
|
||||
return micp_.calciteConcentration[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
@@ -765,10 +773,11 @@ template<class GridView, class FluidSystem, class Scalar>
|
||||
Scalar EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
maxPolymerAdsorption(unsigned elemIdx) const
|
||||
{
|
||||
if (maxPolymerAdsorption_.empty())
|
||||
if (polymer_.maxAdsorption.empty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return maxPolymerAdsorption_[elemIdx];
|
||||
return polymer_.maxAdsorption[elemIdx];
|
||||
}
|
||||
|
||||
template<class GridView, class FluidSystem, class Scalar>
|
||||
@@ -801,18 +810,12 @@ bool EclGenericProblem<GridView,FluidSystem,Scalar>::
|
||||
operator==(const EclGenericProblem& rhs) const
|
||||
{
|
||||
return this->maxOilSaturation_ == rhs.maxOilSaturation_ &&
|
||||
this->maxPolymerAdsorption_ == rhs.maxPolymerAdsorption_ &&
|
||||
this->maxWaterSaturation_ == rhs.maxWaterSaturation_ &&
|
||||
this->minOilPressure_ == rhs.minOilPressure_ &&
|
||||
this->overburdenPressure_ == rhs.overburdenPressure_ &&
|
||||
this->polymerConcentration_ == rhs.polymerConcentration_ &&
|
||||
this->polymerMoleWeight_ == rhs.polymerMoleWeight_ &&
|
||||
this->solventSaturation_ == rhs.solventSaturation_ &&
|
||||
this->microbialConcentration_ == rhs.microbialConcentration_ &&
|
||||
this->oxygenConcentration_ == rhs.oxygenConcentration_ &&
|
||||
this->ureaConcentration_ == rhs.ureaConcentration_ &&
|
||||
this->biofilmConcentration_ == rhs.biofilmConcentration_ &&
|
||||
this->calciteConcentration_ == rhs.calciteConcentration_ &&
|
||||
this->polymer_ == rhs.polymer_ &&
|
||||
this->micp_ == rhs.micp_ &&
|
||||
this->lastRv_ == rhs.lastRv_ &&
|
||||
this->maxDRv_ == rhs.maxDRv_ &&
|
||||
this->convectiveDrs_ == rhs.convectiveDrs_ &&
|
||||
|
||||
Reference in New Issue
Block a user