16 #ifndef dealii_mg_transfer_block_h 17 #define dealii_mg_transfer_block_h 19 #include <deal.II/base/config.h> 21 #include <deal.II/lac/block_vector.h> 22 #include <deal.II/lac/sparsity_pattern.h> 23 #include <deal.II/lac/block_sparsity_pattern.h> 24 #include <deal.II/lac/vector_memory.h> 25 #include <deal.II/lac/block_matrix_array.h> 27 #include <deal.II/multigrid/mg_base.h> 28 #include <deal.II/multigrid/mg_constrained_dofs.h> 29 #include <deal.II/base/mg_level_object.h> 33 #include <deal.II/dofs/dof_handler.h> 38 DEAL_II_NAMESPACE_OPEN
41 template <
int dim,
int spacedim>
class DoFHandler;
96 template <
int dim,
int spacedim>
126 mutable std::vector<std::vector<types::global_dof_index> >
sizes;
144 std::vector<std::shared_ptr<BlockSparsityPattern> > prolongation_sparsities;
161 std::vector<std::vector<std::vector<std::pair<unsigned int, unsigned int> > > >
190 template <
typename number>
218 template <
int dim,
int spacedim>
223 virtual void prolongate (
const unsigned int to_level,
242 template <
int dim,
typename number2,
int spacedim>
254 template <
int dim,
typename number2,
int spacedim>
265 template <
int dim,
typename number2,
int spacedim>
302 template <
typename number>
344 template <
int dim,
int spacedim>
352 void select (
const unsigned int block);
354 virtual void prolongate (
const unsigned int to_level,
368 template <
int dim,
typename number2,
int spacedim>
372 const Vector<number2> &src)
const;
380 template <
int dim,
typename number2,
int spacedim>
383 Vector<number2> &dst,
391 template <
int dim,
typename number2,
int spacedim>
394 Vector<number2> &dst,
404 template <
int dim,
typename number2,
int spacedim>
416 template <
int dim,
typename number2,
int spacedim>
427 template <
int dim,
typename number2,
int spacedim>
442 template <
int dim,
class OutVector,
int spacedim>
447 const unsigned int offset)
const;
452 template <
int dim,
class OutVector,
int spacedim>
457 const unsigned int offset)
const;
462 template <
int dim,
class InVector,
int spacedim>
467 const unsigned int offset)
const;
477 template <
typename number>
481 selected_block = block;
484 DEAL_II_NAMESPACE_CLOSE
void build_matrices(const DoFHandler< dim, spacedim > &dof, const DoFHandler< dim, spacedim > &mg_dof)
void copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, Vector< number2 > &dst, const MGLevelObject< Vector< number > > &src) const
void copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, BlockVector< number2 > &dst, const MGLevelObject< BlockVector< number > > &src) const
std::size_t memory_consumption() const
virtual void prolongate(const unsigned int to_level, BlockVector< number > &dst, const BlockVector< number > &src) const
virtual ~MGTransferBlockSelect()=default
void copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, Vector< number2 > &dst, const MGLevelObject< Vector< number > > &src) const
void do_copy_from_mg(const DoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< Vector< number > > &src, const unsigned int offset) const
std::vector< types::global_dof_index > block_start
SmartPointer< const MGConstrainedDoFs, MGTransferBlockBase > mg_constrained_dofs
void copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< Vector< number > > &dst, const Vector< number2 > &src) const
void do_copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, OutVector &dst, const MGLevelObject< Vector< number > > &src, const unsigned int offset) const
void do_copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< Vector< number > > &dst, const InVector &src, const unsigned int offset) const
void copy_to_mg(const DoFHandler< dim, spacedim > &mg_dof, MGLevelObject< BlockVector< number > > &dst, const BlockVector< number2 > &src) const
std::vector< std::vector< types::global_dof_index > > sizes
std::vector< std::shared_ptr< BlockSparseMatrix< double > > > prolongation_matrices
virtual void restrict_and_add(const unsigned int from_level, BlockVector< number > &dst, const BlockVector< number > &src) const
#define DeclException0(Exception0)
virtual ~MGTransferBlock()
void initialize(const std::vector< number > &factors, VectorMemory< Vector< number > > &memory)
void select(const unsigned int block)
std::vector< std::vector< std::vector< std::pair< unsigned int, unsigned int > > > > copy_indices
std::vector< unsigned int > mg_block
static ::ExceptionBase & ExcMatricesNotBuilt()
virtual void prolongate(const unsigned int to_level, Vector< number > &dst, const Vector< number > &src) const
void build_matrices(const DoFHandler< dim, spacedim > &dof, const DoFHandler< dim, spacedim > &mg_dof, unsigned int selected)
std::vector< std::vector< types::global_dof_index > > mg_block_start
SmartPointer< VectorMemory< Vector< number > >, MGTransferBlock< number > > memory
std::size_t memory_consumption() const
void build_matrices(const DoFHandler< dim, spacedim > &dof, const DoFHandler< dim, spacedim > &mg_dof, const std::vector< bool > &selected)
std::vector< number > factors
virtual void restrict_and_add(const unsigned int from_level, Vector< number > &dst, const Vector< number > &src) const
std::vector< bool > selected
unsigned int selected_block
void copy_from_mg_add(const DoFHandler< dim, spacedim > &mg_dof, BlockVector< number2 > &dst, const MGLevelObject< BlockVector< number > > &src) const