16#ifndef dealii_solver_h
17#define dealii_solver_h
27#include <boost/signals2.hpp>
33template <
typename number>
340template <
class VectorType = Vector<
double>>
401 boost::signals2::connection
404 const double check_value,
405 const VectorType ¤t_iterate)>
440 template <
typename Iterator>
466 boost::signals2::signal<
468 const double check_value,
469 const VectorType & current_iterate),
479template <
class VectorType>
495template <
class VectorType>
496template <
typename Iterator>
499 const Iterator
end)
const
502 ExcMessage(
"You can't combine iterator states if no state is given."));
508 for (; p !=
end; ++p)
509 state = this->
operator()(state, *p);
515template <
class VectorType>
519 : memory(vector_memory)
525 connect([&solver_control](
const unsigned int iteration,
526 const double check_value,
527 const VectorType &) {
528 return solver_control.
check(iteration, check_value);
534template <
class VectorType>
537 memory(static_vector_memory)
543 connect([&solver_control](
const unsigned int iteration,
544 const double check_value,
545 const VectorType &) {
546 return solver_control.
check(iteration, check_value);
552template <
class VectorType>
553inline boost::signals2::connection
556 const double check_value,
557 const VectorType & current_iterate)>
SolverBase(SolverControl &solver_control, VectorMemory< VectorType > &vector_memory)
boost::signals2::connection connect(const std::function< SolverControl::State(const unsigned int iteration, const double check_value, const VectorType ¤t_iterate)> &slot)
boost::signals2::signal< SolverControl::State(const unsigned int iteration, const double check_value, const VectorType ¤t_iterate), StateCombiner > iteration_status
GrowingVectorMemory< VectorType > static_vector_memory
VectorMemory< VectorType > & memory
SolverBase(SolverControl &solver_control)
virtual State check(const unsigned int step, const double check_value)
@ iterate
Continue iteration.
@ success
Stop iteration, goal reached.
@ failure
Stop iteration, goal not reached.
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(VectorType &V)
SolverControl::State operator()(const Iterator begin, const Iterator end) const
SolverControl::State operator()(const SolverControl::State state1, const SolverControl::State state2) const