Skip to content
Snippets Groups Projects
Commit 9ee0e5e6 authored by Oliver Sander's avatar Oliver Sander Committed by sander@FU-BERLIN.DE
Browse files

method to compute the actual Hesse matrix. For some strange reason this slows...

method to compute the actual Hesse matrix.  For some strange reason this slows down convergence, rather than speeding it up.  to be investigated

[[Imported from SVN: r7173]]
parent 24100eab
Branches
No related tags found
No related merge requests found
......@@ -73,6 +73,25 @@ public:
matrix.axpy(weights_[i], TargetSpace::secondDerivativeOfDistanceSquaredWRTSecondArgument(coefficients_[i], x));
}
void assembleHessian(const TargetSpace& x,
Dune::FieldMatrix<double,size,size>& matrix) const
{
Dune::FieldMatrix<double,embeddedSize,embeddedSize> embeddedHessian;
assembleEmbeddedHessian(x,embeddedHessian);
Dune::FieldMatrix<double,size,embeddedSize> frame = x.orthonormalFrame();
// this is frame * embeddedHessian * frame^T
for (int i=0; i<size; i++)
for (int j=0; j<size; j++) {
matrix[i][j] = 0;
for (int k=0; k<embeddedSize; k++)
for (int l=0; l<embeddedSize; l++)
matrix[i][j] += frame[i][k]*embeddedHessian[k][l]*frame[j][l];
}
}
const std::vector<TargetSpace> coefficients_;
const std::vector<double> weights_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment