mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Formatting and indentation fixes.
This commit is contained in:
@@ -68,11 +68,18 @@ Dune::MatrixAdapter<M,X,Y> createOperator(const Dune::MatrixAdapter<M,X,Y>&, con
|
||||
return Dune::MatrixAdapter<M,X,Y>(matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Creates a MatrixAdapter as an operator, storing it in a unique_ptr.
|
||||
*
|
||||
* The first argument is used to specify the return type using function overloading.
|
||||
* \param matrix The matrix to wrap.
|
||||
*/
|
||||
template<class M, class X, class Y, class T>
|
||||
std::unique_ptr< Dune::MatrixAdapter<M,X,Y> > createOperatorPtr(const Dune::MatrixAdapter<M,X,Y>&, const M& matrix, const T&)
|
||||
{
|
||||
return std::make_unique< Dune::MatrixAdapter<M,X,Y> >(matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Creates an OverlappingSchwarzOperator as an operator.
|
||||
*
|
||||
@@ -110,21 +117,18 @@ scaleMatrixDRS(const Operator& op, const Communication& comm,
|
||||
const BlockVector& bw = weights[i.index()];
|
||||
const auto endj = (*i).end();
|
||||
for (auto j = (*i).begin(); j != endj; ++j) {
|
||||
{
|
||||
BlockVector bvec(0.0);
|
||||
Block& block = *j;
|
||||
for (std::size_t ii = 0; ii < Block::rows; ii++) {
|
||||
for (std::size_t jj = 0; jj < Block::cols; jj++) {
|
||||
// should introduce limmits which also change the weights
|
||||
bvec[jj] += bw[ii]*block[ii][jj];
|
||||
//block[pressureIndex][j] += block[i][j];
|
||||
}
|
||||
}
|
||||
block[pressureIndex] = bvec;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return std::make_tuple(std::move(matrix), createOperator(op, *matrix, comm));
|
||||
}
|
||||
|
||||
@@ -145,7 +149,6 @@ void scaleVectorDRS(Vector& vector, std::size_t pressureIndex, const Opm::CPRPar
|
||||
const Block& bw = weights[j];
|
||||
for (std::size_t i = 0; i < Block::dimension; i++) {
|
||||
val += bw[i]*block[i];
|
||||
//block[pressureIndex] += block[i];
|
||||
}
|
||||
block[pressureIndex] = val;
|
||||
}
|
||||
@@ -1022,7 +1025,6 @@ private:
|
||||
LevelTransferPolicy levelTransferPolicy_;
|
||||
CoarseSolverPolicy coarseSolverPolicy_;
|
||||
TwoLevelMethod twoLevelMethod_;
|
||||
//BlockVector weights_;
|
||||
};
|
||||
|
||||
namespace ISTLUtility
|
||||
|
||||
@@ -191,8 +191,7 @@ createAMGPreconditionerPointer(Op& opA, const double relax, const P& comm,
|
||||
const Vector& weights)
|
||||
{
|
||||
using AMG = BlackoilAmg<Op,S,C,P,index>;
|
||||
const int verbosity = ( params.cpr_solver_verbose_ &&
|
||||
comm.communicator().rank()==0 ) ? 1 : 0;
|
||||
const int verbosity = ( params.cpr_solver_verbose_ && comm.communicator().rank() == 0 ) ? 1 : 0;
|
||||
|
||||
// TODO: revise choice of parameters
|
||||
int coarsenTarget=1200;
|
||||
|
||||
Reference in New Issue
Block a user