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

replace an 'I'm not really sure'-style comment by a proper explanation

[[Imported from SVN: r8368]]
parent 4e03c456
No related branches found
No related tags found
No related merge requests found
...@@ -651,9 +651,9 @@ public: ...@@ -651,9 +651,9 @@ public:
// use the functionality from the unitvector class // use the functionality from the unitvector class
Dune::FieldMatrix<T,4,4> result = UnitVector<T,4>::secondDerivativeOfDistanceSquaredWRTSecondArgument(p.globalCoordinates(), Dune::FieldMatrix<T,4,4> result = UnitVector<T,4>::secondDerivativeOfDistanceSquaredWRTSecondArgument(p.globalCoordinates(),
q.globalCoordinates()); q.globalCoordinates());
// for some reason that I don't really understand, the distance we have defined for the rotations (== Unit quaternions) // The unit quaternions form a double cover of SO(3). That means going once around the unit sphere (2\pi)
// is twice the corresponding distance on the unit quaternions seen as a sphere. Hence the derivative of the // means going twice around SO(3) (4\pi). Hence there is a factor 2, which in addition we need to square,
// squared distance needs to be multiplied by 4. // because we are considering the squared distance.
result *= 4; result *= 4;
return result; return result;
} }
...@@ -666,9 +666,9 @@ public: ...@@ -666,9 +666,9 @@ public:
// use the functionality from the unitvector class // use the functionality from the unitvector class
Dune::FieldMatrix<T,4,4> result = UnitVector<T,4>::secondDerivativeOfDistanceSquaredWRTFirstAndSecondArgument(p.globalCoordinates(), Dune::FieldMatrix<T,4,4> result = UnitVector<T,4>::secondDerivativeOfDistanceSquaredWRTFirstAndSecondArgument(p.globalCoordinates(),
q.globalCoordinates()); q.globalCoordinates());
// for some reason that I don't really understand, the distance we have defined for the rotations (== Unit quaternions) // The unit quaternions form a double cover of SO(3). That means going once around the unit sphere (2\pi)
// is twice the corresponding distance on the unit quaternions seen as a sphere. Hence the derivative of the // means going twice around SO(3) (4\pi). Hence there is a factor 2, which in addition we need to square,
// squared distance needs to be multiplied by 4. // because we are considering the squared distance.
result *= 4; result *= 4;
return result; return result;
} }
...@@ -681,9 +681,9 @@ public: ...@@ -681,9 +681,9 @@ public:
// use the functionality from the unitvector class // use the functionality from the unitvector class
Tensor3<T,4,4,4> result = UnitVector<T,4>::thirdDerivativeOfDistanceSquaredWRTSecondArgument(p.globalCoordinates(), Tensor3<T,4,4,4> result = UnitVector<T,4>::thirdDerivativeOfDistanceSquaredWRTSecondArgument(p.globalCoordinates(),
q.globalCoordinates()); q.globalCoordinates());
// for some reason that I don't really understand, the distance we have defined for the rotations (== Unit quaternions) // The unit quaternions form a double cover of SO(3). That means going once around the unit sphere (2\pi)
// is twice the corresponding distance on the unit quaternions seen as a sphere. Hence the derivative of the // means going twice around SO(3) (4\pi). Hence there is a factor 2, which in addition we need to square,
// squared distance needs to be multiplied by 4. // because we are considering the squared distance.
result *= 4; result *= 4;
return result; return result;
} }
...@@ -696,9 +696,9 @@ public: ...@@ -696,9 +696,9 @@ public:
// use the functionality from the unitvector class // use the functionality from the unitvector class
Tensor3<T,4,4,4> result = UnitVector<T,4>::thirdDerivativeOfDistanceSquaredWRTFirst1AndSecond2Argument(p.globalCoordinates(), Tensor3<T,4,4,4> result = UnitVector<T,4>::thirdDerivativeOfDistanceSquaredWRTFirst1AndSecond2Argument(p.globalCoordinates(),
q.globalCoordinates()); q.globalCoordinates());
// for some reason that I don't really understand, the distance we have defined for the rotations (== Unit quaternions) // The unit quaternions form a double cover of SO(3). That means going once around the unit sphere (2\pi)
// is twice the corresponding distance on the unit quaternions seen as a sphere. Hence the derivative of the // means going twice around SO(3) (4\pi). Hence there is a factor 2, which in addition we need to square,
// squared distance needs to be multiplied by 4. // because we are considering the squared distance.
result *= 4; result *= 4;
return result; return result;
} }
......
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