deal.II version 9.7.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
MatrixOut::Options Struct Reference

#include <deal.II/lac/matrix_out.h>

Detailed Description

Class holding various variables which are used to modify the output of the MatrixOut class.

Definition at line 85 of file matrix_out.h.

Public Member Functions

 Options (const bool show_absolute_values=false, const unsigned int block_size=1, const bool discontinuous=false, const bool create_sparse_plot=true)

Public Attributes

bool show_absolute_values
unsigned int block_size
bool discontinuous
bool create_sparse_plot

Constructor & Destructor Documentation

◆ Options()

MatrixOut::Options::Options ( const bool show_absolute_values = false,
const unsigned int block_size = 1,
const bool discontinuous = false,
const bool create_sparse_plot = true )

Default constructor. Set all elements of this structure to their default values.

Definition at line 24 of file matrix_out.cc.

Member Data Documentation

◆ show_absolute_values

bool MatrixOut::Options::show_absolute_values

If true, only show the absolute values of the matrix entries, rather than their true values including the sign. This is useful if you have matrix entries that span a large range and want to display their magnitude using a logarithmic scale.

The default value is false.

Definition at line 95 of file matrix_out.h.

◆ block_size

unsigned int MatrixOut::Options::block_size

If larger than one, do not show each element of the matrix, but rather an average over a number of entries. The number of output patches is accordingly smaller. This flag determines how large each shown block shall be (in rows/columns). For example, if it is two, then always four entries are collated into one.

The default value is one.

Definition at line 106 of file matrix_out.h.

◆ discontinuous

bool MatrixOut::Options::discontinuous

By default, this class shows each matrix entry as one value, and then produces a bilinear display of all of these values. This results in a continuous plot on a mesh with \(N\times N\) vertices for a matrix of size \(N\). If, on the other hand, the current variable is set to true, then this class instead creates a plot in which each matrix entry corresponds to a single patch on which the value of the matrix entry is shown as a constant function. This creates a discontinuous plot with \(N\times N\) cells on a mesh of size \((N+1)\times(N+1)\).

The default value is false.

Definition at line 121 of file matrix_out.h.

◆ create_sparse_plot

bool MatrixOut::Options::create_sparse_plot

If this flag is set to false, the MatrixOut class creates a plot in which each matrix entry is actually shown, even if it is zero. For large matrices, this results in very large output files, or indeed exhausts the available memory. On the other hand, if the current flags is set to true, then the class only outputs patches whenever there are non-zero matrix entries to be shown. For sparse matrices, this leads to an output size that is proportional to the number of nonzero entries, rather than proportional to \(N^2\).

The default is true.

Note
Internally, the current implementation continues to loop over all matrix entries, whether they are zero or not. As a consequence, the run time of outputting sparse matrices continues to be proportional to \(N^2\), rather than proportional to the number of nonzero entries. For large matrices, this means that you still have to have patience – but at least it is possible to output information about matrices of size \(10,000\times 10,000\) or \(50,000\times 50,000\) with a few million nonzero entries.

Definition at line 146 of file matrix_out.h.


The documentation for this struct was generated from the following files: