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

BUGFIX: coordinates on subsimplices need to be normalized (only 2d, so far)

[[Imported from SVN: r4067]]
parent a1660a23
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,11 @@ template <int dim, class ctype, class TargetSpace>
TargetSpace LocalGeodesicFEFunction<dim,ctype,TargetSpace>::
evaluate(const Dune::FieldVector<ctype, dim>& local)
{
TargetSpace result = TargetSpace::interpolate(coefficients_[0], coefficients_[1], local[0]);
assert(dim==2);
ctype extraCoord = 1-local[0]-local[1];
ctype factor = extraCoord+local[0];
TargetSpace result = TargetSpace::interpolate(coefficients_[0], coefficients_[1], local[0]/factor);
for (int i=1; i<dim; i++)
result = TargetSpace::interpolate(result, coefficients_[i+1], local[i]);
......
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