A small class collecting the different BlockIndices involved in global, multilevel and local computations.
Once a DoFHandler has been initialized with an FESystem, a data object of type BlockInfo (accessed by DoFHandler::block_info() ) is filled, which reflects the block structure of the degrees of freedom.
BlockInfo consists of several BlockIndices objects. The member global() reflects the block structure of the system on the active cell level, usually referred to as the global system. As soon as DoFHandler::distribute_dofs() has been called, the function BlockIndices::block_size() in global() will return the correct sizes of each block. After DoFRenumbering::block_wise(), BlockIndices::block_start() will return the start index for each of the blocks.
When a DoFHandler with levels is used, the same structure is automatically generated for each level. The level blocks can be accessed through level().
Finally, there are local() BlockIndices, which describe the block structure on a single cell. This is used for instance by MeshWorker::Assembler::MatrixLocalBlocksToGlobalBlocks. The local indices are not filled automatically, since they change the behavior of the MeshWorker::Assembler classes relying on BlockInfo. They must be initialized by hand through initialize_local().
The most common usage for this object is initializing vectors as in the following code:
for (unsigned int i = 0; i < triangulation.n_levels(); ++i)
In this example,
solution obtains the block structure needed to represent a finite element function on the DoFHandler. Similarly, all levels of
mg_vector will have the block structure needed on that level.
- Extend the functions local() and renumber() to the concept to hp::DoFHandler.
- Guido Kanschat, 2009
Definition at line 93 of file block_info.h.
template<int dim, int spacedim>
||const DoFHandler< dim, spacedim > &
Fill the object with values describing block structure of the DoFHandler.
By default, this function will attempt to initialize whatever is possible. If active dofs have been assigned int the DoFHandler argument, they BlockIndices for those will be generated. The same for level dofs.
This default behavior can be overridden by the two parameters, which can switch off active dofs or level dofs.
This function will also clear the local() indices.
Definition at line 28 of file block_info.cc.