16#ifndef dealii_solver_h
17#define dealii_solver_h
26#include <boost/signals2.hpp>
32template <
typename number>
339template <
class VectorType = Vector<
double>>
400 boost::signals2::connection
403 const double check_value,
404 const VectorType ¤t_iterate)>
439 template <
typename Iterator>
465 boost::signals2::signal<
467 const double check_value,
468 const VectorType & current_iterate),
478template <
class VectorType>
494template <
class VectorType>
495template <
typename Iterator>
498 const Iterator end)
const
501 ExcMessage(
"You can't combine iterator states if no state is given."));
507 for (; p !=
end; ++p)
508 state = this->
operator()(state, *p);
514template <
class VectorType>
524 connect([&solver_control](
const unsigned int iteration,
525 const double check_value,
526 const VectorType &) {
527 return solver_control.
check(iteration, check_value);
533template <
class VectorType>
536 memory(static_vector_memory)
542 connect([&solver_control](
const unsigned int iteration,
543 const double check_value,
544 const VectorType &) {
545 return solver_control.
check(iteration, check_value);
551template <
class VectorType>
552inline boost::signals2::connection
555 const double check_value,
556 const VectorType & current_iterate)>
559 return iteration_status.connect(slot);
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