368 const std::string &
name,
372 (matrix.n() % options.
block_size != 0 ? 1 : 0)),
373 n_patches_y = (matrix.m() / options.
block_size +
374 (matrix.m() % options.
block_size != 0 ? 1 : 0));
388 for (
size_type i = 0; i < n_patches_y; ++i)
390 for (
size_type j = 0; j < n_patches_x; ++j)
405 n_patches_x * n_patches_y);
413 catch (
const std::bad_alloc &)
416 ExcMessage(
"You are trying to create a graphical "
417 "representation of a matrix that would "
418 "requiring outputting " +
420 std::to_string(n_patches) :
421 std::to_string(n_patches_x) +
"x" +
422 std::to_string(n_patches_y)) +
423 " patches. There is not enough memory to output " +
424 "this many patches."));
429 for (
size_type i = 0; i < n_patches_y; ++i)
430 for (
size_type j = 0; j < n_patches_x; ++j)
445 patches[index].n_subdivisions = 1;
455 patches[index].vertices[0][0] = j;
456 patches[index].vertices[0][1] = -
static_cast<signed int>(i);
457 patches[index].vertices[1][0] = j;
458 patches[index].vertices[1][1] = -
static_cast<signed int>(i + 1);
459 patches[index].vertices[2][0] = j + 1;
460 patches[index].vertices[2][1] = -
static_cast<signed int>(i);
461 patches[index].vertices[3][0] = j + 1;
462 patches[index].vertices[3][1] = -
static_cast<signed int>(i + 1);
467 for (
auto &vertex :
patches[index].vertices)
470 patches[index].n_subdivisions = 1;
472 patches[index].data.reinit(1, 4);
void build_patches(const Matrix &matrix, const std::string &name, const Options options=Options(false, 1, false, false))
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)