|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_mg_transfer_h
17 #define dealii_mg_transfer_h
48 template <
typename VectorType>
56 template <
typename SparsityPatternType,
typename DoFHandlerType>
61 const SparsityPatternType &sp,
62 const DoFHandlerType &)
70 #ifdef DEAL_II_WITH_TRILINOS
71 template <
typename Number>
79 template <
typename SparsityPatternType,
typename DoFHandlerType>
84 const SparsityPatternType &sp,
87 const ::parallel::TriangulationBase<DoFHandlerType::dimension,
88 DoFHandlerType::space_dimension>
90 DoFHandlerType::dimension,
91 DoFHandlerType::space_dimension
> *>(&(dh.get_triangulation()));
93 dist_tria !=
nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF;
96 dh.locally_owned_mg_dofs(
level),
111 template <
typename SparsityPatternType,
typename DoFHandlerType>
116 const SparsityPatternType &sp,
119 const ::parallel::TriangulationBase<DoFHandlerType::dimension,
120 DoFHandlerType::space_dimension>
122 DoFHandlerType::dimension,
123 DoFHandlerType::space_dimension
> *>(&(dh.get_triangulation()));
125 dist_tria !=
nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF;
127 dh.locally_owned_mg_dofs(
level),
134 # ifdef DEAL_II_WITH_MPI
135 # ifdef DEAL_II_TRILINOS_WITH_TPETRA
136 template <
typename Number>
144 template <
typename SparsityPatternType,
typename DoFHandlerType>
149 const SparsityPatternType &sp,
152 const ::parallel::TriangulationBase<DoFHandlerType::dimension,
153 DoFHandlerType::space_dimension>
155 DoFHandlerType::dimension,
156 DoFHandlerType::space_dimension
> *>(&(dh.get_triangulation()));
158 dist_tria !=
nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF;
160 dh.locally_owned_mg_dofs(
level),
176 template <
typename SparsityPatternType,
typename DoFHandlerType>
181 const SparsityPatternType &sp,
184 const ::parallel::TriangulationBase<DoFHandlerType::dimension,
185 DoFHandlerType::space_dimension>
187 DoFHandlerType::dimension,
188 DoFHandlerType::space_dimension
> *>(&(dh.get_triangulation()));
190 dist_tria !=
nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF;
192 dh.locally_owned_mg_dofs(
level),
202 template <
typename Number>
210 template <
typename SparsityPatternType,
typename DoFHandlerType>
215 const SparsityPatternType &,
216 const DoFHandlerType &)
221 "ERROR: MGTransferPrebuilt with LinearAlgebra::distributed::Vector currently "
222 "needs deal.II to be configured with Trilinos."));
228 #ifdef DEAL_II_WITH_PETSC
237 template <
typename SparsityPatternType,
typename DoFHandlerType>
242 const SparsityPatternType &sp,
243 const DoFHandlerType & dh)
245 const ::parallel::TriangulationBase<DoFHandlerType::dimension,
246 DoFHandlerType::space_dimension>
248 DoFHandlerType::dimension,
249 DoFHandlerType::space_dimension
> *>(&(dh.get_triangulation()));
251 dist_tria !=
nullptr ? dist_tria->get_communicator() : MPI_COMM_SELF;
254 dh.locally_owned_mg_dofs(
level),
278 template <
typename VectorType>
294 template <
int dim,
class InVector,
int spacedim>
298 const InVector & src)
const;
307 template <
int dim,
class OutVector,
int spacedim>
318 template <
int dim,
class OutVector,
int spacedim>
358 template <
int dim,
int spacedim>
366 std::vector<types::global_dof_index>
sizes;
376 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>>
387 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>>
398 std::vector<std::pair<types::global_dof_index, types::global_dof_index>>>
425 template <
int dim,
int spacedim>
443 template <
typename Number>
445 :
public MGTransferBase<LinearAlgebra::distributed::Vector<Number>>
460 template <
int dim,
typename Number2,
int spacedim>
473 template <
int dim,
typename Number2,
int spacedim>
485 template <
int dim,
typename Number2,
int spacedim>
527 template <
int dim,
typename Number2,
int spacedim>
532 const bool solution_transfer)
const;
537 template <
int dim,
int spacedim>
545 std::vector<types::global_dof_index>
sizes;
650 template <
int dim,
int spacedim>
670 template <
typename VectorType>
707 template <
int dim,
int spacedim>
716 template <
int dim,
int spacedim>
783 std::shared_ptr<typename internal::MatrixSelector<VectorType>::Sparsity>>
792 std::shared_ptr<typename internal::MatrixSelector<VectorType>::Matrix>>
std::vector< Table< 2, unsigned int > > copy_indices_global_mine
::SparseMatrix< typename VectorType::value_type > Matrix
std::vector< Table< 2, unsigned int > > copy_indices_level_mine
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcNoProlongation()
std::size_t memory_consumption() const
SmartPointer< const MGConstrainedDoFs, MGLevelGlobalTransfer< VectorType > > mg_constrained_dofs
virtual void prolongate(const unsigned int to_level, VectorType &dst, const VectorType &src) const override
void print_indices(std::ostream &os) const
std::vector< types::global_dof_index > sizes
std::vector< Table< 2, unsigned int > > copy_indices
void fill_and_communicate_copy_indices(const DoFHandler< dim, spacedim > &dof_handler)
static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, DoFHandlerType &dh)
LinearAlgebra::distributed::Vector< Number > ghosted_global_vector
bool perform_renumbered_plain_copy
std::vector< Table< 2, unsigned int > > solution_copy_indices_level_mine
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > copy_indices_level_mine
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > copy_indices_global_mine
static void reinit(Matrix &matrix, Sparsity &sparsity, int level, const SparsityPatternType &sp, const DoFHandlerType &)
static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, DoFHandlerType &dh)
void copy_from_mg_add(const DoFHandler< dim, spacedim > &dof_handler, OutVector &dst, const MGLevelObject< VectorType > &src) const
virtual ~MGTransferPrebuilt() override=default
std::vector< std::shared_ptr< typename internal::MatrixSelector< VectorType >::Matrix > > prolongation_matrices
void build_matrices(const DoFHandler< dim, spacedim > &dof_handler)
static const bool requires_distributed_sparsity_pattern
void initialize_constraints(const MGConstrainedDoFs &mg_constrained_dofs)
MGTransferPrebuilt()=default
#define DEAL_II_NAMESPACE_OPEN
std::vector< Table< 2, unsigned int > > solution_copy_indices
@ matrix
Contents is actually a matrix.
std::size_t memory_consumption() const
std::vector< unsigned int > component_to_block_map
::SparsityPattern Sparsity
#define DEAL_II_DEPRECATED
void build(const DoFHandler< dim, spacedim > &dof_handler)
static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, const DoFHandlerType &dh)
static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, DoFHandlerType &dh)
static void reinit(Matrix &matrix, Sparsity &, int level, const SparsityPatternType &sp, DoFHandlerType &dh)
SparseMatrix< double > SparseMatrix
void set_component_to_block_map(const std::vector< unsigned int > &map)
#define DeclException0(Exception0)
std::vector< std::shared_ptr< typename internal::MatrixSelector< VectorType >::Sparsity > > prolongation_sparsities
std::vector< types::global_dof_index > sizes
std::vector< unsigned int > component_to_block_map
void copy_to_mg(const DoFHandler< dim, spacedim > &dof_handler, MGLevelObject< VectorType > &dst, const InVector &src) const
std::vector< std::vector< std::pair< types::global_dof_index, types::global_dof_index > > > copy_indices
static ::ExceptionBase & ExcMatricesNotBuilt()
std::vector< std::vector< bool > > interface_dofs
void assert_built(const DoFHandler< dim, spacedim > &dof_handler) const
void print_matrices(std::ostream &os) const
MGLevelObject< LinearAlgebra::distributed::Vector< Number > > ghosted_level_vector
void copy_from_mg(const DoFHandler< dim, spacedim > &dof_handler, OutVector &dst, const MGLevelObject< VectorType > &src) const
#define DEAL_II_NAMESPACE_CLOSE
std::vector< Table< 2, unsigned int > > solution_copy_indices_global_mine
void copy_from(const size_type n_rows, const size_type n_cols, const ForwardIterator begin, const ForwardIterator end)
#define AssertThrow(cond, exc)
virtual void restrict_and_add(const unsigned int from_level, VectorType &dst, const VectorType &src) const override
LinearAlgebra::distributed::Vector< Number > solution_ghosted_global_vector
SmartPointer< const MGConstrainedDoFs, MGLevelGlobalTransfer< LinearAlgebra::distributed::Vector< Number > > > mg_constrained_dofs
MGLevelObject< LinearAlgebra::distributed::Vector< Number > > solution_ghosted_level_vector