![]() |
Reference documentation for deal.II version 8.1.0
|
#include <matrix_out.h>
Classes | |
struct | Options |
Public Types | |
typedef types::global_dof_index | size_type |
![]() | |
enum | OutputFormat |
Public Member Functions | |
virtual | ~MatrixOut () |
template<class Matrix > | |
void | build_patches (const Matrix &matrix, const std::string &name, const Options options=Options(false, 1, false)) |
![]() | |
DataOutInterface () | |
virtual | ~DataOutInterface () |
void | write_dx (std::ostream &out) const |
void | write_eps (std::ostream &out) const |
void | write_gmv (std::ostream &out) const |
void | write_gnuplot (std::ostream &out) const |
void | write_povray (std::ostream &out) const |
void | write_tecplot (std::ostream &out) const |
void | write_tecplot_binary (std::ostream &out) const |
void | write_ucd (std::ostream &out) const |
void | write_vtk (std::ostream &out) const |
void | write_vtu (std::ostream &out) const |
void | write_vtu_in_parallel (const char *filename, MPI_Comm comm) const |
void | write_pvtu_record (std::ostream &out, const std::vector< std::string > &piece_names) const |
void | write_pvd_record (std::ostream &out, const std::vector< std::pair< double, std::string > > ×_and_names) const |
void | write_visit_record (std::ostream &out, const std::vector< std::string > &piece_names) const |
void | write_visit_record (std::ostream &out, const std::vector< std::vector< std::string > > &piece_names) const |
void | write_svg (std::ostream &out) const |
void | write_deal_II_intermediate (std::ostream &out) const |
XDMFEntry | create_xdmf_entry (const std::string &h5_filename, const double cur_time, MPI_Comm comm) const DEAL_II_DEPRECATED |
XDMFEntry | create_xdmf_entry (const DataOutFilter &data_filter, const std::string &h5_filename, const double cur_time, MPI_Comm comm) const |
XDMFEntry | create_xdmf_entry (const DataOutFilter &data_filter, const std::string &h5_mesh_filename, const std::string &h5_solution_filename, const double cur_time, MPI_Comm comm) const |
void | write_xdmf_file (const std::vector< XDMFEntry > &entries, const std::string &filename, MPI_Comm comm) const |
void | write_hdf5_parallel (const std::string &filename, MPI_Comm comm) const DEAL_II_DEPRECATED |
void | write_hdf5_parallel (const DataOutFilter &data_filter, const std::string &filename, MPI_Comm comm) const |
void | write_hdf5_parallel (const DataOutFilter &data_filter, const bool write_mesh_file, const std::string &mesh_filename, const std::string &solution_filename, MPI_Comm comm) const |
void | write_filtered_data (DataOutFilter &filtered_data) const |
void | write (std::ostream &out, const OutputFormat output_format=default_format) const |
void | set_default_format (const OutputFormat default_format) |
void | set_flags (const DXFlags &dx_flags) |
void | set_flags (const UcdFlags &ucd_flags) |
void | set_flags (const GnuplotFlags &gnuplot_flags) |
void | set_flags (const PovrayFlags &povray_flags) |
void | set_flags (const EpsFlags &eps_flags) |
void | set_flags (const GmvFlags &gmv_flags) |
void | set_flags (const TecplotFlags &tecplot_flags) |
void | set_flags (const VtkFlags &vtk_flags) |
void | set_flags (const SvgFlags &svg_flags) |
void | set_flags (const Deal_II_IntermediateFlags &deal_II_intermediate_flags) |
std::string | default_suffix (const OutputFormat output_format=default_format) const |
void | parse_parameters (ParameterHandler &prm) |
std::size_t | memory_consumption () const |
Private Types | |
typedef ::DataOutBase::Patch< 2, 2 > | Patch |
Private Member Functions | |
virtual const std::vector< Patch > & | get_patches () const |
virtual std::vector< std::string > | get_dataset_names () const |
Static Private Member Functions | |
template<typename number > | |
static double | get_element (const SparseMatrix< number > &matrix, const size_type i, const size_type j) |
template<typename number > | |
static double | get_element (const BlockSparseMatrix< number > &matrix, const size_type i, const size_type j) |
template<class Matrix > | |
static double | get_element (const Matrix &matrix, const size_type i, const size_type j) |
template<class Matrix > | |
static double | get_gridpoint_value (const Matrix &matrix, const size_type i, const size_type j, const Options &options) |
Private Attributes | |
std::vector< Patch > | patches |
std::string | name |
Additional Inherited Members | |
![]() | |
static void | declare_parameters (ParameterHandler &prm) |
![]() | |
virtual std::vector< std_cxx1x::tuple< unsigned int, unsigned int, std::string > > | get_vector_data_ranges () const |
![]() | |
unsigned int | default_subdivisions |
Output a matrix in graphical form using the generic format independent output routines of the base class. The matrix is converted into a list of patches on a 2d domain where the height is given by the elements of the matrix. The functions of the base class can then write this "mountain representation" of the matrix in a variety of graphical output formats. The coordinates of the matrix output are that the columns run with increasing x-axis, as usual, starting from zero, while the rows run into the negative y-axis, also starting from zero. Note that due to some internal restrictions, this class can only output one matrix at a time, i.e. it can not take advantage of the multiple dataset capabilities of the base class.
A typical usage of this class would be as follows:
Of course, you can as well choose a different graphical output format. Also, this class supports any matrix, not only of type FullMatrix, as long as it satisfies a number of requirements, stated with the member functions of this class.
The generation of patches through the build_patches() function can be modified by giving it an object holding certain flags. See the documentation of the members of the Options class for a description of these flags.
To avoid a compiler error in Sun's Forte compiler, we derive privately from DataOutBase. Since the base class DataOutInterface does so as well, this does no harm, but calms the compiler which is suspecting an access control conflict otherwise. Testcase here:
Definition at line 93 of file matrix_out.h.
Declare type for container size.
Definition at line 99 of file matrix_out.h.
|
private |
Abbreviate the somewhat lengthy name for the DataOutBase::Patch class.
Note that we have to indicate the global scope in front of DataOutBase, since otherwise the C++ rules specify that this here indicates the DataOutBase base class of this class. Since that is a private base class, we cannot access its members, and so access to the local Patch type would be forbidden.
Definition at line 222 of file matrix_out.h.
|
virtual |
Destructor. Declared in order to make it virtual.
void MatrixOut::build_patches | ( | const Matrix & | matrix, |
const std::string & | name, | ||
const Options | options = Options(false, 1, false) |
||
) |
Generate a list of patches from the given matrix and use the given string as the name of the data set upon writing to a file. Once patches have been built, you can use the functions of the base class to write the data into a files, using one of the supported output formats.
You may give a structure holding various options. See the description of the fields of this structure for more information.
Note that this function requires that we can extract elements of the matrix, which is done using the get_element() function declared below. By adding specializations, you can extend this class to other matrix classes which are not presently supported. Furthermore, we need to be able to extract the size of the matrix, for which we assume that the matrix type offers member functions m()
and n()
, which return the number of rows and columns, respectively.
Definition at line 392 of file matrix_out.h.
|
privatevirtual |
Function by which the base class's functions get to know what patches they shall write to a file.
Implements DataOutInterface< 2, 2 >.
|
privatevirtual |
Virtual function through which the names of data sets are obtained by the output functions of the base class.
Implements DataOutInterface< 2, 2 >.
|
inlinestaticprivate |
Return the element with given indices of a sparse matrix.
Definition at line 316 of file matrix_out.h.
|
inlinestaticprivate |
Return the element with given indices of a block sparse matrix.
Definition at line 329 of file matrix_out.h.
|
inlinestaticprivate |
Return the element with given indices from any matrix type for which no specialization of this function was declared above. This will call operator()
on the matrix.
Definition at line 342 of file matrix_out.h.
|
inlinestaticprivate |
Get the value of the matrix at gridpoint (i,j)
. Depending on the given flags, this can mean different things, for example if only absolute values shall be shown then the absolute value of the matrix entry is taken. If the block size is larger than one, then an average of several matrix entries is taken.
Definition at line 354 of file matrix_out.h.
|
private |
This is a list of patches that is created each time build_patches() is called. These patches are used in the output routines of the base classes.
Definition at line 232 of file matrix_out.h.
|
private |
Name of the matrix to be written.
Definition at line 238 of file matrix_out.h.