16 #include <deal.II/dofs/block_info.h> 17 #include <deal.II/dofs/dof_handler.h> 18 #include <deal.II/dofs/dof_tools.h> 19 #include <deal.II/multigrid/mg_tools.h> 20 #include <deal.II/fe/fe.h> 21 #include <deal.II/fe/fe_tools.h> 23 DEAL_II_NAMESPACE_OPEN
26 template <
int dim,
int spacedim>
33 std::vector<types::global_dof_index> sizes(fe.
n_blocks());
40 std::vector<std::vector<types::global_dof_index> > sizes (dof.
get_triangulation().n_levels ());
42 for (
unsigned int i = 0; i < sizes.size (); ++i)
43 sizes[i].resize (dof.
get_fe ().n_blocks ());
46 levels.resize (sizes.size ());
48 for (
unsigned int i = 0; i < sizes.size (); ++i)
49 levels[i].reinit (sizes[i]);
54 template <
int dim,
int spacedim>
59 std::vector<types::global_dof_index> sizes(fe.
n_blocks());
75 #include "block_info.inst" 77 DEAL_II_NAMESPACE_CLOSE
std::vector< types::global_dof_index > local_renumbering
unsigned int n_blocks() const
bool has_active_dofs() const
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
std::pair< unsigned int, unsigned int > block_to_base_index(const unsigned int block) const
BlockIndices bi_global
The block structure of the global system.
void initialize(const DoFHandler< dim, spacedim > &, bool levels_only=false, bool active_only=false)
Fill the object with values describing block structure of the DoFHandler.
void initialize_local(const DoFHandler< dim, spacedim > &)
Initialize block structure on cells and compute renumbering between cell dofs and block cell dofs...
std::vector< BlockIndices > levels
The multilevel block structure.
unsigned int n_dofs_per_cell() const
const Triangulation< dim, spacedim > & get_triangulation() const
BlockIndices bi_local
The block structure of the cell systems.
bool has_level_dofs() const
std::vector< unsigned int > base_elements