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

Use frobenius_norm2() instead of frobenius_norm()

Saves us one call to sqrt().

[[Imported from SVN: r9400]]
parent 1dce8766
No related branches found
No related tags found
No related merge requests found
...@@ -365,9 +365,9 @@ public: ...@@ -365,9 +365,9 @@ public:
RT curvatureEnergy(const Tensor3<double,3,3,3>& DR) const RT curvatureEnergy(const Tensor3<double,3,3,3>& DR) const
{ {
#ifdef DONT_USE_CURL #ifdef DONT_USE_CURL
return mu_ * std::pow(L_c_ * DR.frobenius_norm(),q_); return mu_ * std::pow(L_c_ * DR.frobenius_norm2(),q_/2.0);
#else #else
return mu_ * std::pow(L_c_ * curl(DR).frobenius_norm(),q_); return mu_ * std::pow(L_c_ * curl(DR).frobenius_norm2(),q_/2.0);
#endif #endif
} }
......
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