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/mg_level_object.h> 23 #include <deal.II/dofs/dof_handler.h> 25 #include <deal.II/fe/component_mask.h> 27 #include <deal.II/lac/affine_constraints.h> 28 #include <deal.II/lac/block_sparsity_pattern.h> 29 #include <deal.II/lac/block_vector.h> 30 #include <deal.II/lac/sparsity_pattern.h> 31 #include <deal.II/lac/vector_memory.h> 33 #include <deal.II/multigrid/mg_base.h> 39 DEAL_II_NAMESPACE_OPEN
42 template <
int dim,
int spacedim>
82 template <
int dim,
int spacedim>
118 mutable std::vector<std::vector<types::global_dof_index>>
sizes;
136 std::vector<std::shared_ptr<BlockSparsityPattern>> prolongation_sparsities;
150 std::vector<std::vector<std::pair<types::global_dof_index, unsigned int>>>
175 template <
typename number>
222 template <
int dim,
int spacedim>
227 unsigned int selected,
228 unsigned int mg_selected,
230 std::vector<unsigned int>(),
232 std::vector<unsigned int>(),
234 std::vector<std::set<types::global_dof_index>>());
240 select(
const unsigned int component,
259 template <
int dim,
typename number2,
int spacedim>
263 const Vector<number2> & src)
const;
271 template <
int dim,
typename number2,
int spacedim>
274 Vector<number2> & dst,
282 template <
int dim,
typename number2,
int spacedim>
285 Vector<number2> & dst,
294 template <
int dim,
typename number2,
int spacedim>
306 template <
int dim,
typename number2,
int spacedim>
317 template <
int dim,
typename number2,
int spacedim>
333 template <
int dim,
class OutVector,
int spacedim>
342 template <
int dim,
class OutVector,
int spacedim>
351 template <
int dim,
class InVector,
int spacedim>
355 const InVector & src)
const;
382 template <
typename number>
385 const unsigned int mg_component)
387 selected_component = component;
388 mg_selected_component =
392 DEAL_II_NAMESPACE_CLOSE
std::vector< std::shared_ptr< BlockSparseMatrix< double > > > prolongation_matrices
static const unsigned int invalid_unsigned_int
std::vector< std::set< types::global_dof_index > > boundary_indices
static ::ExceptionBase & ExcMatricesNotBuilt()
std::vector< unsigned int > target_component
virtual ~MGTransferSelect() override=default
void do_copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, OutVector &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 do_copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< Vector< number >> &src) const
ComponentMask mg_component_mask
void copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< Vector< number >> &dst, const Vector< number2 > &src) const
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::size_t memory_consumption() const
std::vector< types::global_dof_index > component_start
void copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, Vector< number2 > &dst, const MGLevelObject< Vector< number >> &src) const
virtual void restrict_and_add(const unsigned int from_level, Vector< number > &dst, const Vector< number > &src) const override
#define DeclException0(Exception0)
std::vector< std::vector< std::pair< types::global_dof_index, unsigned int > > > copy_to_and_from_indices
virtual void prolongate(const unsigned int to_level, Vector< number > &dst, const Vector< number > &src) const override
unsigned int mg_selected_component
void do_copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< Vector< number >> &dst, const InVector &src) const
std::vector< unsigned int > mg_target_component
std::vector< IndexSet > interface_dofs
SmartPointer< const AffineConstraints< double > > constraints
ComponentMask component_mask
void copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, Vector< number2 > &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
unsigned int selected_component