16 #ifndef dealii__solver_bicgstab_h 17 #define dealii__solver_bicgstab_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/logstream.h> 22 #include <deal.II/lac/solver.h> 23 #include <deal.II/lac/solver_control.h> 25 #include <deal.II/base/subscriptor.h> 27 DEAL_II_NAMESPACE_OPEN
71 template <
typename VectorType = Vector<
double> >
131 template<
typename MatrixType,
typename PreconditionerType>
133 solve (
const MatrixType &A,
136 const PreconditionerType &precondition);
142 template <
typename MatrixType>
143 double criterion (
const MatrixType &A,
const VectorType &x,
const VectorType &b);
153 const VectorType &d)
const;
190 const VectorType *
Vb;
232 template <
typename MatrixType>
243 unsigned int last_step;
244 double last_residual;
248 const unsigned int last_step,
249 const double last_residual);
256 template<
typename MatrixType,
typename PreconditionerType>
259 const PreconditionerType &precondition);
268 template<
typename VectorType>
272 const unsigned int last_step,
273 const double last_residual)
277 last_step (last_step),
278 last_residual (last_residual)
282 template<
typename VectorType>
293 template<
typename VectorType>
303 template<
typename VectorType>
309 template <
typename VectorType>
310 template <
typename MatrixType>
325 template <
typename VectorType >
326 template <
typename MatrixType>
331 Vr->sadd(-1.,1.,*
Vb);
339 template<
typename VectorType>
344 const VectorType &)
const 349 template<
typename VectorType>
350 template<
typename MatrixType,
typename PreconditionerType>
353 const PreconditionerType &precondition)
360 VectorType &rbar = *
Vrbar;
388 precondition.vmult(y,p);
396 if (std::fabs(
alpha) > 1.e10)
399 res = std::sqrt(r.add_and_dot(-
alpha, v, r));
414 precondition.vmult(z,r);
426 res = std::sqrt(r.add_and_dot(-
omega, t, r));
436 template<
typename VectorType>
437 template<
typename MatrixType,
typename PreconditionerType>
442 const PreconditionerType &precondition)
444 deallog.
push(
"Bicgstab");
448 Vrbar->reinit(x,
true);
471 deallog <<
"Restart step " <<
step << std::endl;
477 state =
iterate(A, precondition);
479 while (state.breakdown ==
true);
494 state.last_residual));
500 DEAL_II_NAMESPACE_CLOSE
Stop iteration, goal not reached.
SolverBicgstab(SolverControl &cn, VectorMemory< VectorType > &mem, const AdditionalData &data=AdditionalData())
IterationResult iterate(const MatrixType &A, const PreconditionerType &precondition)
#define AssertThrow(cond, exc)
virtual ~SolverBicgstab()
void solve(const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &precondition)
Stop iteration, goal reached.
AdditionalData additional_data
VectorMemory< VectorType > & memory
boost::signals2::signal< SolverControl::State(const unsigned int iteration, const double check_value, const VectorType ¤t_iterate), StateCombiner > iteration_status
AdditionalData(const bool exact_residual=true, const double breakdown=1.e-10)
void push(const std::string &text)
virtual void print_vectors(const unsigned int step, const VectorType &x, const VectorType &r, const VectorType &d) const
SolverControl::State start(const MatrixType &A)
double criterion(const MatrixType &A, const VectorType &x, const VectorType &b)