16#ifndef dealii_matrix_out_h
17# define dealii_matrix_out_h
26# ifdef DEAL_II_WITH_TRILINOS
138 template <
class Matrix>
141 const std::string &
name,
167 virtual const std::vector<Patch> &
174 virtual std::vector<std::string>
184 template <
class Matrix>
198 namespace MatrixOutImplementation
203 template <
typename number>
217 template <
typename number>
227# ifdef DEAL_II_WITH_TRILINOS
255# ifdef DEAL_II_WITH_PETSC
267 template <
class Matrix>
280template <
class Matrix>
317 average /= n_elements;
323template <
class Matrix>
326 const std::string &name,
345 patches.resize((gridpoints_x) * (gridpoints_y));
349 for (
size_type i = 0; i < gridpoints_y; ++i)
350 for (
size_type j = 0; j < gridpoints_x; ++j, ++index)
359 patches[index].vertices[0](0) = j;
360 patches[index].vertices[0](1) = -
static_cast<signed int>(i);
361 patches[index].vertices[1](0) = j;
362 patches[index].vertices[1](1) = -
static_cast<signed int>(i + 1);
363 patches[index].vertices[2](0) = j + 1;
364 patches[index].vertices[2](1) = -
static_cast<signed int>(i);
365 patches[index].vertices[3](0) = j + 1;
366 patches[index].vertices[3](1) = -
static_cast<signed int>(i + 1);
374 patches[index].n_subdivisions = 1;
376 patches[index].data.reinit(1, 4);
virtual const std::vector< Patch > & get_patches() const override
void build_patches(const Matrix &matrix, const std::string &name, const Options options=Options(false, 1, false))
static double get_gridpoint_value(const Matrix &matrix, const size_type i, const size_type j, const Options &options)
std::vector< Patch > patches
virtual ~MatrixOut() override=default
virtual std::vector< std::string > get_dataset_names() const override
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
Expression fabs(const Expression &x)
@ matrix
Contents is actually a matrix.
double get_element(const ::SparseMatrix< number > &matrix, const types::global_dof_index i, const types::global_dof_index j)
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
unsigned int global_dof_index
bool show_absolute_values
Options(const bool show_absolute_values=false, const unsigned int block_size=1, const bool discontinuous=false)