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/base/mg_level_object.h> 23 #include <deal.II/dofs/dof_handler.h> 25 #include <deal.II/lac/block_matrix_array.h> 26 #include <deal.II/lac/block_sparsity_pattern.h> 27 #include <deal.II/lac/block_vector.h> 28 #include <deal.II/lac/sparsity_pattern.h> 29 #include <deal.II/lac/vector_memory.h> 31 #include <deal.II/multigrid/mg_base.h> 32 #include <deal.II/multigrid/mg_constrained_dofs.h> 37 DEAL_II_NAMESPACE_OPEN
40 template <
int dim,
int spacedim>
97 template <
int dim,
int spacedim>
130 mutable std::vector<std::vector<types::global_dof_index>>
sizes;
148 std::vector<std::shared_ptr<BlockSparsityPattern>> prolongation_sparsities;
164 std::vector<std::vector<std::vector<std::pair<unsigned int, unsigned int>>>>
194 template <
typename number>
214 initialize(
const std::vector<number> & factors,
223 template <
int dim,
int spacedim>
227 const std::vector<bool> &
selected);
230 prolongate(
const unsigned int to_level,
235 restrict_and_add(
const unsigned int from_level,
250 template <
int dim,
typename number2,
int spacedim>
262 template <
int dim,
typename number2,
int spacedim>
273 template <
int dim,
typename number2,
int spacedim>
310 template <
typename number>
338 virtual ~MGTransferBlockSelect()
override =
default;
352 template <
int dim,
int spacedim>
362 select(
const unsigned int block);
365 prolongate(
const unsigned int to_level,
370 restrict_and_add(
const unsigned int from_level,
380 template <
int dim,
typename number2,
int spacedim>
384 const Vector<number2> & src)
const;
392 template <
int dim,
typename number2,
int spacedim>
395 Vector<number2> & dst,
403 template <
int dim,
typename number2,
int spacedim>
406 Vector<number2> & dst,
416 template <
int dim,
typename number2,
int spacedim>
428 template <
int dim,
typename number2,
int spacedim>
439 template <
int dim,
typename number2,
int spacedim>
455 template <
int dim,
class OutVector,
int spacedim>
460 const unsigned int offset)
const;
465 template <
int dim,
class OutVector,
int spacedim>
470 const unsigned int offset)
const;
475 template <
int dim,
class InVector,
int spacedim>
479 const InVector & src,
480 const unsigned int offset)
const;
490 template <
typename number>
494 selected_block = block;
497 DEAL_II_NAMESPACE_CLOSE
void build_matrices(const DoFHandler< dim, spacedim > &dof, const DoFHandler< dim, spacedim > &mg_dof)
std::vector< types::global_dof_index > block_start
SmartPointer< const MGConstrainedDoFs, MGTransferBlockBase > mg_constrained_dofs
std::vector< std::vector< types::global_dof_index > > sizes
std::vector< std::shared_ptr< BlockSparseMatrix< double > > > prolongation_matrices
#define DeclException0(Exception0)
std::size_t memory_consumption() const
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()
std::vector< std::vector< types::global_dof_index > > mg_block_start
SmartPointer< VectorMemory< Vector< number > >, MGTransferBlock< number > > memory
std::vector< number > factors
std::vector< bool > selected
unsigned int selected_block