Skip to content
Snippets Groups Projects
Commit 6e860577 authored by podlesny's avatar podlesny
Browse files

fix hessian, should only yield components in tangential direction

parent 0edb8dac
No related branches found
No related tags found
No related merge requests found
...@@ -150,16 +150,16 @@ class WrappedScalarFriction : public LocalFriction<dimension> { ...@@ -150,16 +150,16 @@ class WrappedScalarFriction : public LocalFriction<dimension> {
double const tensorweight = (H2 - H1 / xnorm); double const tensorweight = (H2 - H1 / xnorm);
double const idweight = H1 / xnorm; double const idweight = H1 / xnorm;
//std::cout << tensorweight << " " << idweight << std::endl; //std::cout << "weights: " << tensorweight << " " << idweight << std::endl;
for (size_t i = 0; i < dimension; ++i) for (size_t i = 1; i < dimension; ++i)
for (size_t j = 0; j < i; ++j) { for (size_t j = 1; j < i; ++j) {
double const entry = tensorweight * y[i] * y[j]; double const entry = tensorweight * y[i] * y[j];
A[i][j] += entry; A[i][j] += entry;
A[j][i] += entry; A[j][i] += entry;
} }
for (size_t k = 0; k < dimension; ++k) { for (size_t k = 1; k < dimension; ++k) {
double const entry = tensorweight * y[k] * y[k]; double const entry = tensorweight * y[k] * y[k];
A[k][k] += entry + idweight; A[k][k] += entry + idweight;
} }
......
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