LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Based on helper objects that provide element matrices these functions rely on the distribute assembly policy to set the entries of global Galerkin matrices.
All the functions have the name AssembleMatrixLocally
, but they differ in their arguments. What they have in common is that they are all templated with two types:
AddToEntry(
mutable access functionThe principles of local cell-oriented assembly of Galerkin matrices are explained in Lecture Document Subsection 2.7.4.3, in particular Lecture Document Paragraph 2.7.4.19. An example for the use of local assembly is given in Lecture Document Example 2.7.4.39.
Functions | |
std::shared_ptr< spdlog::logger > & | lf::assemble::AssembleMatrixLogger () |
The logger that is used by AssembleMatrixLocally() to log additional information. (for logging levels trace + debug) | |
template<typename TMPMATRIX , EntityMatrixProvider ENTITY_MATRIX_PROVIDER> | |
void | lf::assemble::AssembleMatrixLocally (dim_t codim, const DofHandler &dof_handler_trial, const DofHandler &dof_handler_test, ENTITY_MATRIX_PROVIDER &entity_matrix_provider, TMPMATRIX &matrix) |
Assembly function for standard assembly of finite element matrices. | |
template<typename TMPMATRIX , EntityMatrixProvider ENTITY_MATRIX_PROVIDER> | |
TMPMATRIX | lf::assemble::AssembleMatrixLocally (dim_t codim, const DofHandler &dof_handler_trial, const DofHandler &dof_handler_test, ENTITY_MATRIX_PROVIDER &entity_matrix_provider) |
Entity-wise local assembly of a matrix from local matrices. | |
template<typename TMPMATRIX , EntityMatrixProvider ENTITY_MATRIX_PROVIDER> | |
TMPMATRIX | lf::assemble::AssembleMatrixLocally (dim_t codim, const DofHandler &dof_handler, ENTITY_MATRIX_PROVIDER &entity_matrix_provider) |
Entity-wise local assembly of a matrix from local matrices. | |
TMPMATRIX lf::assemble::AssembleMatrixLocally | ( | dim_t | codim, |
const DofHandler & | dof_handler, | ||
ENTITY_MATRIX_PROVIDER & | entity_matrix_provider ) |
Entity-wise local assembly of a matrix from local matrices.
TMPMATRIX | a type fitting the concept of COOMatrix |
ENTITY_MATRIX_PROVIDER | a type providing the computation of element matrices, must model the concept EntityMatrixProvider |
This special version of the function should be used whenever test and trial space are the same.
This function logs additional information to AssembleMatrixLogger(). See Loggers and Debug output for more information.
Definition at line 244 of file assembler.h.
References lf::assemble::AssembleMatrixLocally().
TMPMATRIX lf::assemble::AssembleMatrixLocally | ( | dim_t | codim, |
const DofHandler & | dof_handler_trial, | ||
const DofHandler & | dof_handler_test, | ||
ENTITY_MATRIX_PROVIDER & | entity_matrix_provider ) |
Entity-wise local assembly of a matrix from local matrices.
TMPMATRIX | a type fitting the concept of COOMatrix |
ENTITY_MATRIX_PROVIDER | a type providing the computation of element matrices, must model the concept EntityMatrixProvider |
setZero()
for setting all entries of the matrix to zero. It must also possess a constructor that takes row and column numbers and creates an (empty) matrix of that size.This function logs additional information to AssembleMatrixLogger(). See Loggers and Debug output for more information.
Definition at line 210 of file assembler.h.
References lf::assemble::AssembleMatrixLocally(), and lf::assemble::DofHandler::NumDofs().
void lf::assemble::AssembleMatrixLocally | ( | dim_t | codim, |
const DofHandler & | dof_handler_trial, | ||
const DofHandler & | dof_handler_test, | ||
ENTITY_MATRIX_PROVIDER & | entity_matrix_provider, | ||
TMPMATRIX & | matrix ) |
Assembly function for standard assembly of finite element matrices.
TMPMATRIX | a type fitting the concept of COOMatrix |
ENTITY_MATRIX_PROVIDER | a type providing the computation of element matrices, must model the concept EntityMatrixProvider |
codim | co-dimension of mesh entities which should be traversed in the course of assembly |
dof_handler_trial | a dof handler object for column space, see DofHandler |
dof_handler_test | a dof handler object for row space, see DofHandler |
entity_matrix_provider | EntityMatrixProvider object for passing all kinds of data |
matrix | matrix object to which the assembled matrix will be added. |
The rationale for passing two different DofHandler objects for trial and test space is given in Lecture Document Remark 2.7.4.24.
matrix
is not set to zero in the beginning! This makes is possible to assemble a matrix piecemeal via several successive calls to AssembleMatrixLocally(), see Lecture Document Code 2.7.4.46.This method performs cell-oriented assembly controlled by a local-to-global index map ("dof handler").
This function logs additional information to AssembleMatrixLogger(). See Loggers and Debug output for more information.
AddtoEntry(i,j,value_to_add)
for adding to a matrix entry A model type is COOMatrix.Eval()
method of entity_matrix_provider
may have a size larger than that suggested by the number of local shape functions. In this case only its upper left block is accessed.Definition at line 115 of file assembler.h.
References lf::assemble::AssembleMatrixLogger(), lf::assemble::DofHandler::GlobalDofIndices(), lf::assemble::DofHandler::Mesh(), and lf::assemble::DofHandler::NumLocalDofs().
Referenced by lf::assemble::COOMatrix< SCALAR >::AddToEntry(), lf::assemble::AssembleMatrixLocally(), lf::assemble::AssembleMatrixLocally(), lf::assemble::AssembleVectorLocally(), lf::assemble::AssembleVectorLocally(), lf::assemble::DynamicFEDofHandler::DynamicFEDofHandler(), lf::assemble::UniformFEDofHandler::Entity(), lf::assemble::DynamicFEDofHandler::Entity(), lf::assemble::FixFlaggedSolutionCompAlt(), lf::assemble::FixFlaggedSolutionComponents(), lf::assemble::FixSolutionComponentsLse(), lf::assemble::UniformFEDofHandler::GetNumLocalDofs(), lf::assemble::UniformFEDofHandler::GlobalDofIndices(), lf::assemble::DynamicFEDofHandler::GlobalDofIndices(), lf::assemble::UniformFEDofHandler::GlobalDofIndices(), lf::assemble::UniformFEDofHandler::initIndexArrays(), lf::assemble::UniformFEDofHandler::InteriorGlobalDofIndices(), lf::assemble::DynamicFEDofHandler::InteriorGlobalDofIndices(), lf::assemble::UniformFEDofHandler::InteriorGlobalDofIndices(), lf::assemble::COOMatrix< SCALAR >::makeDense(), lf::assemble::COOMatrix< SCALAR >::MatVecMult(), lf::assemble::COOMatrix< SCALAR >::MatVecMult(), lf::assemble::UniformFEDofHandler::NumCoveredDofs(), lf::assemble::UniformFEDofHandler::NumInteriorDofs(), lf::assemble::DynamicFEDofHandler::NumInteriorDofs(), lf::assemble::UniformFEDofHandler::NumInteriorDofs(), lf::assemble::UniformFEDofHandler::NumLocalDofs(), lf::assemble::DynamicFEDofHandler::NumLocalDofs(), lf::assemble::operator<<(), lf::assemble::COOMatrix< SCALAR >::PrintInfo(), lf::assemble::PrintInfo(), lf::assemble::COOMatrix< SCALAR >::setZero(), and lf::assemble::UniformFEDofHandler::UniformFEDofHandler().
std::shared_ptr< spdlog::logger > & lf::assemble::AssembleMatrixLogger | ( | ) |
The logger that is used by AssembleMatrixLocally() to log additional information. (for logging levels trace + debug)
Definition at line 19 of file assembler.cc.
References lf::base::InitLogger().
Referenced by lf::assemble::AssembleMatrixLocally().