Reference documentation for deal.II version GIT 2c37b3e359 2022-05-26 00:10:02+00:00
\(\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\}}\)
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DataOutBase::DataOutFilter Class Reference

#include <deal.II/base/data_out_base.h>

Classes

struct  Point3Comp
 

Public Member Functions

 DataOutFilter ()
 
 DataOutFilter (const DataOutBase::DataOutFilterFlags &flags)
 
template<int dim>
void write_point (const unsigned int index, const Point< dim > &p)
 
template<int dim>
void write_cell (const unsigned int index, const unsigned int start, const unsigned int d1, const unsigned int d2, const unsigned int d3)
 
void write_cell_single (const unsigned int index, const unsigned int start, const unsigned int n_points, const ReferenceCell &reference_cell)
 
void write_data_set (const std::string &name, const unsigned int dimension, const unsigned int set_num, const Table< 2, double > &data_vectors)
 
void fill_node_data (std::vector< double > &node_data) const
 
void fill_cell_data (const unsigned int local_node_offset, std::vector< unsigned int > &cell_data) const
 
std::string get_data_set_name (const unsigned int set_num) const
 
unsigned int get_data_set_dim (const unsigned int set_num) const
 
const doubleget_data_set (const unsigned int set_num) const
 
unsigned int n_nodes () const
 
unsigned int n_cells () const
 
unsigned int n_data_sets () const
 
void flush_points ()
 
void flush_cells ()
 

Private Types

using Map3DPoint = std::multimap< Point< 3 >, unsigned int, Point3Comp >
 

Private Member Functions

void internal_add_cell (const unsigned int cell_index, const unsigned int pt_index)
 

Private Attributes

DataOutBase::DataOutFilterFlags flags
 
unsigned int node_dim
 
unsigned int num_cells
 
Map3DPoint existing_points
 
std::map< unsigned int, unsigned int > filtered_points
 
std::map< unsigned int, unsigned int > filtered_cells
 
std::vector< std::string > data_set_names
 
std::vector< unsigned int > data_set_dims
 
std::vector< std::vector< double > > data_sets
 

Detailed Description

DataOutFilter provides a way to remove redundant vertices and values generated by the deal.II output. By default, DataOutBase and the classes that build on it output data at each vertex of each cell. This means that data is output multiple times for each vertex of the mesh, once for each cell adjacent to the vertex. The purpose of this scheme is to support output of discontinuous quantities, either because the finite element space is discontinuous or because the quantity that is output is computed from a solution field and is discontinuous across faces (for example for quantities computed via DataPostprocessor; typical cases where output quantities are discontinuous are when a postprocessor computes a quantity using the gradient of the solution, which is generally discontinuous even if the element itself is continuous). Other cases where the output is discontinuous are if the data to be output is not a finite element field but, for example, results from a class such as MatrixOut.

This class is an attempt to rein in the amount of data that is written. If the fields that are written to files are indeed discontinuous, the only way to faithfully represent them is indeed to write multiple values for each vertex (this is typically done by creating multiple logical nodes in the output file, all of which have the same physical location; data is then associated to nodes, allowing to have multiple values associated with the same location). However, for fine meshes, one may not necessarily be interested in an exact representation of output fields that will likely only have small discontinuities. Rather, it may be sufficient to just output one value per vertex, which may be chosen arbitrarily from among those that are defined at this vertex, i.e., chosen arbitrarily from any of the adjacent cells.

Definition at line 1370 of file data_out_base.h.


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