Public Member Functions | Private Member Functions | Private Attributes
MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number > Class Template Reference

List of all members.

Public Member Functions

 MatrixLocalBlocksToGlobalBlocks (double threshold=1.e-12)
void initialize (const BlockInfo *block_info, MatrixBlockVector< MATRIX > &matrices)
void initialize (const ConstraintMatrix &constraints)
template<class DOFINFO >
void initialize_info (DOFINFO &info, bool interior_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< MATRIX > &global, const FullMatrix< number > &local, unsigned int block_row, unsigned int block_col, const std::vector< unsigned int > &dof1, const std::vector< unsigned int > &dof2)

Private Attributes

SmartPointer
< MatrixBlockVector< MATRIX >
, MatrixLocalBlocksToGlobalBlocks
< MATRIX, number > > 
matrices
SmartPointer< const BlockInfo,
MatrixLocalBlocksToGlobalBlocks
< MATRIX, number > > 
block_info
SmartPointer< const
ConstraintMatrix,
MatrixLocalBlocksToGlobalBlocks
< MATRIX, number > > 
constraints
const double threshold

Detailed Description

template<class MATRIX, typename number = double>
class MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, 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

Constructor & Destructor Documentation

template<class MATRIX , typename number >
MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, 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.


Member Function Documentation

template<class MATRIX , typename number >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize ( const BlockInfo *  block_info,
MatrixBlockVector< MATRIX > &  matrices 
) [inline]

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

template<class MATRIX , typename number >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize ( const ConstraintMatrix &  constraints) [inline]

Initialize the constraints.

template<class MATRIX , typename number >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize_info ( DOFINFO &  info,
bool  interior_face 
) const [inline]

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

The second parameter is used to distinguish between the data used on cells and boundary faces on the one hand and interior faces on the other. Interior faces may require additional data being initialized.

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

Assemble the local matrices into the global matrices.

References internal::assemble().

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

Assemble all local matrices into the global matrices.

References internal::assemble().

template<class MATRIX , typename number >
void MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble ( MatrixBlock< MATRIX > &  global,
const FullMatrix< number > &  local,
unsigned int  block_row,
unsigned int  block_col,
const std::vector< unsigned int > &  dof1,
const std::vector< unsigned int > &  dof2 
) [inline, private]

Assemble a single local matrix into a global one.

References MatrixBlock< MATRIX >::add(), BlockIndices::block_size(), and BlockIndices::block_start().


Member Data Documentation

template<class MATRIX , typename number = double>
SmartPointer<MatrixBlockVector<MATRIX>, MatrixLocalBlocksToGlobalBlocks<MATRIX, number> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::matrices [private]

The global matrices, stored as a vector of pointers.

template<class MATRIX , typename number = double>
SmartPointer<const BlockInfo, MatrixLocalBlocksToGlobalBlocks<MATRIX, number> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::block_info [private]

A pointer to the object containing the block structure.

template<class MATRIX , typename number = double>
SmartPointer<const ConstraintMatrix, MatrixLocalBlocksToGlobalBlocks<MATRIX,number> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::constraints [private]

A pointer to the object containing constraints.

template<class MATRIX , typename number = double>
const double MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, 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.


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

deal.II documentation generated on Fri Aug 12 2011 15:01:09 by doxygen 1.7.4