mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
commit
ef4b5928fb
@ -560,10 +560,10 @@ private:
|
|||||||
|
|
||||||
template <class Intersection>
|
template <class Intersection>
|
||||||
void computeFaceProperties(const Intersection& intersection,
|
void computeFaceProperties(const Intersection& intersection,
|
||||||
const int insideElemIdx,
|
const int insideElemIdx OPM_UNUSED,
|
||||||
const int insideFaceIdx,
|
const int insideFaceIdx OPM_UNUSED,
|
||||||
const int outsideElemIdx,
|
const int outsideElemIdx OPM_UNUSED,
|
||||||
const int outsideFaceIdx,
|
const int outsideFaceIdx OPM_UNUSED,
|
||||||
DimVector& faceCenterInside,
|
DimVector& faceCenterInside,
|
||||||
DimVector& faceCenterOutside,
|
DimVector& faceCenterOutside,
|
||||||
DimVector& faceAreaNormal,
|
DimVector& faceAreaNormal,
|
||||||
|
@ -405,12 +405,12 @@ protected:
|
|||||||
const MILU_VARIANT ilu_milu = parameters_.ilu_milu_;
|
const MILU_VARIANT ilu_milu = parameters_.ilu_milu_;
|
||||||
if ( parameters_.use_cpr_ )
|
if ( parameters_.use_cpr_ )
|
||||||
{
|
{
|
||||||
using Matrix = typename MatrixOperator::matrix_type;
|
using MatrixType = typename MatrixOperator::matrix_type;
|
||||||
using CouplingMetric = Opm::Amg::Element<pressureEqnIndex, pressureVarIndex>;
|
using CouplingMetric = Opm::Amg::Element<pressureEqnIndex, pressureVarIndex>;
|
||||||
using CritBase = Dune::Amg::SymmetricCriterion<Matrix, CouplingMetric>;
|
using CritBase = Dune::Amg::SymmetricCriterion<MatrixType, CouplingMetric>;
|
||||||
using Criterion = Dune::Amg::CoarsenCriterion<CritBase>;
|
using Criterion = Dune::Amg::CoarsenCriterion<CritBase>;
|
||||||
using AMG = typename ISTLUtility
|
using AMG = typename ISTLUtility
|
||||||
::BlackoilAmgSelector< Matrix, Vector, Vector,POrComm, Criterion, pressureEqnIndex, pressureVarIndex >::AMG;
|
::BlackoilAmgSelector< MatrixType, Vector, Vector,POrComm, Criterion, pressureEqnIndex, pressureVarIndex >::AMG;
|
||||||
|
|
||||||
std::unique_ptr< AMG > amg;
|
std::unique_ptr< AMG > amg;
|
||||||
// Construct preconditioner.
|
// Construct preconditioner.
|
||||||
@ -650,8 +650,7 @@ protected:
|
|||||||
void makeOverlapRowsInvalid(Matrix& ebosJacIgnoreOverlap) const
|
void makeOverlapRowsInvalid(Matrix& ebosJacIgnoreOverlap) const
|
||||||
{
|
{
|
||||||
//value to set on diagonal
|
//value to set on diagonal
|
||||||
typedef Dune::FieldMatrix<Scalar, numEq, numEq > MatrixBlockType;
|
Dune::FieldMatrix<Scalar, numEq, numEq> diag_block(0.0);
|
||||||
MatrixBlockType diag_block(0.0);
|
|
||||||
for (int eq = 0; eq < numEq; ++eq)
|
for (int eq = 0; eq < numEq; ++eq)
|
||||||
diag_block[eq][eq] = 1.0e100;
|
diag_block[eq][eq] = 1.0e100;
|
||||||
|
|
||||||
|
@ -179,8 +179,8 @@ namespace Opm
|
|||||||
opASerial_.reset(new OperatorSerial(*(this->matrix_), *(this->matrix_), wellModel));
|
opASerial_.reset(new OperatorSerial(*(this->matrix_), *(this->matrix_), wellModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
using POrComm = Dune::Amg::SequentialInformation;
|
using POrCommType = Dune::Amg::SequentialInformation;
|
||||||
POrComm parallelInformation_arg;
|
POrCommType parallelInformation_arg;
|
||||||
typedef OperatorSerial LinearOperator;
|
typedef OperatorSerial LinearOperator;
|
||||||
|
|
||||||
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
|
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 6)
|
||||||
@ -189,7 +189,7 @@ namespace Opm
|
|||||||
sp_ = std::move(sp);
|
sp_ = std::move(sp);
|
||||||
#else
|
#else
|
||||||
constexpr int category = Dune::SolverCategory::sequential;
|
constexpr int category = Dune::SolverCategory::sequential;
|
||||||
typedef Dune::ScalarProductChooser<Vector, POrComm, category> ScalarProductChooser;
|
typedef Dune::ScalarProductChooser<Vector, POrCommType, category> ScalarProductChooser;
|
||||||
typedef std::unique_ptr<typename ScalarProductChooser::ScalarProduct> SPPointer;
|
typedef std::unique_ptr<typename ScalarProductChooser::ScalarProduct> SPPointer;
|
||||||
SPPointer sp(ScalarProductChooser::construct(parallelInformation_arg));
|
SPPointer sp(ScalarProductChooser::construct(parallelInformation_arg));
|
||||||
sp_ = std::move(sp);
|
sp_ = std::move(sp);
|
||||||
|
@ -236,34 +236,6 @@ namespace Opm {
|
|||||||
bool forceShutWellByNameIfPredictionMode(const std::string& wellname, const double simulation_time);
|
bool forceShutWellByNameIfPredictionMode(const std::string& wellname, const double simulation_time);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void extractLegacyPressure_(std::vector<double>& cellPressure) const
|
|
||||||
{
|
|
||||||
size_t nc = number_of_cells_;
|
|
||||||
std::vector<double> cellPressures(nc, 0.0);
|
|
||||||
ElementContext elemCtx(ebosSimulator_);
|
|
||||||
const auto& gridView = ebosSimulator_.vanguard().gridView();
|
|
||||||
const auto& elemEndIt = gridView.template end</*codim=*/0>();
|
|
||||||
for (auto elemIt = gridView.template begin</*codim=*/0>();
|
|
||||||
elemIt != elemEndIt;
|
|
||||||
++elemIt)
|
|
||||||
{
|
|
||||||
const auto& elem = *elemIt;
|
|
||||||
if (elem.partitionType() != Dune::InteriorEntity) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
elemCtx.updatePrimaryStencil(elem);
|
|
||||||
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
|
|
||||||
|
|
||||||
const unsigned cellIdx = elemCtx.globalSpaceIndex(/*spaceIdx=*/0, /*timeIdx=*/0);
|
|
||||||
const auto& intQuants = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
|
|
||||||
const auto& fs = intQuants.fluidState();
|
|
||||||
|
|
||||||
const double p = fs.pressure(FluidSystem::oilPhaseIdx).value();
|
|
||||||
cellPressures[cellIdx] = p;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Simulator& ebosSimulator_;
|
Simulator& ebosSimulator_;
|
||||||
std::unique_ptr<WellsManager> wells_manager_;
|
std::unique_ptr<WellsManager> wells_manager_;
|
||||||
std::vector< Well2 > wells_ecl_;
|
std::vector< Well2 > wells_ecl_;
|
||||||
|
Loading…
Reference in New Issue
Block a user