Reference documentation for deal.II version 9.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
DataOutBase::Patch< dim, spacedim > Struct Template Reference

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

Inheritance diagram for DataOutBase::Patch< dim, spacedim >:
[legend]

Public Member Functions

 Patch ()
 
bool operator== (const Patch &patch) const
 
std::size_t memory_consumption () const
 
void swap (Patch< dim, spacedim > &other_patch)
 

Static Public Member Functions

static ::ExceptionBaseExcInvalidCombinationOfDimensions (int arg1, int arg2)
 

Public Attributes

Point< spacedim > vertices [GeometryInfo< dim >::vertices_per_cell]
 
unsigned int neighbors [dim > 0 ? GeometryInfo< dim >::faces_per_cell :1]
 
unsigned int patch_index
 
unsigned int n_subdivisions
 
Table< 2, float > data
 
bool points_are_available
 

Static Public Attributes

static const unsigned int space_dim =spacedim
 
static const unsigned int no_neighbor = numbers::invalid_unsigned_int
 

Detailed Description

template<int dim, int spacedim = dim>
struct DataOutBase::Patch< dim, spacedim >

Data structure describing a patch of data in dim space dimensions.

A patch consists of the following data:

See the general documentation of the DataOutBase class for more information on its contents and purposes. In the case of two dimensions, the next picture is an example of n_subdivisions = 4 because the number of (sub)cells within each patch is equal to 2dim.

Author
Wolfgang Bangerth, Guido Kanschat

Definition at line 238 of file data_out_base.h.

Constructor & Destructor Documentation

◆ Patch()

template<int dim, int spacedim>
DataOutBase::Patch< dim, spacedim >::Patch ( )

Default constructor. Sets n_subdivisions to one, points_are_available to false, and patch_index to no_neighbor.

Definition at line 1651 of file data_out_base.cc.

Member Function Documentation

◆ operator==()

template<int dim, int spacedim>
bool DataOutBase::Patch< dim, spacedim >::operator== ( const Patch< dim, spacedim > &  patch) const

Compare the present patch for equality with another one. This is used in a few of the automated tests in our testsuite.

Definition at line 1670 of file data_out_base.cc.

◆ memory_consumption()

template<int dim, int spacedim>
std::size_t DataOutBase::Patch< dim, spacedim >::memory_consumption ( ) const

Return an estimate for the memory consumption, in bytes, of this object. This is not exact (but will usually be close) because calculating the memory usage of trees (e.g., std::map) is difficult.

Definition at line 1709 of file data_out_base.cc.

◆ swap()

template<int dim, int spacedim>
void DataOutBase::Patch< dim, spacedim >::swap ( Patch< dim, spacedim > &  other_patch)

Swap the current object's contents with those of the given argument.

Definition at line 1730 of file data_out_base.cc.

Member Data Documentation

◆ space_dim

template<int dim, int spacedim = dim>
const unsigned int DataOutBase::Patch< dim, spacedim >::space_dim =spacedim
static

Make the spacedim template parameter available.

Definition at line 243 of file data_out_base.h.

◆ vertices

template<int dim, int spacedim = dim>
Point<spacedim> DataOutBase::Patch< dim, spacedim >::vertices[GeometryInfo< dim >::vertices_per_cell]

Corner points of a patch. Interior points are computed by a multilinear transformation of the unit cell to the cell specified by these corner points, if points_are_available==false.

On the other hand, if points_are_available==true, then the coordinates of the points at which output is to be generated is attached in additional rows to the data table.

The order of points is the same as for cells in the triangulation.

Definition at line 257 of file data_out_base.h.

◆ neighbors

template<int dim, int spacedim = dim>
unsigned int DataOutBase::Patch< dim, spacedim >::neighbors[dim > 0 ? GeometryInfo< dim >::faces_per_cell : 1]

Patch indices of neighbors of the current patch. This is made available for the OpenDX format that requires neighbor information for advanced output. For dim==0 we still allow one neighbor, to avoid compiler warnings about zero-sized arrays.

Definition at line 269 of file data_out_base.h.

◆ patch_index

template<int dim, int spacedim = dim>
unsigned int DataOutBase::Patch< dim, spacedim >::patch_index

Number of this patch. Since we are not sure patches are always handled in the same order, we better store this.

Definition at line 275 of file data_out_base.h.

◆ n_subdivisions

template<int dim, int spacedim = dim>
unsigned int DataOutBase::Patch< dim, spacedim >::n_subdivisions

Number of subdivisions with which this patch is to be written. 1 means no subdivision, 2 means bisection, 3 trisection, etc.

Definition at line 282 of file data_out_base.h.

◆ data

template<int dim, int spacedim = dim>
Table<2,float> DataOutBase::Patch< dim, spacedim >::data

Data vectors. The format is as follows: data(i,.) denotes the data belonging to the ith data vector. data.n_cols() therefore equals the number of output points; this number is (subdivisions+1)^{dim}. data.n_rows() equals the number of data vectors. For the current purpose, a data vector equals one scalar, even if multiple scalars may later be interpreted as vectors.

Within each column, data(.,j) are the data values at the output point j, where j denotes the usual lexicographic ordering in deal.II. This is also the order of points as provided by the QIterated class when used with the QTrapez class as subquadrature.

Since the number of data vectors is usually the same for all patches to be printed, data.size() should yield the same value for all patches provided. The exception are patches for which points_are_available are set, where the actual coordinates of the point are appended to the 'data' field, see the documentation of the points_are_available flag.

Definition at line 305 of file data_out_base.h.

◆ points_are_available

template<int dim, int spacedim = dim>
bool DataOutBase::Patch< dim, spacedim >::points_are_available

A flag indicating whether the coordinates of the interior patch points (assuming that the patch is supposed to be subdivided further) are appended to the data table (true) or not (false). The latter is the default and in this case the locations of the points interior to this patch are computed by (bi-, tri-)linear interpolation from the vertices of the patch.

This option exists since patch points may be evaluated using a Mapping (rather than by a linear interpolation) and therefore have to be stored in the Patch structure.

Definition at line 319 of file data_out_base.h.

◆ no_neighbor

template<int dim, int spacedim = dim>
const unsigned int DataOutBase::Patch< dim, spacedim >::no_neighbor = numbers::invalid_unsigned_int
static

Value to be used if this patch has no neighbor on one side.

Definition at line 349 of file data_out_base.h.


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