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

@ -2111,16 +2111,18 @@ namespace Detail
// B and C have 1 row, nc colums and nonzero
// 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();
auto& row = mat[row_index];
auto colB = duneB_[0].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();
// 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);
Dune::FieldMatrix<Scalar, numWellEq, numEq> tmp;

View File

@ -55,23 +55,25 @@ public:
std::vector<int> cartesianToCompressed(size, -1);
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;
}
int last_time_step = schedule.getTimeMap().size()-1;
int last_time_step = schedule.getTimeMap().size() - 1;
const auto& schedule_wells = schedule.getWells();
wells_.reserve(schedule_wells.size());
// 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;
// All possible completions of the well
const auto& completionSet = well->getCompletions(last_time_step);
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);
int i = completion.getI();
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(),
compressed_well_perforations.end());