Reference documentation for deal.II version 9.2.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\}}\)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number > Class Template Reference

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

Public Member Functions

 MatrixLocalBlocksToGlobalBlocks (double threshold=1.e-12)
 
void initialize (const BlockInfo *block_info, MatrixBlockVector< MatrixType > &matrices)
 
void initialize (const AffineConstraints< typename MatrixType::value_type > &constraints)
 
template<class DOFINFO >
void initialize_info (DOFINFO &info, bool face) const
 
template<class DOFINFO >
void assemble (const DOFINFO &info)
 
template<class DOFINFO >
void assemble (const DOFINFO &info1, const DOFINFO &info2)
 

Private Member Functions

void assemble (MatrixBlock< MatrixType > &global, const FullMatrix< number > &local, const unsigned int block_row, const unsigned int block_col, const std::vector< types::global_dof_index > &dof1, const std::vector< types::global_dof_index > &dof2)
 

Private Attributes

SmartPointer< MatrixBlockVector< MatrixType >, MatrixLocalBlocksToGlobalBlocks< MatrixType, number > > matrices
 
SmartPointer< const BlockInfo, MatrixLocalBlocksToGlobalBlocks< MatrixType, number > > block_info
 
SmartPointer< const AffineConstraints< typename MatrixType::value_type >, MatrixLocalBlocksToGlobalBlocks< MatrixType, number > > constraints
 
const double threshold
 

Detailed Description

template<typename MatrixType, typename number = double>
class MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >

A helper class assembling local matrices into global matrices.

The global matrices are expected as a vector of MatrixBlock objects, each containing a matrix object with a function corresponding to SparseMatrix::add() and information on the block row and column this matrix represents in a block system.

The local matrices are expected as a similar vector of MatrixBlock objects, but containing a FullMatrix.

Like with ResidualLocalBlocksToGlobalBlocks, the initialization of the BlockInfo object decides whether the comprehensive data model or the block model is used.

In the comprehensive model, each of the LocalMatrixBlocks has coordinates (0,0) and dimensions equal to the number of degrees of freedom of the FESystem.

In the comprehensive model, each block has its own block coordinates and the size depends on the associated FESystem::base_element(). These blocks can be generated separately and will be assembled into the correct matrix block by this object.

Author
Guido Kanschat, 2009

Definition at line 213 of file assembler.h.

Constructor & Destructor Documentation

◆ MatrixLocalBlocksToGlobalBlocks()

template<typename MatrixType , typename number >
MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::MatrixLocalBlocksToGlobalBlocks ( double  threshold = 1.e-12)
inline

Constructor, initializing the threshold, which limits how small numbers may be to be entered into the matrix.

Definition at line 626 of file assembler.h.

Member Function Documentation

◆ initialize() [1/2]

template<typename MatrixType , typename number >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::initialize ( const BlockInfo block_info,
MatrixBlockVector< MatrixType > &  matrices 
)
inline

Copy the BlockInfo and the matrix pointers into local variables and initialize cell matrix vectors.

Definition at line 633 of file assembler.h.

◆ initialize() [2/2]

template<typename MatrixType , typename number >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::initialize ( const AffineConstraints< typename MatrixType::value_type > &  constraints)
inline

Initialize the constraints.

Definition at line 645 of file assembler.h.

◆ initialize_info()

template<typename MatrixType , typename number >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::initialize_info ( DOFINFO &  info,
bool  face 
) const
inline

Initialize the local data in the DoFInfo object used later for assembling.

The info object refers to a cell if !face, or else to an interior or boundary face.

Definition at line 656 of file assembler.h.

◆ assemble() [1/3]

template<typename MatrixType , typename number >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::assemble ( const DOFINFO &  info)
inline

Assemble the local matrices into the global matrices.

Definition at line 721 of file assembler.h.

◆ assemble() [2/3]

template<typename MatrixType , typename number >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::assemble ( const DOFINFO &  info1,
const DOFINFO &  info2 
)
inline

Assemble all local matrices into the global matrices.

Definition at line 744 of file assembler.h.

◆ assemble() [3/3]

template<typename MatrixType , typename number >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::assemble ( MatrixBlock< MatrixType > &  global,
const FullMatrix< number > &  local,
const unsigned int  block_row,
const unsigned int  block_col,
const std::vector< types::global_dof_index > &  dof1,
const std::vector< types::global_dof_index > &  dof2 
)
inlineprivate

Assemble a single local matrix into a global one.

Definition at line 667 of file assembler.h.

Member Data Documentation

◆ matrices

template<typename MatrixType , typename number = double>
SmartPointer<MatrixBlockVector<MatrixType>, MatrixLocalBlocksToGlobalBlocks<MatrixType, number> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::matrices
private

The global matrices, stored as a vector of pointers.

Definition at line 280 of file assembler.h.

◆ block_info

template<typename MatrixType , typename number = double>
SmartPointer<const BlockInfo, MatrixLocalBlocksToGlobalBlocks<MatrixType, number> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::block_info
private

A pointer to the object containing the block structure.

Definition at line 287 of file assembler.h.

◆ constraints

template<typename MatrixType , typename number = double>
SmartPointer<const AffineConstraints<typename MatrixType::value_type>, MatrixLocalBlocksToGlobalBlocks<MatrixType, number> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::constraints
private

A pointer to the object containing constraints.

Definition at line 294 of file assembler.h.

◆ threshold

template<typename MatrixType , typename number = double>
const double MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MatrixType, number >::threshold
private

The smallest positive number that will be entered into the global matrix. All smaller absolute values will be treated as zero and will not be assembled.

Definition at line 301 of file assembler.h.


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