
Public Types | |
| typedef std::vector< unsigned int > | block_container |
| The container for each index set. | |
| typedef block_container::const_iterator | const_iterator |
| The iterator for individual indices. | |
Public Member Functions | |
| void | add (unsigned int block, const std::vector< unsigned int > &indices) |
| void | add (unsigned int block, const std::vector< unsigned int > &indices, const std::vector< bool > &selected_indices) |
| template<typename ITERATOR > | |
| void | initialize (unsigned int n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end) |
| template<typename ITERATOR > | |
| void | initialize_mg (unsigned int n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end) |
| template<typename ITERATOR > | |
| void | initialize (unsigned int n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end, const std::vector< bool > &selected_dofs, unsigned int offset=0) |
| template<typename ITERATOR > | |
| void | initialize_mg (unsigned int n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end, const std::vector< bool > &selected_dofs, unsigned int offset=0) |
| template<int dim, typename ITERATOR > | |
| void | initialize_vertex_patches_mg (unsigned int n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end, const std::vector< bool > &selected_dofs=std::vector< bool >(), unsigned int offset=0) |
| template<int dim, typename ITERATOR > | |
| unsigned int | count_vertex_patches (const ITERATOR begin, const typename identity< ITERATOR >::type end, bool same_level_only) const |
| template<int dim, typename ITERATOR > | |
| bool | cell_generates_vertex_patch (const ITERATOR cell, bool same_level_only) const |
| unsigned int | size () const |
| unsigned int | block_size (unsigned int block) const |
| const_iterator | begin (unsigned int block) const |
| const_iterator | end (unsigned int block) const |
| unsigned int | local_index (unsigned int block, unsigned int index) const |
Private Attributes | |
| std::vector< block_container > | index_sets |
A vector of index sets listing the indices of small blocks of a linear system. For each block, the indices in that block are listed.
The focus of this class is on small blocks of degrees of freedom associated with a single mesh cell or a small patch. These indices may be contiguous or not and we do not optimize for the case they are. For larger sets, the use of a vector of IndexSet objects might be advisable.
BlockList objects can conveniently be initialized with iterator ranges from DoFHandler or MGDoFHandler, using either their cell or multigrid indices. Other initializations are possible to be implemented.
| typedef std::vector<unsigned int> BlockList::block_container |
The container for each index set.
| typedef block_container::const_iterator BlockList::const_iterator |
The iterator for individual indices.
Add the indices in indices to block block, eliminating repeated indices.
References AssertIndexRange, begin(), end(), index_sets, and numbers::invalid_unsigned_int.
Referenced by initialize(), initialize_mg(), and initialize_vertex_patches_mg().
| void BlockList::add | ( | unsigned int | block, |
| const std::vector< unsigned int > & | indices, | ||
| const std::vector< bool > & | selected_indices | ||
| ) | [inline] |
Add the indices in indices to block block, eliminating repeated indices. Only add those indices for which selected_indices is true.
References AssertDimension, AssertIndexRange, begin(), end(), index_sets, and numbers::invalid_unsigned_int.
| void BlockList::initialize | ( | unsigned int | n_blocks, |
| const ITERATOR | begin, | ||
| const typename identity< ITERATOR >::type | end | ||
| ) | [inline] |
Set up all index sets using an DoF iterator range. This function will call begin->get_dof_indices() with a signature like DoFCellAccessor::get_dof_indices(). Typically, the iterators will loop over active cells of a triangulation.
In addition, the function needs the total number of blocks as its first argument.
References add(), end(), and index_sets.
| void BlockList::initialize_mg | ( | unsigned int | n_blocks, |
| const ITERATOR | begin, | ||
| const typename identity< ITERATOR >::type | end | ||
| ) | [inline] |
Set up all index sets using an DoF iterator range. This function will call begin->get_mg_dof_indices() with a signature like MGDoFCellAccessor::get_mg_dof_indices(). Typically, the iterators loop over the cells of a single level or a Triangulation.
In addition, the function needs the total number of blocks as its first argument.
References add(), end(), and index_sets.
| void BlockList::initialize | ( | unsigned int | n_blocks, |
| const ITERATOR | begin, | ||
| const typename identity< ITERATOR >::type | end, | ||
| const std::vector< bool > & | selected_dofs, | ||
| unsigned int | offset = 0 |
||
| ) | [inline] |
Set up all index sets using an DoF iterator range. This function will call begin->get_dof_indices() with a signature like DoFCellAccessor::get_dof_indices(). Typically, the iterators will loop over active cells of a triangulation.
The argument vector selected_dofs should have the length of dofs per cell (thus, this function is not suitable for hp), and a true value for each degree of freedom which should be added to the index set of this cell. If you are working on a single block of a block system, the offset is the start index of this block.
In addition, the function needs the total number of blocks as its first argument.
References add(), AssertDimension, end(), and index_sets.
| void BlockList::initialize_mg | ( | unsigned int | n_blocks, |
| const ITERATOR | begin, | ||
| const typename identity< ITERATOR >::type | end, | ||
| const std::vector< bool > & | selected_dofs, | ||
| unsigned int | offset = 0 |
||
| ) | [inline] |
Set up all index sets using an DoF iterator range. This function will call begin->get_mg_dof_indices() with a signature like MGDoFCellAccessor::get_mg_dof_indices(). Typically, the iterators will loop over cells on a single level of a triangulation.
The argument vector selected_dofs should have the length of dofs per cell (thus, this function is not suitable for hp), and a true value for each degree of freedom which should be added to the index set of this cell. If you are working on a single block of a block system, the offset is the start index of this block.
In addition, the function needs the total number of blocks as its first argument.
References add(), AssertDimension, end(), and index_sets.
| void BlockList::initialize_vertex_patches_mg | ( | unsigned int | n_blocks, |
| const ITERATOR | begin, | ||
| const typename identity< ITERATOR >::type | end, | ||
| const std::vector< bool > & | selected_dofs = std::vector<bool>(), |
||
| unsigned int | offset = 0 |
||
| ) | [inline] |
Same as initialize_mg(), but instead of gathering the degrees of freedom of a single cell into a block, gather all degrees of freedom of a patch around a vertex.
References add(), Assert, FiniteElementData< dim >::dofs_per_face, FiniteElementData< dim >::dofs_per_vertex, end(), StandardExceptions::ExcNotImplemented(), FiniteElementData< dim >::face_to_cell_index(), index_sets, and numbers::invalid_unsigned_int.
| unsigned int BlockList::count_vertex_patches | ( | const ITERATOR | begin, |
| const typename identity< ITERATOR >::type | end, | ||
| bool | same_level_only | ||
| ) | const [inline] |
Auxiliary function, counting the patches around vertices.
References end().
| bool BlockList::cell_generates_vertex_patch | ( | const ITERATOR | cell, |
| bool | same_level_only | ||
| ) | const [inline] |
References Assert, and StandardExceptions::ExcNotImplemented().
| unsigned int BlockList::size | ( | ) | const [inline] |
The number of blocks.
References index_sets.
The size of a single block.
References index_sets.
| BlockList::const_iterator BlockList::begin | ( | unsigned int | block | ) | const [inline] |
Iterator to the first index in block.
References AssertIndexRange, and index_sets.
Referenced by add().
| BlockList::const_iterator BlockList::end | ( | unsigned int | block | ) | const [inline] |
End iterator for a single block.
References AssertIndexRange, and index_sets.
Referenced by add(), count_vertex_patches(), initialize(), initialize_mg(), and initialize_vertex_patches_mg().
Return the position of index in block, or numbers::invalid_unsigned_int, if the index is not in the block.
References AssertIndexRange, index_sets, and numbers::invalid_unsigned_int.
std::vector<block_container> BlockList::index_sets [private] |
The container for t he index sets.
Referenced by add(), begin(), block_size(), end(), initialize(), initialize_mg(), initialize_vertex_patches_mg(), local_index(), and size().
documentation generated on Fri Aug 12 2011 15:01:02 by
doxygen
1.7.4