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

assemble gradient of functional

[[Imported from SVN: r5542]]
parent 7d582395
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,10 @@ public:
void assembleGradient(const TargetSpace& x,
typename TargetSpace::EmbeddedTangentVector& gradient) const
{
DUNE_THROW(Dune::NotImplemented, "assembleGradient");
gradient = 0;
for (size_t i=0; i<coefficients_.size(); i++)
gradient.axpy(weights_[i]*TargetSpace::distance(coefficients_[i], x),
TargetSpace::derivativeOfDistanceWRTSecondArgument(coefficients_[i], x));
}
void assembleMatrix(const TargetSpace& x,
......
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