Commit cd3dd66a authored by D'azevedo, Ed's avatar D'azevedo, Ed Committed by Alvarez, Gonzalo
Browse files

add push to another method

parent 81f3714b
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1379,14 +1379,23 @@ void fromBlockToFull(CrsMatrix<T>& Bfull,

        Bfull.reserve( B.nonZeros() );

        const bool use_push = true;

	for (SizeType ii = 0; ii < B.rows(); ++ii) {
		SizeType i = ii + offset;
		Bfull.setRow(i, counter);
		for (int jj = B.getRowPtr(ii); jj < B.getRowPtr(ii + 1); ++jj) {
			SizeType j = B.getCol(jj) + offset;
			T tmp = B.getValue(jj);
                        if (use_push) {
                           Bfull.pushCol(j);
                           Bfull.pushValue(tmp);
                        }
                        else {
			   Bfull.setCol(counter, j);
			Bfull.setValues(counter++, tmp);
			   Bfull.setValues(counter, tmp);
                           counter++;
                        };
		}
	}