Skip to content
Snippets Groups Projects
Commit 22e674d6 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Bugfix: Return value of ProductManifold::log was wrong

It was TangentVector whereas it should have been
EmbeddedTangentVector.
parent 314552df
No related branches found
No related tags found
1 merge request!93Enable more tests for the various TargetSpace classes
......@@ -3,3 +3,5 @@
- Fix bug in the `RealTuple::log` method: Calling `log(a,b)`returned `a-b`
instead of `b-a`.
- Fix the return value of `ProductManifold::log`: It was `TangentVector`,
but now it is `EmbeddedTangentVector`.
......@@ -161,9 +161,9 @@ namespace Dune::GFE
}
/** \brief Compute difference vector from a to b on the tangent space of a */
static TangentVector log(const ProductManifold<TS,TargetSpaces...>& a, const ProductManifold<TS,TargetSpaces...>& b)
static EmbeddedTangentVector log(const ProductManifold<TS,TargetSpaces...>& a, const ProductManifold<TS,TargetSpaces...>& b)
{
TangentVector diff;
EmbeddedTangentVector diff;
auto logFunctor =[] (auto& argsTuple, std::array<std::size_t,2>& posHelper, const auto& manifoldInt)
{
auto& res = std::get<0>(argsTuple);
......@@ -172,7 +172,7 @@ namespace Dune::GFE
using Manifold = std::remove_const_t<typename std::remove_reference_t<decltype(a)> >;
const auto diffLoc = Manifold::log(a,b);
std::copy(diffLoc.begin(),diffLoc.end(),res.begin()+posHelper[0]);
posHelper[0] += Manifold::dim;
posHelper[0] += Manifold::embeddedDim;
};
foreachManifold(logFunctor,diff,a, b);
return diff;
......
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