OpenFCST: The open-source Fuel Cell Simulation Toolbox
|
A helper class assembling local matrices into global matrices. More...
#include <mesh_worker_assembler.h>
Public Types | |
typedef boost::shared_ptr < MatrixBlock< MATRIX > > | MatrixPtr |
The object that is stored. | |
Public Member Functions | |
MatrixLocalBlocksToGlobalBlocks (double threshold=1.e-12) | |
Constructor, initializing the threshold, which limits how small numbers may be to be entered into the matrix. | |
void | initialize (const BlockInfo &block_info, std::vector< MatrixPtr > &matrices) |
Copy the BlockInfo and the matrix pointers into local variables and initialize cell matrix vectors. | |
template<int dim> | |
void | assemble (const InfoObjects::DoFInfo< dim > &info) |
Assemble the matrices M11 into the global matrices and reset them to zero. | |
template<int dim> | |
void | assemble (const InfoObjects::DoFInfo< dim > &info1, const InfoObjects::DoFInfo< dim > &info2) |
Assemble all local matrices into the global matrices and reset them to zero. | |
Public Member Functions inherited from MeshWorker::Assembler::LocalMatrixBlocks< number > | |
template<class MatrixPtr > | |
void | initialize (const BlockInfo &block_info, std::vector< MatrixPtr > &matrices) |
Copy the BlockInfo and the matrix pointers into local variables and initialize cell matrix vectors. | |
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) |
Assemble a single local matrix into a global one. | |
Private Attributes | |
std::vector< MatrixPtr > | matrices |
The global matrices, stored as a vector of pointers. | |
const double | threshold |
The smallest positive number that will be entered into the global matrix. | |
Additional Inherited Members | |
Public Attributes inherited from MeshWorker::Assembler::LocalMatrixBlocks< number > | |
std::vector< MatrixBlock < FullMatrix< number > > > | M11 |
The local matrices coupling degrees of freedom in the cell itself aor within the first cell on a face. | |
std::vector< MatrixBlock < FullMatrix< number > > > | M22 |
The local matrices coupling degrees of freedom in the second cell on a face. | |
std::vector< MatrixBlock < FullMatrix< number > > > | M12 |
The local matrices coupling test function degrees of freedom in the first cell and trial function degrees of freedom in the second cell of a face, respectively. | |
std::vector< MatrixBlock < FullMatrix< number > > > | M21 |
The local matrices coupling test function degrees of freedom in the second cell and trial function degrees of freedom in the first cell of a face, respectively. | |
BlockInfo | block_info |
Information on block sizes and block start indices. | |
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.
typedef boost::shared_ptr<MatrixBlock<MATRIX> > MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks< MATRIX, number >::MatrixPtr |
The object that is stored.
|
inline |
Constructor, initializing the threshold, which limits how small numbers may be to be entered into the matrix.
|
inline |
Assemble the matrices M11 into the global matrices and reset them to zero.
References MeshWorker::InfoObjects::DoFInfo< dim, spacedim >::indices.
|
inline |
Assemble all local matrices into the global matrices and reset them to zero.
References MeshWorker::InfoObjects::DoFInfo< dim, spacedim >::indices.
|
inlineprivate |
Assemble a single local matrix into a global one.
|
inline |
Copy the BlockInfo and the matrix pointers into local variables and initialize cell matrix vectors.
References MeshWorker::Assembler::LocalMatrixBlocks< number >::initialize().
|
private |
The global matrices, stored as a vector of pointers.
|
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.