Skip to content
Snippets Groups Projects
Commit e6dca29a authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Use a better initial iterate for the TargetSpaceTRSolver than coefficients_[0]

The new initial iterate is constructed by interpolating the values in Euclidean
space, and projecting back onto TargetSpace.  This has two advantages:
1) It's a better initial iterate, so we should converge faster than starting
   from coefficients_[0]
2) It makes it easier for ADOL-C to pick up correct second derivatives.
   Hence we are able to reduce the minimum number of iterations of the
   target space tr solver.

[[Imported from SVN: r9683]]
parent 85d33d4c
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@
#include <dune/gfe/averagedistanceassembler.hh>
#include <dune/gfe/targetspacertrsolver.hh>
#include <dune/gfe/localprojectedfefunction.hh>
#include <dune/gfe/rigidbodymotion.hh>
#include <dune/gfe/tensor3.hh>
......@@ -187,10 +188,15 @@ evaluate(const Dune::FieldVector<ctype, dim>& local) const
// The energy functional whose mimimizer is the value of the geodesic interpolation
AverageDistanceAssembler<TargetSpace> assembler(coefficients_, w);
// Create a reasonable initial iterate for the iterative solver
Dune::GFE::LocalProjectedFEFunction<dim,ctype,LocalFiniteElement,TargetSpace> localProjectedFEFunction(localFiniteElement_, coefficients_);
TargetSpace initialIterate = localProjectedFEFunction.evaluate(local);
// Iteratively solve the GFE minimization problem
TargetSpaceRiemannianTRSolver<TargetSpace> solver;
solver.setup(&assembler,
coefficients_[0], // initial iterate
initialIterate,
1e-14, // tolerance
100, // maxTrustRegionSteps
2, // initial trust region radius
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment