Reference documentation for deal.II version 9.6.2
 
\(\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
DataOutBase::Patch< 0, spacedim > Struct Template Reference

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

Inheritance diagram for DataOutBase::Patch< 0, spacedim >:

Public Member Functions

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

Static Public Member Functions

static ::ExceptionBaseExcInvalidCombinationOfDimensions (int arg1, int arg2)
 
static ::ExceptionBaseExcInvalidCombinationOfDimensions (int arg1, int arg2)
 

Public Attributes

Point< spacedim > vertices [1]
 
unsigned int patch_index
 
Table< 2, float > data
 
bool points_are_available
 
std::array< Point< spacedim >, GeometryInfo< dim >::vertices_per_cellvertices
 
std::array< unsigned int, GeometryInfo< dim >::faces_per_cellneighbors
 
unsigned int patch_index
 
unsigned int n_subdivisions
 
Table< 2, float > data
 
bool points_are_available
 
ReferenceCell reference_cell
 

Static Public Attributes

static const unsigned int space_dim = spacedim
 
static unsigned int neighbors [1]
 
static const unsigned int n_subdivisions
 
static const ReferenceCell reference_cell
 
static const unsigned int no_neighbor = numbers::invalid_unsigned_int
 
static const unsigned int space_dim
 
static const unsigned int no_neighbor
 

Detailed Description

template<int spacedim>
struct DataOutBase::Patch< 0, spacedim >

A specialization of the general Patch<dim,spacedim> template that is tailored to the case of points, i.e., zero-dimensional objects embedded in spacedim dimensional space.

The current class is compatible with the general template to allow for using the same functions accessing patches of arbitrary dimensionality in a generic way. However, it makes some variables that are nonsensical for zero-dimensional patches into static variables that exist only once in the entire program, as opposed to once per patch. Specifically, this is the case for the neighbors array and the n_subdivisions member variable that make no sense for zero-dimensional patches because points have no natural neighbors across their non-existent faces, nor can they reasonably be subdivided.

Definition at line 417 of file data_out_base.h.

Constructor & Destructor Documentation

◆ Patch() [1/2]

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

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

Definition at line 1880 of file data_out_base.cc.

◆ Patch() [2/2]

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 352 of file data_out_base.cc.

Member Function Documentation

◆ operator==() [1/2]

template<int spacedim>
bool DataOutBase::Patch< 0, spacedim >::operator== ( const Patch< 0, 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 1891 of file data_out_base.cc.

◆ memory_consumption() [1/2]

template<int spacedim>
std::size_t DataOutBase::Patch< 0, 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 1925 of file data_out_base.cc.

◆ swap() [1/2]

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

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

Definition at line 1937 of file data_out_base.cc.

◆ operator==() [2/2]

bool DataOutBase::Patch< dim, spacedim >::operator== ( const Patch< 0, 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 359 of file data_out_base.cc.

◆ memory_consumption() [2/2]

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 368 of file data_out_base.cc.

◆ swap() [2/2]

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

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

Definition at line 374 of file data_out_base.cc.

◆ ExcInvalidCombinationOfDimensions()

static ::ExceptionBase & DataOutBase::Patch< dim, spacedim >::ExcInvalidCombinationOfDimensions ( int arg1,
int arg2 )
static

Exception

Note
The message that will be printed by this exception reads:
<< "It is not possible to have a structural dimension of " << arg1 << " to be larger than the space dimension of the surrounding" << " space " << arg2

Member Data Documentation

◆ space_dim [1/2]

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

Make the spacedim template parameter available.

Definition at line 422 of file data_out_base.h.

◆ vertices [1/2]

template<int spacedim>
Point<spacedim> DataOutBase::Patch< 0, spacedim >::vertices[1]

Corner points of a patch. For the current class of zero-dimensional patches, there is of course only a single vertex.

If points_are_available==true, then the coordinates of the point at which output is to be generated is attached as an additional row to the data table.

Definition at line 432 of file data_out_base.h.

◆ neighbors [1/2]

template<int spacedim>
unsigned int DataOutBase::Patch< 0, spacedim >::neighbors[1]
static

An unused, static variable that exists only to allow access from general code in a generic fashion.

Definition at line 438 of file data_out_base.h.

◆ patch_index [1/2]

template<int spacedim>
unsigned int DataOutBase::Patch< 0, 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 444 of file data_out_base.h.

◆ n_subdivisions [1/2]

template<int spacedim>
const unsigned int DataOutBase::Patch< 0, spacedim >::n_subdivisions
static

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

Since subdivision makes no sense for zero-dimensional patches, this variable is not used but exists only to allow access from general code in a generic fashion.

Definition at line 455 of file data_out_base.h.

◆ data [1/2]

template<int spacedim>
Table<2, float> DataOutBase::Patch< 0, 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 of course one for the current class, given that we produce output on points. 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; for the current class, j can only be zero.

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 477 of file data_out_base.h.

◆ points_are_available [1/2]

template<int spacedim>
bool DataOutBase::Patch< 0, 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 491 of file data_out_base.h.

◆ reference_cell [1/2]

template<int spacedim>
const ReferenceCell DataOutBase::Patch< 0, spacedim >::reference_cell
static

Reference-cell type of the underlying cell of this patch. Since for zero-dimensional objects, a patch can only refer to a vertex, this field is always equal to ReferenceCells::Vertex and can not be changed.

Definition at line 498 of file data_out_base.h.

◆ no_neighbor [1/2]

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

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

Definition at line 531 of file data_out_base.h.

◆ space_dim [2/2]

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

Make the spacedim template parameter available.

Definition at line 260 of file data_out_base.h.

◆ vertices [2/2]

std::array<Point<spacedim>, GeometryInfo<dim>::vertices_per_cell> DataOutBase::Patch< dim, spacedim >::vertices

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.

Note
This array is sized to accommodate the maximal number of vertices one might encounter in a cell, namely those for a hypercube cell. For other kinds of cells (triangles, tetrahedra, etc.), only the first few elements of this array will be used.

Definition at line 279 of file data_out_base.h.

◆ neighbors [2/2]

std::array<unsigned int, GeometryInfo<dim>::faces_per_cell> DataOutBase::Patch< dim, spacedim >::neighbors

Patch indices of neighbors of the current patch. This is made available for the OpenDX format that requires neighbor information for advanced output.

Note
This array is sized to accommodate the maximal number of faces one might encounter in a cell, namely those for a hypercube cell. For other kinds of cells (triangles, tetrahedra, etc.), only the first few elements of this array will be used.

Definition at line 291 of file data_out_base.h.

◆ patch_index [2/2]

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 297 of file data_out_base.h.

◆ n_subdivisions [2/2]

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 304 of file data_out_base.h.

◆ data [2/2]

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 QTrapezoid 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 327 of file data_out_base.h.

◆ points_are_available [2/2]

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 341 of file data_out_base.h.

◆ reference_cell [2/2]

ReferenceCell DataOutBase::Patch< dim, spacedim >::reference_cell

Reference-cell type of the underlying cell of this patch.

Definition at line 346 of file data_out_base.h.

◆ no_neighbor [2/2]

const unsigned int DataOutBase::Patch< dim, spacedim >::no_neighbor
static

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

Definition at line 379 of file data_out_base.h.


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