
Public Member Functions | |
| MGTransferPrebuilt () | |
| MGTransferPrebuilt (const ConstraintMatrix &constraints, const MGConstrainedDoFs &mg_constrained_dofs) | |
| virtual | ~MGTransferPrebuilt () |
| template<int dim, int spacedim> | |
| void | build_matrices (const MGDoFHandler< dim, spacedim > &mg_dof) |
| virtual void | prolongate (const unsigned int to_level, VECTOR &dst, const VECTOR &src) const |
| virtual void | restrict_and_add (const unsigned int from_level, VECTOR &dst, const VECTOR &src) const |
| template<int dim, class InVector , int spacedim> | |
| void | copy_to_mg (const MGDoFHandler< dim, spacedim > &mg_dof, MGLevelObject< VECTOR > &dst, const InVector &src) const |
| template<int dim, class OutVector , int spacedim> | |
| void | copy_from_mg (const MGDoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< VECTOR > &src) const |
| template<int dim, class OutVector , int spacedim> | |
| void | copy_from_mg_add (const MGDoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< VECTOR > &src) const |
| void | set_component_to_block_map (const std::vector< unsigned int > &map) |
| std::size_t | memory_consumption () const |
Static Public Member Functions | |
| ::ExceptionBase & | ExcNoProlongation () |
| ::ExceptionBase & | ExcMatricesNotBuilt () |
Private Attributes | |
| std::vector< unsigned int > | sizes |
| std::vector < std_cxx1x::shared_ptr < SparsityPattern > > | prolongation_sparsities |
| std::vector < std_cxx1x::shared_ptr < SparseMatrix< double > > > | prolongation_matrices |
| std::vector< std::vector < std::pair< unsigned int, unsigned int > > > | copy_indices |
| std::vector< unsigned int > | component_to_block_map |
| std::vector< std::vector< bool > > | interface_dofs |
| SmartPointer< const ConstraintMatrix, MGTransferPrebuilt< VECTOR > > | constraints |
| SmartPointer< const MGConstrainedDoFs, MGTransferPrebuilt< VECTOR > > | mg_constrained_dofs |
Implementation of the MGTransferBase interface for which the transfer operations are prebuilt upon construction of the object of this class as matrices. This is the fast way, since it only needs to build the operation once by looping over all cells and storing the result in a matrix for each level, but requires additional memory.
See MGTransferBase to find out which of the transfer classes is best for your needs.
Definition at line 64 of file mg_transfer.h.
| MGTransferPrebuilt< VECTOR >::MGTransferPrebuilt | ( | ) |
Constructor without constraint matrices. Use this constructor only with discontinuous finite elements or with no local refinement.
| MGTransferPrebuilt< VECTOR >::MGTransferPrebuilt | ( | const ConstraintMatrix & | constraints, |
| const MGConstrainedDoFs & | mg_constrained_dofs | ||
| ) |
Constructor with constraint matrices as well as mg_constrained_dofs.
| virtual MGTransferPrebuilt< VECTOR >::~MGTransferPrebuilt | ( | ) | [virtual] |
Destructor.
| void MGTransferPrebuilt< VECTOR >::build_matrices | ( | const MGDoFHandler< dim, spacedim > & | mg_dof ) |
Actually build the prolongation matrices for each level.
| virtual void MGTransferPrebuilt< VECTOR >::prolongate | ( | const unsigned int | to_level, |
| VECTOR & | dst, | ||
| const VECTOR & | src | ||
| ) | const [virtual] |
Prolongate a vector from level to_level-1 to level to_level. The previous content of dst is overwritten.
Implements MGTransferBase< VECTOR >.
| virtual void MGTransferPrebuilt< VECTOR >::restrict_and_add | ( | const unsigned int | from_level, |
| VECTOR & | dst, | ||
| const VECTOR & | src | ||
| ) | const [virtual] |
Restrict a vector from level from_level to level from_level-1 and add this restriction to dst. If the region covered by cells on level from_level is smaller than that of level from_level-1 (local refinement), then some degrees of freedom in dst are active and will not be altered. For the other degress of freedom, the result of the restriction is added.
Implements MGTransferBase< VECTOR >.
| void MGTransferPrebuilt< VECTOR >::copy_to_mg | ( | const MGDoFHandler< dim, spacedim > & | mg_dof, |
| MGLevelObject< VECTOR > & | dst, | ||
| const InVector & | src | ||
| ) | const |
Transfer from a vector on the global grid to vectors defined on each of the levels separately, i.a. an MGVector.
| void MGTransferPrebuilt< VECTOR >::copy_from_mg | ( | const MGDoFHandler< dim, spacedim > & | mg_dof, |
| OutVector & | dst, | ||
| const MGLevelObject< VECTOR > & | src | ||
| ) | const |
Transfer from multi-level vector to normal vector.
Copies data from active portions of an MGVector into the respective positions of a Vector<number>. In order to keep the result consistent, constrained degrees of freedom are set to zero.
| void MGTransferPrebuilt< VECTOR >::copy_from_mg_add | ( | const MGDoFHandler< dim, spacedim > & | mg_dof, |
| OutVector & | dst, | ||
| const MGLevelObject< VECTOR > & | src | ||
| ) | const |
Add a multi-level vector to a normal vector.
Works as the previous function, but probably not for continuous elements.
| void MGTransferPrebuilt< VECTOR >::set_component_to_block_map | ( | const std::vector< unsigned int > & | map ) |
If this object operates on BlockVector objects, we need to describe how the individual vector components are mapped to the blocks of a vector. For example, for a Stokes system, we have dim+1 vector components for velocity and pressure, but we may want to use block vectors with only two blocks for all velocities in one block, and the pressure variables in the other.
By default, if this function is not called, block vectors have as many blocks as the finite element has vector components. However, this can be changed by calling this function with an array that describes how vector components are to be grouped into blocks. The meaning of the argument is the same as the one given to the DoFTools::count_dofs_per_component function.
| ::ExceptionBase& MGTransferPrebuilt< VECTOR >::ExcNoProlongation | ( | ) | [static] |
Finite element does not provide prolongation matrices.
| ::ExceptionBase& MGTransferPrebuilt< VECTOR >::ExcMatricesNotBuilt | ( | ) | [static] |
Call build_matrices function first.
| std::size_t MGTransferPrebuilt< VECTOR >::memory_consumption | ( | ) | const |
Memory used by this object.
std::vector<unsigned int> MGTransferPrebuilt< VECTOR >::sizes [private] |
Sizes of the multi-level vectors.
Definition at line 199 of file mg_transfer.h.
std::vector<std_cxx1x::shared_ptr<SparsityPattern> > MGTransferPrebuilt< VECTOR >::prolongation_sparsities [private] |
Sparsity patterns for transfer matrices.
Definition at line 205 of file mg_transfer.h.
std::vector<std_cxx1x::shared_ptr<SparseMatrix<double> > > MGTransferPrebuilt< VECTOR >::prolongation_matrices [private] |
The actual prolongation matrix. column indices belong to the dof indices of the mother cell, i.e. the coarse level. while row indices belong to the child cell, i.e. the fine level.
Definition at line 215 of file mg_transfer.h.
std::vector<std::vector<std::pair<unsigned int, unsigned int> > > MGTransferPrebuilt< VECTOR >::copy_indices [private] |
Mapping for the copy_to/from_mg-functions. The data is first the global index, then the level index.
Definition at line 224 of file mg_transfer.h.
std::vector<unsigned int> MGTransferPrebuilt< VECTOR >::component_to_block_map [private] |
The vector that stores what has been given to the set_component_to_block_map() function.
Definition at line 232 of file mg_transfer.h.
std::vector<std::vector<bool> > MGTransferPrebuilt< VECTOR >::interface_dofs [private] |
Degrees of freedom on the refinement edge excluding those on the boundary.
Definition at line 239 of file mg_transfer.h.
SmartPointer<const ConstraintMatrix, MGTransferPrebuilt<VECTOR> > MGTransferPrebuilt< VECTOR >::constraints [private] |
The constraints of the global system.
Definition at line 244 of file mg_transfer.h.
SmartPointer<const MGConstrainedDoFs, MGTransferPrebuilt<VECTOR> > MGTransferPrebuilt< VECTOR >::mg_constrained_dofs [private] |
The mg_constrained_dofs of the level systems.
Definition at line 250 of file mg_transfer.h.
documentation generated on Fri Feb 3 2012 06:04:09 by
doxygen
1.7.2