16 #ifndef dealii__mg_transfer_component_h 17 #define dealii__mg_transfer_component_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/base/std_cxx11/shared_ptr.h> 22 #include <deal.II/lac/block_vector.h> 23 #include <deal.II/lac/constraint_matrix.h> 24 #include <deal.II/lac/sparsity_pattern.h> 25 #include <deal.II/lac/block_sparsity_pattern.h> 26 #include <deal.II/lac/vector_memory.h> 28 #include <deal.II/base/mg_level_object.h> 29 #include <deal.II/dofs/dof_handler.h> 30 #include <deal.II/fe/component_mask.h> 31 #include <deal.II/multigrid/mg_base.h> 35 DEAL_II_NAMESPACE_OPEN
38 template <
int dim,
int spacedim>
class DoFHandler;
76 template <
int dim,
int spacedim>
111 mutable std::vector<std::vector<types::global_dof_index> >
sizes;
129 std::vector<std_cxx11::shared_ptr<BlockSparsityPattern> > prolongation_sparsities;
144 std::vector<std::vector<std::pair<types::global_dof_index, unsigned int> > >
169 template <
typename number>
216 template <
int dim,
int spacedim>
219 unsigned int selected,
220 unsigned int mg_selected,
222 = std::vector<unsigned int>(),
224 = std::vector<unsigned int>(),
226 = std::vector<std::set<types::global_dof_index> >()
232 void select (
const unsigned int component,
235 virtual void prolongate (
const unsigned int to_level,
246 template <
int dim,
typename number2,
int spacedim>
258 template <
int dim,
typename number2,
int spacedim>
269 template <
int dim,
typename number2,
int spacedim>
278 template <
int dim,
typename number2,
int spacedim>
290 template <
int dim,
typename number2,
int spacedim>
301 template <
int dim,
typename number2,
int spacedim>
316 template <
int dim,
class OutVector,
int spacedim>
325 template <
int dim,
class OutVector,
int spacedim>
334 template <
int dim,
class InVector,
int spacedim>
338 const InVector &src)
const;
365 template <
typename number>
368 const unsigned int mg_component)
370 selected_component = component;
376 DEAL_II_NAMESPACE_CLOSE
void build_matrices(const DoFHandler< dim, spacedim > &dof, const DoFHandler< dim, spacedim > &mg_dof, unsigned int selected, unsigned int mg_selected, const std::vector< unsigned int > &target_component=std::vector< unsigned int >(), const std::vector< unsigned int > &mg_target_component=std::vector< unsigned int >(), const std::vector< std::set< types::global_dof_index > > &boundary_indices=std::vector< std::set< types::global_dof_index > >())
static const unsigned int invalid_unsigned_int
void do_copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< Vector< number > > &src) const
std::vector< std::set< types::global_dof_index > > boundary_indices
static ::ExceptionBase & ExcMatricesNotBuilt()
std::vector< unsigned int > target_component
void copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, Vector< number2 > &dst, const MGLevelObject< Vector< number > > &src) const
std::vector< std_cxx11::shared_ptr< BlockSparseMatrix< double > > > prolongation_matrices
void copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, Vector< number2 > &dst, const MGLevelObject< Vector< number > > &src) const
std::size_t memory_consumption() const
void select(const unsigned int component, const unsigned int mg_component=numbers::invalid_unsigned_int)
void copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< Vector< number > > &dst, const Vector< number2 > &src) const
ComponentMask mg_component_mask
std::size_t memory_consumption() const
std::vector< types::global_dof_index > component_start
#define DeclException0(Exception0)
std::vector< std::vector< std::pair< types::global_dof_index, unsigned int > > > copy_to_and_from_indices
virtual void restrict_and_add(const unsigned int from_level, Vector< number > &dst, const Vector< number > &src) const
unsigned int mg_selected_component
std::vector< unsigned int > mg_target_component
std::vector< IndexSet > interface_dofs
void do_copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< Vector< number > > &dst, const InVector &src) const
SmartPointer< const ConstraintMatrix > constraints
ComponentMask component_mask
virtual ~MGTransferSelect()
void do_copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< Vector< number > > &src) const
std::vector< std::vector< types::global_dof_index > > mg_component_start
void build_matrices(const DoFHandler< dim, spacedim > &dof, const DoFHandler< dim, spacedim > &mg_dof)
std::vector< std::vector< types::global_dof_index > > sizes
virtual void prolongate(const unsigned int to_level, Vector< number > &dst, const Vector< number > &src) const
unsigned int selected_component