- MGTools::count_dofs_per_component.
- MGTools::apply_boundary_values.
- MGTools::extract_inner_interface_dofs.
+ - Class MGMatrix.
<br>
This release also removes the deprecated class MGDoFHandler. The
functionality of this class had previously been incorporated into
/* ---------------------------------------------------------------------
*
- * Copyright (C) 2010 - 2014 by the deal.II authors
+ * Copyright (C) 2010 - 2015 by the deal.II authors
*
* This file is part of the deal.II library.
*
// Finally, we must wrap our matrices in an object having the required
// multiplication functions.
- MGMatrix<SparseMatrix<double>, Vector<double> > mgmatrix(&mg_matrix);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgdown(&mg_matrix_dg_down);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgup(&mg_matrix_dg_up);
+ mg::Matrix<Vector<double> > mgmatrix(mg_matrix);
+ mg::Matrix<Vector<double> > mgdown(mg_matrix_dg_down);
+ mg::Matrix<Vector<double> > mgup(mg_matrix_dg_up);
// Now, we are ready to set up the V-cycle operator and the multilevel
// preconditioner.
}
-/**
- * @deprecated Use the much simpler class mg::Matrix instead.
- * @author Guido Kanschat, 2002
- */
-template <class MATRIX = SparseMatrix<double>, class VECTOR = Vector<double> >
-class MGMatrix : public MGMatrixBase<VECTOR>
-{
-public:
- MGMatrix (MGLevelObject<MATRIX> *matrix= 0);
-
- void set_matrix (MGLevelObject<MATRIX> *M);
- virtual void vmult (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const;
- virtual void vmult_add (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const;
- virtual void Tvmult (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const;
- virtual void Tvmult_add (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const;
- std::size_t memory_consumption () const;
-private:
- SmartPointer<MGLevelObject<MATRIX>,MGMatrix<MATRIX,VECTOR> > matrix;
-} DEAL_II_DEPRECATED;
-
/**
* Multilevel matrix selecting from block matrices. This class implements the
}
}
-/*----------------------------------------------------------------------*/
-
-template <class MATRIX, class VECTOR>
-MGMatrix<MATRIX, VECTOR>::MGMatrix (MGLevelObject<MATRIX> *p)
- :
- matrix (p, typeid(*this).name())
-{}
-
-
-template <class MATRIX, class VECTOR>
-void
-MGMatrix<MATRIX, VECTOR>::set_matrix (MGLevelObject<MATRIX> *p)
-{
- matrix = p;
-}
-
-
-template <class MATRIX, class VECTOR>
-void
-MGMatrix<MATRIX, VECTOR>::vmult (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const
-{
- Assert(matrix != 0, ExcNotInitialized());
-
- const MGLevelObject<MATRIX> &m = *matrix;
- m[level].vmult(dst, src);
-}
-
-
-template <class MATRIX, class VECTOR>
-void
-MGMatrix<MATRIX, VECTOR>::vmult_add (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const
-{
- Assert(matrix != 0, ExcNotInitialized());
-
- const MGLevelObject<MATRIX> &m = *matrix;
- m[level].vmult_add(dst, src);
-}
-
-
-template <class MATRIX, class VECTOR>
-void
-MGMatrix<MATRIX, VECTOR>::Tvmult (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const
-{
- Assert(matrix != 0, ExcNotInitialized());
-
- const MGLevelObject<MATRIX> &m = *matrix;
- m[level].Tvmult(dst, src);
-}
-
-
-template <class MATRIX, class VECTOR>
-void
-MGMatrix<MATRIX, VECTOR>::Tvmult_add (const unsigned int level,
- VECTOR &dst,
- const VECTOR &src) const
-{
- Assert(matrix != 0, ExcNotInitialized());
-
- const MGLevelObject<MATRIX> &m = *matrix;
- m[level].Tvmult_add(dst, src);
-}
-
-
-template <class MATRIX, class VECTOR>
-std::size_t
-MGMatrix<MATRIX, VECTOR>::memory_consumption () const
-{
- return sizeof(*this) + matrix->memory_consumption();
-}
/*----------------------------------------------------------------------*/
mg_smoother.set_steps(2);
mg_smoother.set_symmetric(true);
- MGMatrix<SparseMatrix<float>, Vector<double> >
- mg_matrix(&mg_matrices);
+ mg::Matrix<Vector<double> >
+ mg_matrix(mg_matrices);
Multigrid<Vector<double> > mg(mg_dof_handler,
mg_matrix,
mg_coarse,
mg_smoother.set_steps(2);
mg_smoother.set_symmetric(true);
- MGMatrix<SparseMatrix<float>, Vector<double> >
- mg_matrix(&mg_matrices);
+ mg::Matrix<Vector<double> >
+ mg_matrix(mg_matrices);
Multigrid<Vector<double> > mg(mg_dof_handler,
mg_matrix,
mg_coarse,
// ---------------------------------------------------------------------
//
-// Copyright (C) 2012 - 2014 by the deal.II authors
+// Copyright (C) 2012 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
smoother_data.eig_cg_n_iterations = 10;
mg_smoother.initialize(mg_matrices, smoother_data);
- MGMatrix<LevelMatrixType, Vector<double> >
- mg_matrix(&mg_matrices);
+ mg::Matrix<Vector<double> >
+ mg_matrix(mg_matrices);
Multigrid<Vector<double> > mg(dof_handler,
mg_matrix,
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices);
mg_smoother.set_steps(2);
- MGMatrix<matrix_t,vector_t> mg_matrix(&mg_matrices);
- MGMatrix<matrix_t,vector_t> mg_interface_up(&mg_interface_matrices);
- MGMatrix<matrix_t,vector_t> mg_interface_down(&mg_interface_matrices);
+ mg::Matrix<vector_t> mg_matrix(mg_matrices);
+ mg::Matrix<vector_t> mg_interface_up(mg_interface_matrices);
+ mg::Matrix<vector_t> mg_interface_down(mg_interface_matrices);
// Now, we are ready to set up the
// V-cycle operator and the
MGSmootherPrecondition<matrix_t, Smoother, vector_t> mg_smoother;
mg_smoother.initialize(mg_matrices);
mg_smoother.set_steps(2);
- MGMatrix<matrix_t,vector_t> mg_matrix(&mg_matrices);
- MGMatrix<matrix_t,vector_t> mg_interface_up(&mg_interface_matrices);
- MGMatrix<matrix_t,vector_t> mg_interface_down(&mg_interface_matrices);
+ mg::Matrix<vector_t> mg_matrix(mg_matrices);
+ mg::Matrix<vector_t> mg_interface_up(mg_interface_matrices);
+ mg::Matrix<vector_t> mg_interface_down(mg_interface_matrices);
// Now, we are ready to set up the
// V-cycle operator and the
mg_smoother.initialize(mg_matrix, .7);
mg_smoother.set_steps(2);
- MGMatrix<TrilinosWrappers::SparseMatrix, TrilinosWrappers::MPI::Vector> mgmatrix(&mg_matrix);
- MGMatrix<TrilinosWrappers::SparseMatrix, TrilinosWrappers::MPI::Vector> mgdown(&mg_matrix_dg_down);
- MGMatrix<TrilinosWrappers::SparseMatrix, TrilinosWrappers::MPI::Vector> mgup(&mg_matrix_dg_up);
+ mg::Matrix<TrilinosWrappers::MPI::Vector> mgmatrix(mg_matrix);
+ mg::Matrix<TrilinosWrappers::MPI::Vector> mgdown(mg_matrix_dg_down);
+ mg::Matrix<TrilinosWrappers::MPI::Vector> mgup(mg_matrix_dg_up);
Multigrid<TrilinosWrappers::MPI::Vector > mg(dof_handler, mgmatrix,
coarse_grid_solver, mg_transfer,
// ---------------------------------------------------------------------
//
-// Copyright (C) 2000 - 2014 by the deal.II authors
+// Copyright (C) 2000 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
MGLevelObject<FullMatrix<double> > level_matrices(0, maxlevel);
for (unsigned int i=0; i<=maxlevel; ++i)
level_matrices[i].reinit(N, N);
- MGMatrix<FullMatrix<double>, VECTOR> mgmatrix(&level_matrices);
+ mg::Matrix<VECTOR> mgmatrix(level_matrices);
Multigrid<VECTOR> mg1(minlevel, maxlevel, mgmatrix, all, all, all, all,
Multigrid<VECTOR>::v_cycle);
mg_smoother.set_steps(1);
mg_smoother_renumbered.set_steps(1);
- MGMatrix<SparseMatrix<double>, Vector<double> >
- mg_matrix(&mg_matrices);
+ mg::Matrix<Vector<double> >
+ mg_matrix(mg_matrices);
- MGMatrix<SparseMatrix<double>, Vector<double> >
- mg_matrix_renumbered(&mg_matrices_renumbered);
+ mg::Matrix<Vector<double> >
+ mg_matrix_renumbered(mg_matrices_renumbered);
Multigrid<Vector<double> > mg(mg_dof_handler,
mg_matrix,
mg_smoother.set_steps(2);
mg_smoother.set_symmetric(true);
- MGMatrix<> mg_matrix(&mg_matrices);
- MGMatrix<> mg_interface_up(&mg_interface_in);
- MGMatrix<> mg_interface_down(&mg_interface_in);
+ mg::Matrix<> mg_matrix(mg_matrices);
+ mg::Matrix<> mg_interface_up(mg_interface_in);
+ mg::Matrix<> mg_interface_down(mg_interface_in);
Multigrid<Vector<double> > mg(mg_dof_handler,
mg_matrix,
mg_smoother.set_steps(2);
mg_smoother.set_symmetric(true);
- MGMatrix<> mg_matrix(&mg_matrices);
- MGMatrix<> mg_interface_up(&mg_interface_in);
- MGMatrix<> mg_interface_down(&mg_interface_in);
+ mg::Matrix<> mg_matrix(mg_matrices);
+ mg::Matrix<> mg_interface_up(mg_interface_in);
+ mg::Matrix<> mg_interface_down(mg_interface_in);
Multigrid<Vector<double> > mg(mg_dof_handler,
mg_matrix,
mg_smoother.set_steps(2);
mg_smoother.set_symmetric(true);
- MGMatrix<> mg_matrix(&mg_matrices);
- MGMatrix<> mg_interface_up(&mg_interface_matrices);
- MGMatrix<> mg_interface_down(&mg_interface_matrices);
+ mg::Matrix<> mg_matrix(mg_matrices);
+ mg::Matrix<> mg_interface_up(mg_interface_matrices);
+ mg::Matrix<> mg_interface_down(mg_interface_matrices);
Multigrid<Vector<double> > mg(mg_dof_handler,
mg_matrix,
mg_smoother.set_symmetric(true);
mg_smoother.set_variable(false);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgmatrix(&mg_matrix);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgdown(&mg_matrix_dg_down);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgup(&mg_matrix_dg_up);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgedge(&mg_matrix_in_out);
+ mg::Matrix<Vector<double> > mgmatrix(mg_matrix);
+ mg::Matrix<Vector<double> > mgdown(mg_matrix_dg_down);
+ mg::Matrix<Vector<double> > mgup(mg_matrix_dg_up);
+ mg::Matrix<Vector<double> > mgedge(mg_matrix_in_out);
Multigrid<Vector<double> > mg(mg_dof_handler, mgmatrix,
mg_coarse, mg_transfer,
mg_smoother.set_symmetric(true);
mg_smoother.set_variable(false);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgmatrix(&mg_matrix);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgdown(&mg_matrix_dg_down);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgup(&mg_matrix_dg_up);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgedge(&mg_matrix_in_out);
+ mg::Matrix<Vector<double> > mgmatrix(mg_matrix);
+ mg::Matrix<Vector<double> > mgdown(mg_matrix_dg_down);
+ mg::Matrix<Vector<double> > mgup(mg_matrix_dg_up);
+ mg::Matrix<Vector<double> > mgedge(mg_matrix_in_out);
Multigrid<Vector<double> > mg(mg_dof_handler, mgmatrix,
mg_coarse, mg_transfer,
mg_smoother.set_symmetric(true);
mg_smoother.set_variable(false);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgmatrix(&mg_matrix);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgdown(&mg_matrix_dg_down);
- MGMatrix<SparseMatrix<double>, Vector<double> > mgup(&mg_matrix_dg_up);
+ mg::Matrix<Vector<double> > mgmatrix(mg_matrix);
+ mg::Matrix<Vector<double> > mgdown(mg_matrix_dg_down);
+ mg::Matrix<Vector<double> > mgup(mg_matrix_dg_up);
Multigrid<Vector<double> > mg(mg_dof_handler, mgmatrix,
mg_coarse, mg_transfer,