Skip to content
Snippets Groups Projects
Commit 9a50f0be authored by Sven Kaulmann's avatar Sven Kaulmann
Browse files

Fixed a bug where the application operator for a fem matrix was called unmeant.

parent 8282c573
No related branches found
No related tags found
No related merge requests found
......@@ -90,11 +90,11 @@ void printSparseRowMatrixMatlabStyle(const T& arg, std::string name, stream& out
const int I = arg.rows();
const int J = arg.cols();
out << boost::format("\n%s =sparse( %d, %d );") % name % I % J << std::endl;
for (size_t row = 0; row < arg.rows(); row++) {
for (size_t col = 0; col < arg.cols(); col++) {
const auto value = arg(row, col);
if (std::fabs(value) > eps)
out << name << "(" << row + 1 << "," << col + 1 << ")=" << std::setprecision(matlab_output_precision) << value
for (int row = 0; row < arg.rows(); row++) {
for (int col = 0; col < arg.cols(); col++) {
const double val = arg(row, col);
if (std::fabs(val) > eps)
out << name << "(" << row + 1 << "," << col + 1 << ")=" << std::setprecision(matlab_output_precision) << val
<< ";\n";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment