Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
MeshWorker::DoFInfo< dim, spacedim, number > Class Template Reference

#include <deal.II/meshworker/dof_info.h>

Inheritance diagram for MeshWorker::DoFInfo< dim, spacedim, number >:
[legend]

Public Member Functions

 DoFInfo (const BlockInfo &block_info)
 
 DoFInfo (const DoFHandler< dim, spacedim > &dof_handler)
 
template<class DHCellIterator >
void reinit (const DHCellIterator &c)
 
template<class DHCellIterator , class DHFaceIterator >
void reinit (const DHCellIterator &c, const DHFaceIterator &f, const unsigned int face_no)
 
template<class DHCellIterator , class DHFaceIterator >
void reinit (const DHCellIterator &c, const DHFaceIterator &f, const unsigned int face_no, const unsigned int subface_no)
 
template<class DHFaceIterator >
void set_face (const DHFaceIterator &f, const unsigned int face_no)
 
template<class DHFaceIterator >
void set_subface (const DHFaceIterator &f, const unsigned int face_no, const unsigned int subface_no)
 
- Public Member Functions inherited from MeshWorker::LocalResults< number >
unsigned int n_values () const
 
unsigned int n_vectors () const
 
unsigned int n_matrices () const
 
unsigned int n_quadrature_points () const
 
unsigned int n_quadrature_values () const
 
number & value (unsigned int i)
 
number value (unsigned int i) const
 
BlockVector< number > & vector (unsigned int i)
 
const BlockVector< number > & vector (unsigned int i) const
 
MatrixBlock< FullMatrix< number > > & matrix (unsigned int i, bool external=false)
 
const MatrixBlock< FullMatrix< number > > & matrix (unsigned int i, bool external=false) const
 
Table< 2, number > & quadrature_values ()
 
number & quadrature_value (unsigned int k, unsigned int i)
 
number quadrature_value (unsigned int k, unsigned int i) const
 
void initialize_numbers (const unsigned int n)
 
void initialize_vectors (const unsigned int n)
 
void initialize_matrices (unsigned int n, bool both)
 
template<typename MatrixType >
void initialize_matrices (const MatrixBlockVector< MatrixType > &matrices, bool both)
 
template<typename MatrixType >
void initialize_matrices (const MGMatrixBlockVector< MatrixType > &matrices, bool both)
 
void initialize_quadrature (unsigned int np, unsigned int nv)
 
void reinit (const BlockIndices &local_sizes)
 
std::size_t memory_consumption () const
 

Public Attributes

Triangulation< dim, spacedim >::cell_iterator cell
 The current cell.
 
Triangulation< dim, spacedim >::face_iterator face
 The current face.
 
unsigned int face_number
 
unsigned int sub_number
 
std::vector< types::global_dof_indexindices
 
std::vector< std::vector< types::global_dof_index > > indices_by_block
 
SmartPointer< const BlockInfo, DoFInfo< dim, spacedim > > block_info
 The block structure of the system.
 
bool level_cell
 

Private Member Functions

 DoFInfo ()
 
void set_block_indices ()
 Set up local block indices.
 
template<class DHCellIterator >
void get_indices (const DHCellIterator &c)
 Fill index vector with active indices.
 

Private Attributes

std::vector< types::global_dof_indexindices_org
 Auxiliary vector.
 
BlockIndices aux_local_indices
 

Detailed Description

template<int dim, int spacedim = dim, typename number = double>
class MeshWorker::DoFInfo< dim, spacedim, number >

A class containing information on geometry and degrees of freedom of a mesh object.

The information in these objects is usually used by one of the Assembler classes. It is also the kind of information which is needed in mesh based matrices (often referred to as matrix free methods).

In addition to the information on degrees of freedom stored in this class, it also provides the local computation space for the worker object operating on it in LocalResults. This base class will automatically be reinitialized on each cell, but initial setup is up to the user and should be done when initialize() for this class is called.

This class operates in two different modes, corresponding to the data models discussed in the Assembler namespace documentation.

The choice of the local data model is triggered by the vector BlockInfo::local_renumbering, which in turn is usually filled by BlockInfo::initialize_local(). If this function has been used, or the vector has been changed from zero-length, then local dof indices stored in this object will automatically be renumbered to reflect local block structure. This means, the first entries in indices will refer to the first block of the system, then comes the second block and so on.

The BlockInfo object is stored as a pointer. Therefore, if the block structure changes, for instance because of mesh refinement, the DoFInfo class will automatically use the new structures.

Author
Guido Kanschat, 2009

