16 #ifndef dealii_solver_qmrs_h 17 #define dealii_solver_qmrs_h 94 template <
typename VectorType = Vector<
double>>
178 template <
typename MatrixType,
typename PreconditionerType>
180 solve(
const MatrixType &
A,
183 const PreconditionerType &preconditioner);
213 const double last_residual);
220 template <
typename MatrixType,
typename PreconditionerType>
225 const PreconditionerType &preconditioner,
244 template <
class VectorType>
247 const double last_residual)
249 , last_residual(last_residual)
254 template <
class VectorType>
263 template <
class VectorType>
271 template <
class VectorType>
279 template <
class VectorType>
280 template <
typename MatrixType,
typename PreconditionerType>
285 const PreconditionerType &preconditioner)
316 state =
iterate(A, x, b, preconditioner, *Vr, *Vu, *Vq, *Vt, *Vd);
327 template <
class VectorType>
328 template <
typename MatrixType,
typename PreconditionerType>
333 const PreconditionerType &preconditioner,
344 double tau, rho, theta = 0;
355 preconditioner.vmult(t, r);
362 preconditioner.vmult(q, t);
366 res = std::sqrt(tau);
381 const double sigma = q * t;
388 const double alpha = rho / sigma;
394 const double theta_old = theta;
400 preconditioner.vmult(t, r);
410 const double psi = 1. / (1. + theta);
414 d.sadd(psi * theta_old, psi * alpha, q);
422 res = std::sqrt((it + 1) * tau);
443 const double rho_old = rho;
454 preconditioner.vmult(u, t);
459 const double beta = rho / rho_old;
Stop iteration, goal not reached.
bool left_preconditioning
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
boost::signals2::signal< SolverControl::State(const unsigned int iteration, const double check_value, const VectorType ¤t_iterate), StateCombiner > iteration_status
#define AssertThrow(cond, exc)
virtual void print_vectors(const unsigned int step, const VectorType &x, const VectorType &r, const VectorType &d) const
SolverQMRS(SolverControl &cn, VectorMemory< VectorType > &mem, const AdditionalData &data=AdditionalData())
Stop iteration, goal reached.
#define DEAL_II_NAMESPACE_CLOSE
Expression fabs(const Expression &x)
SolverControl::State state
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
AdditionalData(const bool left_preconditioning=false, const double solver_tolerance=1.e-9, const bool breakdown_testing=true, const double breakdown_threshold=1.e-16)
#define DEAL_II_NAMESPACE_OPEN
IterationResult iterate(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner, VectorType &r, VectorType &u, VectorType &q, VectorType &t, VectorType &d)
double breakdown_threshold
AdditionalData additional_data
IterationResult(const SolverControl::State state, const double last_residual)
VectorMemory< VectorType > & memory