16 #ifndef dealii__multigrid_h 17 #define dealii__multigrid_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/subscriptor.h> 22 #include <deal.II/base/smartpointer.h> 23 #include <deal.II/dofs/dof_handler.h> 24 #include <deal.II/lac/sparse_matrix.h> 25 #include <deal.II/lac/vector.h> 26 #include <deal.II/multigrid/mg_base.h> 27 #include <deal.II/base/mg_level_object.h> 31 DEAL_II_NAMESPACE_OPEN
63 template <
typename VectorType>
80 typedef VectorType vector_type;
81 typedef const VectorType const_vector_type;
203 bool relative =
false);
333 template<
int dim,
class OtherVectorType,
class TRANSFER>
friend class PreconditionMG;
349 template<
int dim,
typename VectorType,
class TRANSFER>
372 template<
class OtherVectorType>
373 void vmult (OtherVectorType &dst,
374 const OtherVectorType &src)
const;
380 template<
class OtherVectorType>
381 void vmult_add (OtherVectorType &dst,
382 const OtherVectorType &src)
const;
389 template<
class OtherVectorType>
390 void Tvmult (OtherVectorType &dst,
391 const OtherVectorType &src)
const;
398 template<
class OtherVectorType>
399 void Tvmult_add (OtherVectorType &dst,
400 const OtherVectorType &src)
const;
425 template <
typename VectorType>
437 maxlevel(mg_dof_handler.get_triangulation().n_global_levels()-1),
442 matrix(&matrix, typeid(*this).name()),
443 coarse(&coarse, typeid(*this).name()),
444 transfer(&transfer, typeid(*this).name()),
445 pre_smooth(&pre_smooth, typeid(*this).name()),
446 post_smooth(&post_smooth, typeid(*this).name()),
448 edge_up(0, typeid(*this).name()),
454 template <
typename VectorType>
464 template <
typename VectorType>
476 template<
int dim,
typename VectorType,
class TRANSFER>
487 template<
int dim,
typename VectorType,
class TRANSFER>
494 template<
int dim,
typename VectorType,
class TRANSFER>
495 template<
class OtherVectorType>
498 (OtherVectorType &dst,
499 const OtherVectorType &src)
const 506 transfer->copy_from_mg(*dof_handler,
512 template<
int dim,
typename VectorType,
class TRANSFER>
513 template<
class OtherVectorType>
516 (OtherVectorType &dst,
517 const OtherVectorType &src)
const 523 transfer->copy_from_mg_add(*dof_handler,
529 template<
int dim,
typename VectorType,
class TRANSFER>
530 template<
class OtherVectorType>
534 const OtherVectorType &)
const 536 Assert(
false, ExcNotImplemented());
540 template<
int dim,
typename VectorType,
class TRANSFER>
541 template<
class OtherVectorType>
545 const OtherVectorType &)
const 547 Assert(
false, ExcNotImplemented());
552 DEAL_II_NAMESPACE_CLOSE
SmartPointer< const MGMatrixBase< VectorType >, Multigrid< VectorType > > matrix
SmartPointer< const TRANSFER, PreconditionMG< dim, VectorType, TRANSFER > > transfer
SmartPointer< const MGMatrixBase< VectorType > > edge_in
void vmult(OtherVectorType &dst, const OtherVectorType &src) const
void set_edge_matrices(const MGMatrixBase< VectorType > &edge_out, const MGMatrixBase< VectorType > &edge_in)
unsigned int get_maxlevel() const
void set_maxlevel(const unsigned int)
MGLevelObject< VectorType > t
SmartPointer< const MGCoarseGridBase< VectorType >, Multigrid< VectorType > > coarse
Multigrid(const DoFHandler< dim > &mg_dof_handler, const MGMatrixBase< VectorType > &matrix, const MGCoarseGridBase< VectorType > &coarse, const MGTransferBase< VectorType > &transfer, const MGSmootherBase< VectorType > &pre_smooth, const MGSmootherBase< VectorType > &post_smooth, Cycle cycle=v_cycle)
SmartPointer< const MGMatrixBase< VectorType >, Multigrid< VectorType > > edge_up
void set_debug(const unsigned int)
void level_v_step(const unsigned int level)
SmartPointer< const MGSmootherBase< VectorType >, Multigrid< VectorType > > post_smooth
#define Assert(cond, exc)
void Tvmult(OtherVectorType &dst, const OtherVectorType &src) const
SmartPointer< Multigrid< VectorType >, PreconditionMG< dim, VectorType, TRANSFER > > multigrid
unsigned int get_minlevel() const
SmartPointer< const MGMatrixBase< VectorType > > edge_out
void vmult_add(OtherVectorType &dst, const OtherVectorType &src) const
SmartPointer< const MGTransferBase< VectorType >, Multigrid< VectorType > > transfer
void set_minlevel(const unsigned int level, bool relative=false)
void set_edge_flux_matrices(const MGMatrixBase< VectorType > &edge_down, const MGMatrixBase< VectorType > &edge_up)
SmartPointer< const DoFHandler< dim >, PreconditionMG< dim, VectorType, TRANSFER > > dof_handler
void Tvmult_add(OtherVectorType &dst, const OtherVectorType &src) const
MGLevelObject< VectorType > solution
void level_step(const unsigned int level, Cycle cycle)
SmartPointer< const MGSmootherBase< VectorType >, Multigrid< VectorType > > pre_smooth
SmartPointer< const MGMatrixBase< VectorType >, Multigrid< VectorType > > edge_down
MGLevelObject< VectorType > defect2
MGLevelObject< VectorType > defect
PreconditionMG(const DoFHandler< dim > &dof_handler, Multigrid< VectorType > &mg, const TRANSFER &transfer)
void reinit(const unsigned int minlevel, const unsigned int maxlevel)