16 #ifndef dealii_mg_coarse_h 17 #define dealii_mg_coarse_h 37 template <
class VectorType = Vector<
double>>
91 class PreconditionerType>
105 const MatrixType &
matrix,
106 const PreconditionerType &precondition);
114 const MatrixType & matrix,
115 const PreconditionerType &precondition);
174 template <
typename number =
double,
class VectorType = Vector<number>>
207 template <
typename number =
double,
class VectorType = Vector<number>>
244 template <
class VectorType>
249 template <
class VectorType>
252 : coarse_smooth(
nullptr)
258 template <
class VectorType>
266 typeid(*this).name());
270 template <
class VectorType>
274 coarse_smooth =
nullptr;
278 template <
class VectorType>
284 coarse_smooth->
smooth(level, dst, src);
292 class PreconditionerType>
297 :
solver(0,
typeid(*this).name())
298 ,
matrix(0,
typeid(*this).name())
299 , preconditioner(0,
typeid(*this).name())
307 class PreconditionerType>
311 PreconditionerType>::
312 MGCoarseGridIterativeSolver(SolverType &
solver,
313 const MatrixType &
matrix,
314 const PreconditionerType &preconditioner)
315 :
solver(&solver,
typeid(*this).name())
317 , preconditioner(&preconditioner,
typeid(*this).name())
325 class PreconditionerType>
332 const MatrixType & matrix_,
333 const PreconditionerType &preconditioner_)
337 preconditioner = &preconditioner_;
345 class PreconditionerType>
350 PreconditionerType>::clear()
362 class PreconditionerType>
367 PreconditionerType>::
368 operator()(
const unsigned int ,
375 solver->solve(*
matrix, dst, src, *preconditioner);
382 template <
typename number,
class VectorType>
387 householder.initialize(*A);
392 template <
typename number,
class VectorType>
397 householder.initialize(A);
402 template <
typename number,
class VectorType>
409 householder.least_squares(dst, src);
416 template <
typename number,
class VectorType>
421 matrix.reinit(A.n_rows(), A.n_cols());
423 matrix.compute_inverse_svd(threshold);
427 template <
typename number,
class VectorType>
437 template <
typename number,
class VectorType>
443 for (
unsigned int i = 0; i < n; ++i)
void initialize(const FullMatrix< number > &A, const double threshold=0)
Contents is actually a matrix.
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const override
static ::ExceptionBase & ExcNotInitialized()
SmartPointer< SolverType, MGCoarseGridIterativeSolver< VectorType, SolverType, MatrixType, PreconditionerType > > solver
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const
MGCoarseGridApplySmoother()
LAPACKFullMatrix< number > matrix
SmartPointer< const MatrixType, MGCoarseGridIterativeSolver< VectorType, SolverType, MatrixType, PreconditionerType > > matrix
#define Assert(cond, exc)
#define DEAL_II_NAMESPACE_CLOSE
virtual void smooth(const unsigned int level, VectorType &u, const VectorType &rhs) const =0
void initialize(const MGSmootherBase< VectorType > &coarse_smooth)
MGCoarseGridHouseholder(const FullMatrix< number > *A=nullptr)
ARKode< VectorType > * solver
#define DEAL_II_NAMESPACE_OPEN
T min(const T &t, const MPI_Comm &mpi_communicator)
Householder< number > householder
SmartPointer< const PreconditionerType, MGCoarseGridIterativeSolver< VectorType, SolverType, MatrixType, PreconditionerType > > preconditioner
SmartPointer< const MGSmootherBase< VectorType >, MGCoarseGridApplySmoother< VectorType > > coarse_smooth
void operator()(const unsigned int level, VectorType &dst, const VectorType &src) const override
void initialize(const FullMatrix< number > &A)