Reference documentation for deal.II version 9.5.0
\(\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
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | 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)
 
const BlockIndiceslocal_indices () const
 
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 (const unsigned int i)
 
number value (const unsigned int i) const
 
BlockVector< number > & vector (const unsigned int i)
 
const BlockVector< number > & vector (const unsigned int i) const
 
MatrixBlock< FullMatrix< number > > & matrix (const unsigned int i, const bool external=false)
 
const MatrixBlock< FullMatrix< number > > & matrix (const unsigned int i, const bool external=false) const
 
Table< 2, number > & quadrature_values ()
 
number & quadrature_value (const unsigned int k, const unsigned int i)
 
number quadrature_value (const unsigned int k, const unsigned int i) const
 
void initialize_numbers (const unsigned int n)
 
void initialize_vectors (const unsigned int n)
 
void initialize_matrices (const 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 (const unsigned int np, const unsigned int nv)
 
void reinit (const BlockIndices &local_sizes)
 
template<class StreamType >
void print_debug (StreamType &os) const
 
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
 
std::vector< number > J
 
std::vector< BlockVector< number > > R
 
std::vector< MatrixBlock< FullMatrix< number > > > M1
 
std::vector< MatrixBlock< FullMatrix< number > > > M2
 
Table< 2, number > quadrature_data
 

Friends

class DoFInfoBox< dim, DoFInfo< dim, spacedim, number > >
 

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.

Definition at line 75 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 300 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 291 of file dof_info.h.

Member Function Documentation

◆ reinit() [1/4]

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 332 of file dof_info.h.

◆ reinit() [2/4]

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 362 of file dof_info.h.

◆ reinit() [3/4]

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 397 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 350 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 384 of file dof_info.h.

◆ local_indices()

template<int dim, int spacedim, typename number >
const BlockIndices & MeshWorker::DoFInfo< dim, spacedim, number >::local_indices
inline

Definition at line 420 of file dof_info.h.

◆ set_block_indices()

template<int dim, int spacedim = dim, typename number = double>
void MeshWorker::DoFInfo< dim, spacedim, number >::set_block_indices ( )
private

Set up local block indices.

◆ get_indices()

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

Fill index vector with active indices.

Definition at line 315 of file dof_info.h.

◆ n_values()

template<typename number >
unsigned int MeshWorker::LocalResults< number >::n_values
inlineinherited

The number of scalar values stored by the current object.

This number is set to a nonzero value by Assembler::CellsAndFaces

Definition at line 533 of file local_results.h.

◆ n_vectors()

template<typename number >
unsigned int MeshWorker::LocalResults< number >::n_vectors
inlineinherited

The number of vectors stored by the current object.

This number is set to a nonzero value by Assembler::ResidualSimple and Assembler::ResidualLocalBlocksToGlobalBlocks.

Definition at line 541 of file local_results.h.

◆ n_matrices()

template<typename number >
unsigned int MeshWorker::LocalResults< number >::n_matrices
inlineinherited

The number of matrices stored by the current object.

Definition at line 549 of file local_results.h.

◆ n_quadrature_points()

template<typename number >
unsigned int MeshWorker::LocalResults< number >::n_quadrature_points
inlineinherited

The number of quadrature points in quadrature_values().

Definition at line 557 of file local_results.h.

◆ n_quadrature_values()

template<typename number >
unsigned int MeshWorker::LocalResults< number >::n_quadrature_values
inlineinherited

The number of values in each quadrature point in quadrature_values().

Definition at line 565 of file local_results.h.

◆ value() [1/2]

template<typename number >
number & MeshWorker::LocalResults< number >::value ( const unsigned int  i)
inlineinherited

Read-write access to the ith scalar stored by this class.

Definition at line 573 of file local_results.h.

◆ value() [2/2]

template<typename number >
number MeshWorker::LocalResults< number >::value ( const unsigned int  i) const
inlineinherited

Read access to the ith scalar stored by this class.

Definition at line 622 of file local_results.h.

◆ vector() [1/2]

template<typename number >
BlockVector< number > & MeshWorker::LocalResults< number >::vector ( const unsigned int  i)
inlineinherited

Read-write access to the ith vector stored by this class

Definition at line 582 of file local_results.h.

◆ vector() [2/2]

template<typename number >
const BlockVector< number > & MeshWorker::LocalResults< number >::vector ( const unsigned int  i) const
inlineinherited

Read-write access to the ith vector stored by this class

Definition at line 631 of file local_results.h.

◆ matrix() [1/2]

template<typename number >
MatrixBlock< FullMatrix< number > > & MeshWorker::LocalResults< number >::matrix ( const unsigned int  i,
const bool  external = false 
)
inlineinherited

Read-write access to the ith matrix stored by this class.

For an explanation of the second argument, see the documentation of the current class itself.

Definition at line 591 of file local_results.h.

◆ matrix() [2/2]

template<typename number >
const MatrixBlock< FullMatrix< number > > & MeshWorker::LocalResults< number >::matrix ( const unsigned int  i,
const bool  external = false 
) const
inlineinherited

Read access to the ith matrix stored by this class.

For an explanation of the second argument, see the documentation of the current class itself.

Definition at line 640 of file local_results.h.

◆ quadrature_values()

template<typename number >
Table< 2, number > & MeshWorker::LocalResults< number >::quadrature_values
inlineinherited

Access to the vector quadrature_data of data in quadrature points, organized such that there is a vector for each point, containing one entry for each component.

Definition at line 614 of file local_results.h.

◆ quadrature_value() [1/2]

template<typename number >
number & MeshWorker::LocalResults< number >::quadrature_value ( const unsigned int  k,
const unsigned int  i 
)
inlineinherited

Access the ith value at quadrature point k

Definition at line 605 of file local_results.h.

◆ quadrature_value() [2/2]

template<typename number >
number MeshWorker::LocalResults< number >::quadrature_value ( const unsigned int  k,
const unsigned int  i 
) const
inlineinherited

Read the ith value at quadrature point k

Definition at line 654 of file local_results.h.

◆ initialize_numbers()

template<typename number >
void MeshWorker::LocalResults< number >::initialize_numbers ( const unsigned int  n)
inlineinherited

Initialize the vector with scalar values.

Note
This function is usually only called by the assembler.

Definition at line 434 of file local_results.h.

◆ initialize_vectors()

template<typename number >
void MeshWorker::LocalResults< number >::initialize_vectors ( const unsigned int  n)
inlineinherited

Initialize the vector with vector values.

Note
This function is usually only called by the assembler.

Definition at line 442 of file local_results.h.

◆ initialize_matrices() [1/3]

template<typename number >
void MeshWorker::LocalResults< number >::initialize_matrices ( const unsigned int  n,
bool  both 
)
inlineinherited

Allocate n local matrices. Additionally, set their block row and column coordinates to zero. The matrices themselves are resized by reinit().

Note
This function is usually only called by the assembler.

Definition at line 503 of file local_results.h.

◆ initialize_matrices() [2/3]

template<typename number >
template<typename MatrixType >
void MeshWorker::LocalResults< number >::initialize_matrices ( const MatrixBlockVector< MatrixType > &  matrices,
bool  both 
)
inlineinherited

Allocate a local matrix for each of the global ones in matrices. Additionally, set their block row and column coordinates. The matrices themselves are resized by reinit().

Note
This function is usually only called by the assembler.

Definition at line 451 of file local_results.h.

◆ initialize_matrices() [3/3]

template<typename number >
template<typename MatrixType >
void MeshWorker::LocalResults< number >::initialize_matrices ( const MGMatrixBlockVector< MatrixType > &  matrices,
bool  both 
)
inlineinherited

Allocate a local matrix for each of the global level objects in matrices. Additionally, set their block row and column coordinates. The matrices themselves are resized by reinit().

Note
This function is usually only called by the assembler.

Definition at line 477 of file local_results.h.

◆ initialize_quadrature()

template<typename number >
void MeshWorker::LocalResults< number >::initialize_quadrature ( const unsigned int  np,
const unsigned int  nv 
)
inlineinherited

Initialize quadrature values to nv values in np quadrature points.

Definition at line 524 of file local_results.h.

◆ reinit() [4/4]

template<typename number >
void MeshWorker::LocalResults< number >::reinit ( const BlockIndices local_sizes)
inherited

Reinitialize matrices for new cell. Does not resize any of the data vectors stored in this object, but resizes the vectors in R and the matrices in M1 and M2 for hp and sets them to zero.

Definition at line 28 of file mesh_worker.cc.

◆ print_debug()

template<typename number >
template<class StreamType >
void MeshWorker::LocalResults< number >::print_debug ( StreamType &  os) const
inherited

Definition at line 664 of file local_results.h.

◆ memory_consumption()

template<typename number >
std::size_t MeshWorker::LocalResults< number >::memory_consumption
inherited

The memory used by this object.

Definition at line 46 of file mesh_worker.cc.

Friends And Related Symbol Documentation

◆ DoFInfoBox< dim, DoFInfo< dim, spacedim, number > >

template<int dim, int spacedim = dim, typename number = double>
friend class DoFInfoBox< dim, DoFInfo< dim, spacedim, number > >
friend

Definition at line 204 of file dof_info.h.

Member Data Documentation

◆ cell

template<int dim, int spacedim = dim, typename number = double>
Triangulation<dim,spacedim>::cell_iterator MeshWorker::DoFInfo< dim, spacedim, number >::cell

The current cell.

Definition at line 79 of file dof_info.h.

◆ face

template<int dim, int spacedim = dim, typename number = double>
Triangulation<dim,spacedim>::face_iterator MeshWorker::DoFInfo< dim, spacedim, number >::face

The current face.

Definition at line 82 of file dof_info.h.

◆ 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 90 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 98 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 104 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 110 of file dof_info.h.

◆ block_info

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

The block structure of the system.

Definition at line 172 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 177 of file dof_info.h.

◆ indices_org

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

Auxiliary vector.

Definition at line 197 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 204 of file dof_info.h.

◆ J

template<typename number >
std::vector<number> MeshWorker::LocalResults< number >::J
privateinherited

The local numbers, computed on a cell or on a face.

Definition at line 402 of file local_results.h.

◆ R

template<typename number >
std::vector<BlockVector<number> > MeshWorker::LocalResults< number >::R
privateinherited

The local vectors. This field is public, so that local integrators can write to it.

Definition at line 408 of file local_results.h.

◆ M1

template<typename number >
std::vector<MatrixBlock<FullMatrix<number> > > MeshWorker::LocalResults< number >::M1
privateinherited

The local matrices coupling degrees of freedom in the cell itself or within the first cell on a face.

Definition at line 414 of file local_results.h.

◆ M2

template<typename number >
std::vector<MatrixBlock<FullMatrix<number> > > MeshWorker::LocalResults< number >::M2
privateinherited

The local matrices coupling test functions on the cell with trial functions on the other cell.

Only used on interior faces.

Definition at line 422 of file local_results.h.

◆ quadrature_data

template<typename number >
Table<2, number> MeshWorker::LocalResults< number >::quadrature_data
privateinherited

Values in quadrature points for writing into patch data.

Definition at line 427 of file local_results.h.


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