* matrix into a global one.
*/
void assemble(
- MATRIX& global,
+ MatrixBlock<MATRIX>& global,
const FullMatrix<number>& local,
unsigned int block_row,
unsigned int block_col,
template <class MATRIX, typename number>
inline void
MatrixLocalBlocksToGlobalBlocks<MATRIX, number>::assemble(
- MATRIX& global,
+ MatrixBlock<MATRIX>& global,
const FullMatrix<number>& local,
unsigned int block_row,
unsigned int block_col,
const unsigned int row = matrices->block(i).row;
const unsigned int col = matrices->block(i).column;
- assemble(matrices->matrix(i), info.matrix(i,false).matrix, row, col, info.indices, info.indices);
+ assemble(matrices->block(i), info.matrix(i,false).matrix, row, col, info.indices, info.indices);
}
}
const unsigned int row = matrices->block(i).row;
const unsigned int col = matrices->block(i).column;
- assemble(matrices->matrix(i), info1.matrix(i,false).matrix, row, col, info1.indices, info1.indices);
- assemble(matrices->matrix(i), info1.matrix(i,true).matrix, row, col, info1.indices, info2.indices);
- assemble(matrices->matrix(i), info2.matrix(i,false).matrix, row, col, info2.indices, info2.indices);
- assemble(matrices->matrix(i), info2.matrix(i,true).matrix, row, col, info2.indices, info1.indices);
+ assemble(matrices->block(i), info1.matrix(i,false).matrix, row, col, info1.indices, info1.indices);
+ assemble(matrices->block(i), info1.matrix(i,true).matrix, row, col, info1.indices, info2.indices);
+ assemble(matrices->block(i), info2.matrix(i,false).matrix, row, col, info2.indices, info2.indices);
+ assemble(matrices->block(i), info2.matrix(i,true).matrix, row, col, info2.indices, info1.indices);
}
}
* the block at position <i>i</i>.
*/
const MatrixBlock<MATRIX>& block(unsigned int i) const;
+ /**
+ * Access a reference to
+ * the block at position <i>i</i>.
+ */
+ MatrixBlock<MATRIX>& block(unsigned int i);
/**
* Access the matrix at position
* <i>i</i> for read and write
}
+template <class MATRIX>
+inline MatrixBlock<MATRIX>&
+MatrixBlockVector<MATRIX>::block(unsigned int i)
+{
+ return *(*this)(i);
+}
+
+
template <class MATRIX>
inline MATRIX&
MatrixBlockVector<MATRIX>::matrix(unsigned int i)