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/lac/block_vector.h> 22 #include <deal.II/lac/constraint_matrix.h> 23 #include <deal.II/lac/sparsity_pattern.h> 24 #include <deal.II/lac/block_sparsity_pattern.h> 25 #include <deal.II/lac/vector_memory.h> 27 #include <deal.II/base/mg_level_object.h> 28 #include <deal.II/dofs/dof_handler.h> 29 #include <deal.II/fe/component_mask.h> 30 #include <deal.II/multigrid/mg_base.h> 36 DEAL_II_NAMESPACE_OPEN
39 template <
int dim,
int spacedim>
class DoFHandler;
77 template <
int dim,
int spacedim>
112 mutable std::vector<std::vector<types::global_dof_index> >
sizes;
130 std::vector<std::shared_ptr<BlockSparsityPattern> > prolongation_sparsities;
145 std::vector<std::vector<std::pair<types::global_dof_index, unsigned int> > >
170 template <
typename number>
217 template <
int dim,
int spacedim>
220 unsigned int selected,
221 unsigned int mg_selected,
223 = std::vector<unsigned int>(),
225 = std::vector<unsigned int>(),
227 = std::vector<std::set<types::global_dof_index> >()
233 void select (
const unsigned int component,
236 virtual void prolongate (
const unsigned int to_level,
250 template <
int dim,
typename number2,
int spacedim>
254 const Vector<number2> &src)
const;
262 template <
int dim,
typename number2,
int spacedim>
265 Vector<number2> &dst,
273 template <
int dim,
typename number2,
int spacedim>
276 Vector<number2> &dst,
285 template <
int dim,
typename number2,
int spacedim>
297 template <
int dim,
typename number2,
int spacedim>
308 template <
int dim,
typename number2,
int spacedim>
323 template <
int dim,
class OutVector,
int spacedim>
332 template <
int dim,
class OutVector,
int spacedim>
341 template <
int dim,
class InVector,
int spacedim>
345 const InVector &src)
const;
372 template <
typename number>
375 const unsigned int mg_component)
377 selected_component = component;
383 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 > >())
std::vector< std::shared_ptr< BlockSparseMatrix< double > > > prolongation_matrices
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
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
virtual ~MGTransferSelect()=default
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
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