|
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_coarse_h
17 #define dealii_mg_coarse_h
39 template <
class VectorType = Vector<
double>>
96 template <
typename SolverType,
class VectorType = Vector<
double>>
110 template <
typename MatrixType,
typename PreconditionerType>
113 const PreconditionerType &);
123 template <
typename MatrixType,
typename PreconditionerType>
125 initialize(
SolverType &,
const MatrixType &,
const PreconditionerType &);
146 template <
typename MatrixType>
148 set_matrix(
const MatrixType &);
179 class PreconditionerType>
193 const MatrixType &
matrix,
194 const PreconditionerType &precondition);
202 const MatrixType &
matrix,
203 const PreconditionerType &precondition);
264 template <
typename number =
double,
class VectorType = Vector<number>>
299 template <
typename number =
double,
class VectorType = Vector<number>>
336 template <
class VectorType>
338 : coarse_smooth(nullptr)
341 template <
class VectorType>
344 : coarse_smooth(nullptr)
350 template <
class VectorType>
358 typeid(*this).name());
362 template <
class VectorType>
366 coarse_smooth =
nullptr;
370 template <
class VectorType>
376 coarse_smooth->smooth(
level, dst, src);
382 template <
typename SolverType,
class VectorType>
384 : solver(0, typeid(*this).name())
390 template <
typename SolverType,
class VectorType>
391 template <
typename MatrixType,
typename PreconditionerType>
394 const MatrixType & m,
395 const PreconditionerType &p)
396 : solver(&s, typeid(*this).name())
402 precondition = linear_operator<VectorType>(
matrix, p);
406 template <
typename SolverType,
class VectorType>
413 template <
typename SolverType,
class VectorType>
414 template <
typename MatrixType,
typename PreconditionerType>
418 const MatrixType & m,
419 const PreconditionerType &p)
426 precondition = linear_operator<VectorType>(
matrix, p);
430 template <
typename SolverType,
class VectorType>
440 template <
typename SolverType,
class VectorType>
448 solver->solve(
matrix, dst, src, precondition);
452 template <
typename SolverType,
class VectorType>
453 template <
typename MatrixType>
471 class PreconditionerType>
476 : solver(0, typeid(*this).name())
477 ,
matrix(0, typeid(*this).name())
478 , preconditioner(0, typeid(*this).name())
486 class PreconditionerType>
490 PreconditionerType>::
491 MGCoarseGridIterativeSolver(
SolverType & solver,
492 const MatrixType &
matrix,
493 const PreconditionerType &preconditioner)
494 : solver(&solver, typeid(*this).name())
496 , preconditioner(&preconditioner, typeid(*this).name())
504 class PreconditionerType>
510 PreconditionerType>::initialize(
SolverType & solver_,
511 const MatrixType & matrix_,
512 const PreconditionerType &preconditioner_)
516 preconditioner = &preconditioner_;
524 class PreconditionerType>
529 PreconditionerType>::clear()
541 class PreconditionerType>
546 PreconditionerType>::
547 operator()(
const unsigned int ,
554 solver->solve(*
matrix, dst, src, *preconditioner);
561 template <
typename number,
class VectorType>
566 householder.initialize(*
A);
571 template <
typename number,
class VectorType>
576 householder.initialize(
A);
581 template <
typename number,
class VectorType>
588 householder.least_squares(dst, src);
595 template <
typename number,
class VectorType>
600 matrix.reinit(
A.n_rows(),
A.n_cols());
602 matrix.compute_inverse_svd(threshold);
606 template <
typename number,
class VectorType>
616 template <
typename number,
class VectorType>
622 for (
unsigned int i = 0; i < n; ++i)
MGCoarseGridSVD()=default
MGCoarseGridIterativeSolver()
void set_matrix(const MatrixType &)
SmartPointer< const MGSmootherBase< VectorType >, MGCoarseGridApplySmoother< VectorType > > coarse_smooth
void initialize(SolverType &solver, const MatrixType &matrix, const PreconditionerType &precondition)
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const override
void initialize(SolverType &, const MatrixType &, const PreconditionerType &)
LinearOperator< VectorType > matrix
MGCoarseGridApplySmoother()
MGCoarseGridLACIteration()
void initialize(const FullMatrix< number > &A, const double threshold=0)
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const
SmartPointer< SolverType, MGCoarseGridIterativeSolver< VectorType, SolverType, MatrixType, PreconditionerType > > solver
virtual void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const =0
~MGCoarseGridLACIteration()
#define DEAL_II_NAMESPACE_OPEN
@ matrix
Contents is actually a matrix.
#define DEAL_II_DEPRECATED
static ::ExceptionBase & ExcNotInitialized()
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const
void initialize(const MGSmootherBase< VectorType > &coarse_smooth)
SmartPointer< SolverType, MGCoarseGridLACIteration< SolverType, VectorType > > solver
LAPACKFullMatrix< number > matrix
MGCoarseGridHouseholder(const FullMatrix< number > *A=nullptr)
LinearOperator< VectorType > precondition
Householder< number > householder
#define Assert(cond, exc)
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const override
SmartPointer< const PreconditionerType, MGCoarseGridIterativeSolver< VectorType, SolverType, MatrixType, PreconditionerType > > preconditioner
T min(const T &t, const MPI_Comm &mpi_communicator)
virtual void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const override
void initialize(const FullMatrix< number > &A)
#define DEAL_II_NAMESPACE_CLOSE
SmartPointer< const MatrixType, MGCoarseGridIterativeSolver< VectorType, SolverType, MatrixType, PreconditionerType > > matrix