Skip to content
Snippets Groups Projects
Commit ad1a6ba3 authored by Max Kahnt's avatar Max Kahnt
Browse files

Remove more braces.

parent d82319f1
No related branches found
No related tags found
No related merge requests found
...@@ -285,20 +285,16 @@ namespace MatrixVector { ...@@ -285,20 +285,16 @@ namespace MatrixVector {
const TransformationMatrix2& T2) { const TransformationMatrix2& T2) {
transformMatrixPattern(A, T1, B, T2); transformMatrixPattern(A, T1, B, T2);
A = 0.0; A = 0.0;
for (size_t k = 0; k < B.N(); ++k) { for (size_t k = 0; k < B.N(); ++k)
for (auto BklIt = B[k].begin(); BklIt != B[k].end(); ++BklIt) { for (auto BkIt = B[k].begin(); BkIt != B[k].end(); ++BkIt) {
size_t l = BklIt.index(); size_t l = BkIt.index();
for (auto T1kiIt = T1[k].begin(); T1kiIt != T1[k].end(); ++T1kiIt) { for (auto T1kIt = T1[k].begin(); T1kIt != T1[k].end(); ++T1kIt)
size_t i = T1kiIt.index(); for (auto T2lIt = T2[l].begin(); T2lIt != T2[l].end(); ++T2lIt) {
for (auto T2ljIt = T2[l].begin(); T2ljIt != T2[l].end(); ++T2ljIt) {
size_t j = T2ljIt.index();
MatrixBlockA Aij; MatrixBlockA Aij;
transformMatrix(Aij, *T1kiIt, *BklIt, *T2ljIt); transformMatrix(Aij, *T1kIt, *BkIt, *T2lIt);
A[i][j] += Aij; A[T1kIt.index()][T2lIt.index()] += Aij;
} }
}
} }
}
} }
template <class MatrixBlockA, class TransformationMatrix1, class MatrixB, template <class MatrixBlockA, class TransformationMatrix1, class MatrixB,
...@@ -308,18 +304,13 @@ namespace MatrixVector { ...@@ -308,18 +304,13 @@ namespace MatrixVector {
const MatrixB& B, const MatrixB& B,
const TransformationMatrix2& T2) { const TransformationMatrix2& T2) {
Dune::MatrixIndexSet indices(T1.M(), T2.M()); Dune::MatrixIndexSet indices(T1.M(), T2.M());
for (size_t k = 0; k < B.N(); ++k) { for (size_t k = 0; k < B.N(); ++k)
for (auto BklIt = B[k].begin(); BklIt != B[k].end(); ++BklIt) { for (auto BIt = B[k].begin(); BIt != B[k].end(); ++BIt) {
size_t l = BklIt.index(); size_t l = BIt.index();
for (auto T1kiIt = T1[k].begin(); T1kiIt != T1[k].end(); ++T1kiIt) { for (auto T1kIt = T1[k].begin(); T1kIt != T1[k].end(); ++T1kIt)
size_t i = T1kiIt.index(); for (auto T2lIt = T2[l].begin(); T2lIt != T2[l].end(); ++T2lIt)
for (auto T2ljIt = T2[l].begin(); T2ljIt != T2[l].end(); ++T2ljIt) { indices.add(T1kIt.index(), T2lIt.index());
size_t j = T2ljIt.index();
indices.add(i, j);
}
}
} }
}
indices.exportIdx(A); indices.exportIdx(A);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment