Fix indentation and whitespace.

This commit is contained in:
Markus Blatt 2018-02-26 09:09:12 +01:00
parent 2e7313ac08
commit b5d55b9fb2
3 changed files with 13 additions and 9 deletions

View File

@ -547,7 +547,7 @@ namespace Opm {
//! constructor: just store a reference to a matrix //! constructor: just store a reference to a matrix
WellModelMatrixAdapter (const M& A, const WellModel& wellMod, WellModelMatrixAdapter (const M& A, const WellModel& wellMod,
bool matrix_add_well_contributions, bool matrix_add_well_contributions,
const boost::any& parallelInformation = boost::any() ) const boost::any& parallelInformation = boost::any() )
: A_( A ), wellMod_( wellMod ), comm_(), : A_( A ), wellMod_( wellMod ), comm_(),
matrix_add_well_contributions_(matrix_add_well_contributions) matrix_add_well_contributions_(matrix_add_well_contributions)
{ {

View File

@ -2111,16 +2111,18 @@ namespace Detail
// B and C have 1 row, nc colums and nonzero // B and C have 1 row, nc colums and nonzero
// at (i,j) only if well i has perforation at cell j. // at (i,j) only if well i has perforation at cell j.
for(auto colC = duneC_[0].begin(), endC = duneC_[0].end(); colC != endC; ++colC) { for ( auto colC = duneC_[0].begin(), endC = duneC_[0].end(); colC != endC; ++colC )
{
const auto row_index = colC.index(); const auto row_index = colC.index();
auto& row = mat[row_index]; auto& row = mat[row_index];
auto colB = duneB_[0].begin(); auto colB = duneB_[0].begin();
auto col = row.begin(); auto col = row.begin();
for(auto colB = duneB_[0].begin(), endB = duneB_[0].end(); colB != endB; ++colB) { for ( auto colB = duneB_[0].begin(), endB = duneB_[0].end(); colB != endB; ++colB )
{
const auto col_index = colB.index(); const auto col_index = colB.index();
// Move col to index pj // Move col to index pj
while(col != row.end() && col.index() < col_index) ++col; while ( col != row.end() && col.index() < col_index ) ++col;
assert(col != row.end() && col.index() == col_index); assert(col != row.end() && col.index() == col_index);
Dune::FieldMatrix<Scalar, numWellEq, numEq> tmp; Dune::FieldMatrix<Scalar, numWellEq, numEq> tmp;

View File

@ -55,23 +55,25 @@ public:
std::vector<int> cartesianToCompressed(size, -1); std::vector<int> cartesianToCompressed(size, -1);
auto begin = globalCell.begin(); auto begin = globalCell.begin();
for(auto cell = begin, end= globalCell.end(); cell != end; ++cell) for ( auto cell = begin, end= globalCell.end(); cell != end; ++cell )
{ {
cartesianToCompressed[ *cell ] = cell - begin; cartesianToCompressed[ *cell ] = cell - begin;
} }
int last_time_step = schedule.getTimeMap().size()-1; int last_time_step = schedule.getTimeMap().size() - 1;
const auto& schedule_wells = schedule.getWells(); const auto& schedule_wells = schedule.getWells();
wells_.reserve(schedule_wells.size()); wells_.reserve(schedule_wells.size());
// initialize the additional cell connections introduced by wells. // initialize the additional cell connections introduced by wells.
for (const auto well : schedule_wells) { for ( const auto well : schedule_wells )
{
std::vector<int> compressed_well_perforations; std::vector<int> compressed_well_perforations;
// All possible completions of the well // All possible completions of the well
const auto& completionSet = well->getCompletions(last_time_step); const auto& completionSet = well->getCompletions(last_time_step);
compressed_well_perforations.reserve(completionSet.size()); compressed_well_perforations.reserve(completionSet.size());
for (size_t c=0; c<completionSet.size(); c++) { for ( size_t c=0; c < completionSet.size(); c++ )
{
const auto& completion = completionSet.get(c); const auto& completion = completionSet.get(c);
int i = completion.getI(); int i = completion.getI();
int j = completion.getJ(); int j = completion.getJ();
@ -85,7 +87,7 @@ public:
} }
} }
if( ! compressed_well_perforations.empty() ) if ( ! compressed_well_perforations.empty() )
{ {
std::sort(compressed_well_perforations.begin(), std::sort(compressed_well_perforations.begin(),
compressed_well_perforations.end()); compressed_well_perforations.end());