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> 35 #include <deal.II/base/std_cxx11/shared_ptr.h> 38 DEAL_II_NAMESPACE_OPEN
41 template <
int dim,
int spacedim>
class DoFHandler;
95 template <
int dim,
int spacedim>
125 mutable std::vector<std::vector<types::global_dof_index> >
sizes;
143 std::vector<std_cxx11::shared_ptr<BlockSparsityPattern> > prolongation_sparsities;
160 std::vector<std::vector<std::vector<std::pair<unsigned int, unsigned int> > > >
189 template <
typename number>
217 template<
int dim,
int spacedim>
222 virtual void prolongate (
const unsigned int to_level,
238 template <
int dim,
typename number2,
int spacedim>
250 template <
int dim,
typename number2,
int spacedim>
261 template <
int dim,
typename number2,
int spacedim>
298 template <
typename number>
339 template<
int dim,
int spacedim>
347 void select (
const unsigned int block);
349 virtual void prolongate (
const unsigned int to_level,
361 template <
int dim,
typename number2,
int spacedim>
373 template <
int dim,
typename number2,
int spacedim>
384 template <
int dim,
typename number2,
int spacedim>
394 template <
int dim,
typename number2,
int spacedim>
406 template <
int dim,
typename number2,
int spacedim>
417 template <
int dim,
typename number2,
int spacedim>
432 template <
int dim,
class OutVector,
int spacedim>
437 const unsigned int offset)
const;
442 template <
int dim,
class OutVector,
int spacedim>
447 const unsigned int offset)
const;
452 template <
int dim,
class InVector,
int spacedim>
457 const unsigned int offset)
const;
467 template <
typename number>
471 selected_block = block;
474 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
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_cxx11::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 ~MGTransferBlockSelect()
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