Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
BlockList Class Reference

#include <block_list.h>

Inheritance diagram for BlockList:
[legend]

Public Types

typedef types::global_dof_index size_type
 
typedef std::vector< size_typeblock_container
 The container for each index set.
 
typedef
block_container::const_iterator 
const_iterator
 The iterator for individual indices.
 

Public Member Functions

void create_sparsity_pattern (SparsityPattern &sparsity, size_type n) const
 
void add (size_type block, const std::vector< size_type > &indices)
 
void add (size_type block, const std::vector< size_type > &indices, const std::vector< bool > &selected_indices, size_type offset=0)
 
void initialize (size_type n_blocks)
 
template<typename ITERATOR >
void initialize (size_type n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end)
 
template<typename ITERATOR >
void initialize_mg (size_type n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end) DEAL_II_DEPRECATED
 
template<typename ITERATOR >
void initialize (size_type n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end, const std::vector< bool > &selected_dofs, size_type offset=0) DEAL_II_DEPRECATED
 
template<typename ITERATOR >
void initialize_mg (size_type n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end, const std::vector< bool > &selected_dofs, size_type offset=0) DEAL_II_DEPRECATED
 
template<int dim, typename ITERATOR >
void initialize_vertex_patches_mg (size_type n_blocks, const ITERATOR begin, const typename identity< ITERATOR >::type end, const std::vector< bool > &selected_dofs=std::vector< bool >(), size_type offset=0) DEAL_II_DEPRECATED
 
template<int dim, typename ITERATOR >
unsigned int count_vertex_patches (const ITERATOR begin, const typename identity< ITERATOR >::type end, bool same_level_only) const DEAL_II_DEPRECATED
 
template<int dim, typename ITERATOR >
bool cell_generates_vertex_patch (const ITERATOR cell, bool same_level_only) const DEAL_II_DEPRECATED
 
size_type size () const
 
size_type block_size (size_type block) const
 
const_iterator begin (size_type block) const
 
const_iterator end (size_type block) const
 
size_type local_index (size_type block, size_type index) const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< block_containerindex_sets
 

Detailed Description

Deprecated:
This class is experimental and will be removed in a future release.

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.

Author
Guido Kanschat
Date
2010

Definition at line 52 of file block_list.h.

Member Typedef Documentation

Declare the type for container size.

Definition at line 59 of file block_list.h.

Member Function Documentation

void BlockList::create_sparsity_pattern ( SparsityPattern sparsity,
size_type  n 
) const
inline

Since SparsityPattern can handle the tasks of BlockList, this function allows us to create one from an already filled BlockList. A first step to make BlockList obsolete.

The additional integer argument is the dimension of the vector space.

Definition at line 302 of file block_list.h.

void BlockList::add ( size_type  block,
const std::vector< size_type > &  indices 
)
inline

Add the indices in indices to block block, eliminating repeated indices.

Definition at line 320 of file block_list.h.

void BlockList::add ( size_type  block,
const std::vector< size_type > &  indices,
const std::vector< bool > &  selected_indices,
size_type  offset = 0 
)
inline

Add the indices in indices to block block, eliminating repeated indices. Only add those indices for which selected_indices is true.

Definition at line 338 of file block_list.h.

void BlockList::initialize ( size_type  n_blocks)
inline

Just set up the correct size and assign indices to blocks later.

Definition at line 361 of file block_list.h.

template<typename ITERATOR >
void BlockList::initialize ( size_type  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.

Definition at line 370 of file block_list.h.

template<typename ITERATOR >
void BlockList::initialize_mg ( size_type  n_blocks,
const ITERATOR  begin,
const typename identity< ITERATOR >::type  end 
)
inline
Deprecated:
This function will move to DoFTools.

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.

Definition at line 387 of file block_list.h.

template<typename ITERATOR >
void BlockList::initialize ( size_type  n_blocks,
const ITERATOR  begin,
const typename identity< ITERATOR >::type  end,
const std::vector< bool > &  selected_dofs,
size_type  offset = 0 
)
inline
Deprecated:
This function will move to DoFTools.

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.

Definition at line 404 of file block_list.h.

template<typename ITERATOR >
void BlockList::initialize_mg ( size_type  n_blocks,
const ITERATOR  begin,
const typename identity< ITERATOR >::type  end,
const std::vector< bool > &  selected_dofs,
size_type  offset = 0 
)
inline
Deprecated:
This function will move to DoFTools.

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.

Definition at line 428 of file block_list.h.

template<int dim, typename ITERATOR >
void BlockList::initialize_vertex_patches_mg ( size_type  n_blocks,
const ITERATOR  begin,
const typename identity< ITERATOR >::type  end,
const std::vector< bool > &  selected_dofs = std::vector<bool>(),
size_type  offset = 0 
)
inline
Deprecated:
This function will move to DoFTools.

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.

Definition at line 506 of file block_list.h.

template<int dim, typename ITERATOR >
unsigned int BlockList::count_vertex_patches ( const ITERATOR  begin,
const typename identity< ITERATOR >::type  end,
bool  same_level_only 
) const
inline
Deprecated:
This function will move to DoFTools.

Auxiliary function, counting the patches around vertices.

Definition at line 490 of file block_list.h.

template<int dim, typename ITERATOR >
bool BlockList::cell_generates_vertex_patch ( const ITERATOR  cell,
bool  same_level_only 
) const
inline
Deprecated:
This function will move to DoFTools.

Definition at line 453 of file block_list.h.

BlockList::size_type BlockList::size ( ) const
inline

The number of blocks.

Definition at line 616 of file block_list.h.

BlockList::size_type BlockList::block_size ( size_type  block) const
inline

The size of a single block.

Definition at line 624 of file block_list.h.

BlockList::const_iterator BlockList::begin ( size_type  block) const
inline

Iterator to the first index in block.

Definition at line 632 of file block_list.h.

BlockList::const_iterator BlockList::end ( size_type  block) const
inline

End iterator for a single block.

Definition at line 641 of file block_list.h.

BlockList::size_type BlockList::local_index ( size_type  block,
size_type  index 
) const
inline

Return the position of index in block, or numbers::invalid_size_type, if the index is not in the block.

Definition at line 650 of file block_list.h.

Member Data Documentation

std::vector<block_container> BlockList::index_sets
private

The container for t he index sets.

Definition at line 296 of file block_list.h.


The documentation for this class was generated from the following file: