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 | Private Attributes | List of all members
MeshWorker::LocalResults< number > Class Template Reference

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

Inheritance diagram for MeshWorker::LocalResults< number >:
[legend]

Public Member Functions

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
 

Private Attributes

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
 

Detailed Description

template<typename number>
class MeshWorker::LocalResults< number >

The class providing the scrapbook to fill with results of local integration. Depending on the task the mesh worker loop is performing, local results can be of different types: They can be scalars, vectors of size equal to the number of degrees of freedom used in the integrals, or square matrices of that same size. All of these have in common that they are the result of local integration over a cell or face. Which kind of object is the result of an operation is determined by the Assembler using them. It is also the assembler that determines how many of each kind of object are produced (for example, an assembler may create both the local contributions to a mass and a stiffness matrix), and for setting the arrays of local results to the sizes needed.

The interface of this class allows accessing all of this information via the following functions:

  1. Scalars: n_values() returns the number of scalars stored by an object of this class, and they are accessed via the value() function.

  2. Vectors: n_vectors() returns the number of vectors stored by an object of this class (each vector has length equal to the number of degrees of freedom on this cell on which the integration happens). The vectors are accessed by the vector() function.

  3. Matrices: n_matrices() returns the number of matrices stored, each of which is a square matrix of dimension equal to the number of degrees of freedom per cell. The matrices are accessed by matrix() with second argument false. These are matrices coupling degrees of freedom in the same cell. For fluxes across faces, there is an additional set of matrices of the same size, with the dimension of these matrices being according to the degrees of freedom on both cells. These are accessed with matrix(), using the second argument true.

The local matrices are initialized by reinit() of the info object and then assembled into the global system by Assembler classes.

Definition at line 223 of file local_results.h.

Member Function Documentation

◆ n_values()

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

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
inline

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
inline

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
inline

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
inline

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)
inline

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
inline

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)
inline

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
inline

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 
)
inline

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
inline

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
inline

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 
)
inline

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
inline

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)
inline

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)
inline

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 
)
inline

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 
)
inline

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 
)
inline

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 
)
inline

Initialize quadrature values to nv values in np quadrature points.

Definition at line 524 of file local_results.h.

◆ reinit()

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

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

Definition at line 664 of file local_results.h.

◆ memory_consumption()

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

The memory used by this object.

Definition at line 46 of file mesh_worker.cc.

Member Data Documentation

◆ J

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

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
private

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
private

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
private

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
private

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 files: