Skip to content
Snippets Groups Projects
Commit 37a844a4 authored by Oliver Sander's avatar Oliver Sander
Browse files

Replace a few explicit types by the 'auto' keyword

This is primarily in preparation for the next patch, which becomes much
shorter with 'auto'.
parent d350d86a
No related branches found
No related tags found
No related merge requests found
......@@ -784,23 +784,17 @@ public:
// ////////////////////////
// Nonsymmetric case
// ////////////////////////
typedef typename OperatorType::row_type RowType;
typedef typename RowType::ConstIterator ColumnIterator;
typedef typename TransferOperatorType::row_type TransferRowType;
typedef typename TransferRowType::ConstIterator TransferColumnIterator;
// Clear coarse matrix
coarseMat = 0;
// Loop over all rows of the stiffness matrix
for (size_t v=0; v<fineMat.N(); v++)
{
const RowType& row = fineMat[v];
const auto& row = fineMat[v];
// Loop over all columns of the stiffness matrix
ColumnIterator m = row.begin();
ColumnIterator mEnd = row.end();
auto m = row.begin();
auto mEnd = row.end();
for (; m!=mEnd; ++m)
{
......@@ -809,21 +803,21 @@ public:
int w = m.index();
// Loop over all coarse grid vectors iv that have v in their support
TransferColumnIterator im = matrix[v].begin();
TransferColumnIterator imEnd = matrix[v].end();
auto im = matrix[v].begin();
auto imEnd = matrix[v].end();
for (; im!=imEnd; ++im)
{
int iv = im.index();
// Loop over all coarse grid vectors jv that have w in their support
TransferColumnIterator jm = matrix[w].begin();
TransferColumnIterator jmEnd = matrix[w].end();
auto jm = matrix[w].begin();
auto jmEnd = matrix[w].end();
for (; jm!=jmEnd; ++jm)
{
int jv = jm.index();
typename OperatorType::block_type& cm = coarseMat[iv][jv];
auto& cm = coarseMat[iv][jv];
// Compute cm = im^T * m * jm
if(TransferOperatorType::block_type::rows==1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment