Skip to content
Snippets Groups Projects
Commit fa3f56a1 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MaL] Impl. of Eigen version of scalarTriple.

parent a84134cc
No related branches found
No related tags found
No related merge requests found
......@@ -24,10 +24,10 @@ double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v,
return pu.cross(pv).dot(pw);
}
//double scalarTriple(EigenLib::Vector3d const& u, EigenLib::Vector3d const& v,
// EigenLib::Vector3d const& w)
//{
// return (u.cross(v).dot(w))(0,0);
//}
double scalarTriple(Eigen::Vector3d const& u, Eigen::Vector3d const& v,
Eigen::Vector3d const& w)
{
return u.cross(v).dot(w);
}
} // end namespace MathLib
......@@ -16,6 +16,7 @@
#pragma once
#include <Eigen/Eigen>
#include <cmath>
#include "TemplatePoint.h"
......@@ -200,4 +201,7 @@ using Vector3 = TemplateVector3<double>;
double scalarTriple(MathLib::Vector3 const& u, MathLib::Vector3 const& v,
MathLib::Vector3 const& w);
/// Calculates the scalar triple (u x v) . w using Eigen functionality
double scalarTriple(Eigen::Vector3d const& u, Eigen::Vector3d const& v,
Eigen::Vector3d const& w);
} // namespace MathLib
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