Merge pull request #1765 from andlaus/minor_cleanups

Minor cleanups
This commit is contained in:
Tor Harald Sandve 2019-03-26 12:38:50 +01:00 committed by GitHub
commit 17c249fa46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -1325,12 +1325,10 @@ public:
template <class Context> template <class Context>
Scalar temperature(const Context& context, unsigned spaceIdx, unsigned timeIdx) const Scalar temperature(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
{ {
// use the temporally constant temperature, i.e. use the initial temperature of // use the initial temperature of the DOF if temperature is not a primary
// the DOF // variable
unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx); unsigned globalDofIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
if (!initialFluidStates_.empty())
return initialFluidStates_[globalDofIdx].temperature(/*phaseIdx=*/0); return initialFluidStates_[globalDofIdx].temperature(/*phaseIdx=*/0);
return initialTemperature_[globalDofIdx];
} }
/*! /*!
@ -2719,7 +2717,6 @@ private:
std::vector<Scalar> maxPolymerAdsorption_; std::vector<Scalar> maxPolymerAdsorption_;
std::vector<InitialFluidState> initialFluidStates_; std::vector<InitialFluidState> initialFluidStates_;
std::vector<Scalar> initialTemperature_;
std::vector<Scalar> polymerConcentration_; std::vector<Scalar> polymerConcentration_;
// polymer molecular weight // polymer molecular weight

View File

@ -492,7 +492,9 @@ protected:
// TODO: Revise when linear solvers interface opm-core is done // TODO: Revise when linear solvers interface opm-core is done
// Construct linear solver. // Construct linear solver.
// GMRes solver // GMRes solver
int verbosity = ( isIORank_ ) ? parameters_.linear_solver_verbosity_ : 0; int verbosity = 0;
if (simulator_.gridView().comm().rank() == 0)
verbosity = parameters_.linear_solver_verbosity_;
if ( parameters_.newton_use_gmres_ ) { if ( parameters_.newton_use_gmres_ ) {
Dune::RestartedGMResSolver<Vector> linsolve(opA, sp, precond, Dune::RestartedGMResSolver<Vector> linsolve(opA, sp, precond,
@ -836,7 +838,6 @@ protected:
mutable int iterations_; mutable int iterations_;
mutable bool converged_; mutable bool converged_;
boost::any parallelInformation_; boost::any parallelInformation_;
bool isIORank_;
std::unique_ptr<Matrix> matrix_; std::unique_ptr<Matrix> matrix_;
Vector *rhs_; Vector *rhs_;