Public Types | Public Member Functions | Private Member Functions | Private Attributes

MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number > Class Template Reference
[The MeshWorker interface]

List of all members.

Public Types

typedef MGMatrixBlockVector
< MATRIX
MatrixPtrVector
typedef SmartPointer
< MatrixPtrVector,
MGMatrixLocalBlocksToGlobalBlocks
< MATRIX, number > > 
MatrixPtrVectorPtr

Public Member Functions

 MGMatrixLocalBlocksToGlobalBlocks (double threshold=1.e-12)
void initialize (const BlockInfo *block_info, MatrixPtrVector &matrices)
void initialize (const MGConstrainedDoFs &mg_constrained_dofs)
void initialize_edge_flux (MatrixPtrVector &up, MatrixPtrVector &down)
void initialize_interfaces (MatrixPtrVector &interface_in, MatrixPtrVector &interface_out)
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 (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, unsigned int level1, unsigned int level2, bool transpose=false)
void assemble_fluxes (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, unsigned int level1, unsigned int level2)
void assemble_up (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, unsigned int level1, unsigned int level2)
void assemble_down (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, unsigned int level1, unsigned int level2)
void assemble_in (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, unsigned int level1, unsigned int level2)
void assemble_out (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, unsigned int level1, unsigned int level2)

Private Attributes

MatrixPtrVectorPtr matrices
MatrixPtrVectorPtr flux_down
MatrixPtrVectorPtr flux_up
MatrixPtrVectorPtr interface_out
MatrixPtrVectorPtr interface_in
SmartPointer< const BlockInfo,
MGMatrixLocalBlocksToGlobalBlocks
< MATRIX, number > > 
block_info
SmartPointer< const
MGConstrainedDoFs,
MGMatrixLocalBlocksToGlobalBlocks
< MATRIX, number > > 
mg_constrained_dofs
const double threshold

Detailed Description

template<class MATRIX, typename number = double>
class MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >

A helper class assembling local matrices into global multilevel matrices. This class is the multilevel equivalent of MatrixLocalBlocksToGlobalBlocks and documentation of that class applies here to a large extend.

The global matrices are expected as a vector of pointers to MatrixBlock objects, each containing a MGLevelObject with matrices 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 a similar vector of MatrixBlock objects, but containing a FullMatrix.

If local refinement occurs, the Multigrid method needs more matrices, two for continuous elements and another two if numerical fluxes are computed on interfaces. The second set can be added using initialize_edge_flux(). Once added, the contributions in all participating matrices will be assembled from the cell and face matrices automatically.

Author:
Guido Kanschat, 2009

Definition at line 335 of file assembler.h.


Member Typedef Documentation

template<class MATRIX , typename number = double>
typedef MGMatrixBlockVector<MATRIX> MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::MatrixPtrVector

Definition at line 338 of file assembler.h.

Definition at line 340 of file assembler.h.


Constructor & Destructor Documentation

template<class MATRIX , typename number >
MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::MGMatrixLocalBlocksToGlobalBlocks ( 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 788 of file assembler.h.


Member Function Documentation

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize ( const BlockInfo block_info,
MatrixPtrVector matrices 
) [inline]

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

Definition at line 797 of file assembler.h.

References AssertDimension.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize ( const MGConstrainedDoFs mg_constrained_dofs ) [inline]

Initialize the multilevel constraints.

Definition at line 809 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize_edge_flux ( MatrixPtrVector up,
MatrixPtrVector down 
) [inline]

Multigrid methods on locally refined meshes need additional matrices. For discontinuous Galerkin methods, these are two flux matrices across the refinement edge, which are set by this method.

Definition at line 830 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::initialize_interfaces ( MatrixPtrVector interface_in,
MatrixPtrVector interface_out 
) [inline]

Multigrid methods on locally refined meshes need additional matrices. For discontinuous Galerkin methods, these are two flux matrices across the refinement edge, which are set by this method.

Definition at line 841 of file assembler.h.

template<class MATRIX , typename number >
template<class DOFINFO >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, 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 819 of file assembler.h.

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

Assemble the local matrices into the global matrices.

Definition at line 1222 of file assembler.h.

References internal::assemble().

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

Assemble all local matrices into the global matrices.

Definition at line 1256 of file assembler.h.

References internal::assemble(), Assert, StandardExceptions::ExcNotImplemented(), and LAPACKSupport::matrix.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble ( 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,
unsigned int  level1,
unsigned int  level2,
bool  transpose = false 
) [inline, private]

Assemble a single local matrix into a global one.

Definition at line 852 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble_fluxes ( 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,
unsigned int  level1,
unsigned int  level2 
) [inline, private]

Assemble a single local matrix into a global one.

Definition at line 931 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble_up ( 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,
unsigned int  level1,
unsigned int  level2 
) [inline, private]

Assemble a single local matrix into a global one.

Definition at line 984 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble_down ( 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,
unsigned int  level1,
unsigned int  level2 
) [inline, private]

Assemble a single local matrix into a global one.

Definition at line 1037 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble_in ( 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,
unsigned int  level1,
unsigned int  level2 
) [inline, private]

Assemble a single local matrix into a global one.

Definition at line 1090 of file assembler.h.

template<class MATRIX , typename number >
void MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::assemble_out ( 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,
unsigned int  level1,
unsigned int  level2 
) [inline, private]

Assemble a single local matrix into a global one.

Definition at line 1155 of file assembler.h.


Member Data Documentation

template<class MATRIX , typename number = double>
MatrixPtrVectorPtr MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::matrices [private]

The level matrices, stored as a vector of pointers.

Definition at line 514 of file assembler.h.

template<class MATRIX , typename number = double>
MatrixPtrVectorPtr MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::flux_down [private]

The flux matrix between the fine and the coarse level at refinement edges.

Definition at line 521 of file assembler.h.

template<class MATRIX , typename number = double>
MatrixPtrVectorPtr MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::flux_up [private]

The flux matrix between the coarse and the fine level at refinement edges.

Definition at line 528 of file assembler.h.

template<class MATRIX , typename number = double>
MatrixPtrVectorPtr MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::interface_out [private]

The interface matrix between the fine and the coarse level at refinement edges.

Definition at line 535 of file assembler.h.

template<class MATRIX , typename number = double>
MatrixPtrVectorPtr MeshWorker::Assembler::MGMatrixLocalBlocksToGlobalBlocks< MATRIX, number >::interface_in [private]

The interface matrix between the coarse and the fine level at refinement edges.

Definition at line 542 of file assembler.h.

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

A pointer to the object containing the block structure.

Definition at line 547 of file assembler.h.

A pointer to the object containing constraints.

Definition at line 552 of file assembler.h.

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

Definition at line 564 of file assembler.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:15 by doxygen 1.7.2