<h3>Specific improvements</h3>
<ol>
+ <li> Fixed: Using the FEEvaluation framework did not work for
+ scalar elements in 1d because there were conflicting partial
+ specializations. This is now fixed.
+ <br>
+ (Shiva Rudraraju, 2014/11/04)
+ </li>
+
+ <li> New: There is now a macro <code>DEAL_II_VERSION_GTE</code>
+ that can be used to test whether the deal.II version is greater
+ than or equal a particular version number. This is useful if you
+ need to make application programs compatible with different
+ deal.II releases.
+ <br>
+ (Wolfgang Bangerth, 2014/10/31)
+ </li>
+
+ <li> New: The vector classes in deal.II (including Trilinos and PETSc
+ wrappers) now have a new method x.add_and_dot(factor,v,w) which performs
+ x.add(factor,v) and subsequent inner product of x with another vector
+ w. This operation occurs in some iterative solvers; by a combined operation,
+ reduced memory transfer and thus higher performance are enabled.
+ <br>
+ (Martin Kronbichler, 2014/10/27)
+ </li>
+
+ <li> Improved: Inner products and norms on deal.II's own vector classes now
+ use vectorization through VectorizedArray if available.
+ <br>
+ (Martin Kronbichler, 2014/10/27)
+ </li>
+
<li> Changed: PETSc and Trilinos vectors with ghost entries can now be reset to zero
using = 0.0;
<br>
* void reinit (const Vector &model_vector,
* const bool leave_elements_uninitialized = false);
*
-- * // Scalar product between the current object
++ * // Inner product between the current object
* // and the argument
* double operator * (const Vector &v) const;
*
* void equ (const double a,
* const Vector &x);
*
++ * // Combined scaled addition of vector x into
++ * // the current object and subsequent inner
++ * // product of the current object with v
++ * double add_and_dot (const double a,
++ * const Vector &x,
++ * const Vector &v);
++ *
* // Multiply the elements of the current
* // object by a fixed value
* Vector & operator *= (const double a);
//TODO:[?] Find better breakdown criterion
if (std::fabs(alpha) > 1.e10)
- return true;
+ return IterationResult(true, state, step, res);
- r.add(-alpha, v);
+ res = std::sqrt(r.add_and_dot(-alpha, v, r));
// check for early success, see the lac/bicgstab_early testcase as to
// why this is necessary
- if (this->control().check(step, res) == SolverControl::success)
+ //
+ // note: the vector *Vx we pass to the iteration_status signal here is only
+ // the current approximation, not the one we will return with,
+ // which will be x=*Vx + alpha*y
- res = r.l2_norm();
+ if (this->iteration_status(step, res, *Vx) == SolverControl::success)
{
Vx->add(alpha, y);
print_vectors(step, *Vx, r, y);
rhobar = t*r;
omega = rhobar/(t*t);
Vx->add(alpha, y, omega, z);
- r.add(-omega, t);
if (additional_data.exact_residual)
- res = criterion(A, *Vx, *Vb);
+ {
+ r.add(-omega, t);
+ res = criterion(A, *Vx, *Vb);
+ }
else
- res = r.l2_norm();
+ res = std::sqrt(r.add_and_dot(-omega, t, r));
- state = this->control().check(step, res);
+ state = this->iteration_status(step, res, *Vx);
print_vectors(step, *Vx, r, y);
}
while (state == SolverControl::iterate);