* #inverse_derivative. It is up to this object to implement
* reassembling accordingly.
*
+ * <h3>Contents of the NamedData objects</h3>
+ *
+ * The only value used by the Newton method is the first vector in the
+ * parameter <tt>out</tt> of operator()(). It serves as the start
+ * vector of Newton's method and in the end contains the solution. All
+ * other vectors of <tt>out</tt> are ignored by Newton's method and
+ * its inner Operator objects. All vectors of <tt>in</tt> are forwarded to
+ * the inner Operator objects, with additional information added as follows.
+ *
+ * When calling (*#residual)(), the NamedData <tt>in</tt> given to the
+ * Newton iteration is prepended by a vector <tt>"Newton iterate"</tt>,
+ * the current value of the Newton iterate, which can be used to
+ * evaluate the residual at this point.
+ *
+ * For the call to (*#inverse_derivative), the vector <tt>"Newton
+ * residual"</tt> is inserted before <tt>"Newton iterate"<tt>.
+ *
* @author Guido Kanschat, 2006, 2010
*/
template <class VECTOR>
public:
/**
* Constructor, receiving the
- * application computing the
+ * applications computing the
* residual and solving the
- * linear problem.
+ * linear problem, respectively.
*/
Newton (Operator<VECTOR>& residual, Operator<VECTOR>& inverse_derivative);
/**
- * Declare the parameter
+ * Declare the parameters
* applicable to Newton's method.
*/
void declare_parameters (ParameterHandler& param);
void initialize (ParameterHandler& param);
/**
- * The actual Newton iteration.
+ * The actual Newton
+ * iteration. The initial value
+ * is in <tt>out(0)</tt>, which
+ * also contains the result
+ * after convergence. Values in
+ * <tt>in</tt> are not used by
+ * Newton, but will be handed
+ * down to the objects
+ * #residual and #inverse_derivative.
*/
virtual void operator() (NamedData<VECTOR*>& out, const NamedData<VECTOR*>& in);
* method, which would then trigger reassembling of a matrix or
* similar things.
*
+ * <h3>Usage for nested iterations</h3>
+ *
+ * This is probably the most prominent use for Operator, where an
+ * outer iterative method calls an inner solver and so on. Typically,
+ * the innermost method in such a nested system will have to compute a
+ * residual using values from all outer iterations. Since the depth
+ * and order of such a nesting is hardly predictable when designing a
+ * general tool, we use NamedData to access these vectors. Typically,
+ * the first vector in <tt>out</tt> contains the start vector when
+ * operator()() is called, and the solution when the function
+ * returns. The object <tt>in</tt> is providing additional information
+ * and forwarded to the inner Operator objects of the nested
+ * iteration.
+ *
* @author Guido Kanschat, 2010
*/
template <class VECTOR>