Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MeshWorker::Assembler::MatrixSimple< MATRIX > Class Template Reference

#include <simple.h>

Inheritance diagram for MeshWorker::Assembler::MatrixSimple< MATRIX >:
[legend]

Public Member Functions

 MatrixSimple (double threshold=1.e-12)
 
void initialize (MATRIX &m)
 
void initialize (const ConstraintMatrix &constraints)
 
void initialize_local_blocks (const BlockIndices &)
 
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 (const FullMatrix< double > &M, const std::vector< types::global_dof_index > &i1, const std::vector< types::global_dof_index > &i2)
 

Private Attributes

SmartPointer< MATRIX,
MatrixSimple< MATRIX > > 
matrix
 
SmartPointer< const
ConstraintMatrix, MatrixSimple
< MATRIX > > 
constraints
 
const double threshold
 

Detailed Description

template<class MATRIX>
class MeshWorker::Assembler::MatrixSimple< MATRIX >

Assemble local matrices into a single global matrix. If this global matrix has a block structure, this structure is not used, but rather the global numbering of degrees of freedom.

After being initialized with a SparseMatrix object (or another matrix offering the same functionality as SparseMatrix::add()), this class can be used in a MeshWorker::loop() to assemble the cell and face matrices into the global matrix.

If a ConstraintMatrix has been provided during initialization, this matrix will be used (ConstraintMatrix::distribute_local_to_global(), to be precise) to enter the local matrix into the global sparse matrix.

The assembler can handle two different types of local data. First, by default, the obvious choice of taking a single local matrix with dimensions equal to the number of degrees of freedom of the cell. Alternatively, a local block structure can be initialized in DoFInfo. After this, the local data will be arranged as an array of n by n FullMatrix blocks, which are ordered lexicographically in DoFInfo.

Author
Guido Kanschat, 2009

Definition at line 152 of file simple.h.

Constructor & Destructor Documentation

template<class MATRIX >
MeshWorker::Assembler::MatrixSimple< MATRIX >::MatrixSimple ( 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 603 of file simple.h.

Member Function Documentation

template<class MATRIX >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::initialize ( MATRIX m)
inline

Store the result matrix for later assembling.

Definition at line 611 of file simple.h.

template<class MATRIX >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::initialize ( const ConstraintMatrix constraints)
inline

Initialize the constraints. After this function has been called with a valid ConstraintMatrix, the function ConstraintMatrix::distribute_local_to_global() will be used by assemble() to distribute the cell and face matrices into a global sparse matrix.

Definition at line 619 of file simple.h.

template<class MATRIX >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::initialize_local_blocks ( const BlockIndices )
inline
Deprecated:
This function is of no effect. Only the block info structure in DoFInfo is being used.

Store information on the local block structure. If the assembler is inititialized with this function, initialize_info() will generate one local matrix for each block row and column, which will be numbered lexicographically, row by row.

In spite of using local block structure, all blocks will be enteres into the same global matrix, disregarding any global block structure.

Definition at line 627 of file simple.h.

template<class MATRIX >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::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 634 of file simple.h.

template<class MATRIX >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::assemble ( const DOFINFO &  info)
inline

Assemble the matrix DoFInfo::M1[0] into the global matrix.

Definition at line 684 of file simple.h.

template<class MATRIX >
template<class DOFINFO >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::assemble ( const DOFINFO &  info1,
const DOFINFO &  info2 
)
inline

Assemble both local matrices in the info objects into the global matrix.

Definition at line 705 of file simple.h.

template<class MATRIX >
void MeshWorker::Assembler::MatrixSimple< MATRIX >::assemble ( const FullMatrix< double > &  M,
const std::vector< types::global_dof_index > &  i1,
const std::vector< types::global_dof_index > &  i2 
)
inlineprivate

Assemble a single matrix into matrix.

Definition at line 662 of file simple.h.

Member Data Documentation

template<class MATRIX>
SmartPointer<MATRIX,MatrixSimple<MATRIX> > MeshWorker::Assembler::MatrixSimple< MATRIX >::matrix
private

The global matrix being assembled.

Definition at line 227 of file simple.h.

template<class MATRIX>
SmartPointer<const ConstraintMatrix,MatrixSimple<MATRIX> > MeshWorker::Assembler::MatrixSimple< MATRIX >::constraints
private

A pointer to the object containing constraints.

Definition at line 232 of file simple.h.

template<class MATRIX>
const double MeshWorker::Assembler::MatrixSimple< MATRIX >::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 239 of file simple.h.


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