Definition at line 74 of file dof_info.h.

Constructor & Destructor Documentation

◆ DoFInfo() [1/3]

template<int dim, int spacedim = dim, typename number = double>
MeshWorker::DoFInfo< dim, spacedim, number >::DoFInfo ( const BlockInfo block_info)

Constructor setting the block_info pointer.

◆ DoFInfo() [2/3]

template<int dim, int spacedim, typename number >
MeshWorker::DoFInfo< dim, spacedim, number >::DoFInfo ( const DoFHandler< dim, spacedim > &  dof_handler)

Constructor leaving the block_info pointer empty, but setting the aux_local_indices.

Definition at line 294 of file dof_info.h.

◆ DoFInfo() [3/3]

template<int dim, int spacedim, typename number >
MeshWorker::DoFInfo< dim, spacedim, number >::DoFInfo ( )
private

Standard constructor, not setting any block indices. Use of this constructor is not recommended, but it is needed for the arrays in DoFInfoBox.

Definition at line 285 of file dof_info.h.

Member Function Documentation

◆ reinit() [1/3]

template<int dim, int spacedim, typename number >
template<class DHCellIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::reinit ( const DHCellIterator &  c)
inline

Set the current cell and fill indices.

Definition at line 326 of file dof_info.h.

◆ reinit() [2/3]

template<int dim, int spacedim, typename number >
template<class DHCellIterator , class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::reinit ( const DHCellIterator &  c,
const DHFaceIterator &  f,
const unsigned int  face_no 
)
inline

Set the current face and fill indices if the cell changed.

Definition at line 356 of file dof_info.h.

◆ reinit() [3/3]

template<int dim, int spacedim, typename number >
template<class DHCellIterator , class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::reinit ( const DHCellIterator &  c,
const DHFaceIterator &  f,
const unsigned int  face_no,
const unsigned int  subface_no 
)
inline

Set the current subface and fill indices if the cell changed.

Definition at line 391 of file dof_info.h.

◆ set_face()

template<int dim, int spacedim, typename number >
template<class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::set_face ( const DHFaceIterator &  f,
const unsigned int  face_no 
)
inline

Switch to a new face of the same cell. Does not change indices and does not reset data in LocalResults.

Definition at line 344 of file dof_info.h.

◆ set_subface()

template<int dim, int spacedim, typename number >
template<class DHFaceIterator >
void MeshWorker::DoFInfo< dim, spacedim, number >::set_subface ( const DHFaceIterator &  f,
const unsigned int  face_no,
const unsigned int  subface_no 
)
inline

Switch to a new subface of the same cell. Does not change indices and does not reset data in LocalResults.

Definition at line 378 of file dof_info.h.

Member Data Documentation

◆ face_number

template<int dim, int spacedim = dim, typename number = double>
unsigned int MeshWorker::DoFInfo< dim, spacedim, number >::face_number

The number of the current face on the current cell.

This number is numbers::invalid_unsigned_int if the info object was initialized with a cell.

Definition at line 89 of file dof_info.h.

◆ sub_number

template<int dim, int spacedim = dim, typename number = double>
unsigned int MeshWorker::DoFInfo< dim, spacedim, number >::sub_number

The number of the current subface on the current face

This number is numbers::invalid_unsigned_int if the info object was not initialized with a subface.

Definition at line 97 of file dof_info.h.

◆ indices

template<int dim, int spacedim = dim, typename number = double>
std::vector<types::global_dof_index> MeshWorker::DoFInfo< dim, spacedim, number >::indices

The DoF indices of the current cell

Definition at line 103 of file dof_info.h.

◆ indices_by_block

template<int dim, int spacedim = dim, typename number = double>
std::vector<std::vector<types::global_dof_index> > MeshWorker::DoFInfo< dim, spacedim, number >::indices_by_block

The DoF indices on the current cell, organized by local blocks. The size of this vector is zero, unless local blocks are used.

Definition at line 109 of file dof_info.h.

◆ level_cell

template<int dim, int spacedim = dim, typename number = double>
bool MeshWorker::DoFInfo< dim, spacedim, number >::level_cell

The structure refers to a cell with level data instead of active data.

Definition at line 176 of file dof_info.h.

◆ aux_local_indices

template<int dim, int spacedim = dim, typename number = double>
BlockIndices MeshWorker::DoFInfo< dim, spacedim, number >::aux_local_indices
private

An auxiliary local BlockIndices object created if block_info is not set. It contains just a single block of the size of degrees of freedom per cell.

Definition at line 203 of file dof_info.h.


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