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

Replace 'Dune::is_same' by 'std::is_same'

parent 99cc5e28
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ public:
result.r[i] = p.r[i] + v[i];
// Add rotational correction
typedef typename std::conditional<Dune::is_same<TVector,TangentVector>::value,
typedef typename std::conditional<std::is_same<TVector,TangentVector>::value,
typename Rotation<ctype,N>::TangentVector,
typename Rotation<ctype,N>::EmbeddedTangentVector>::type RotationTangentVector;
RotationTangentVector qCorr;
......
# The inverse stereographic projection through the north pole, and its derivative
def f(x):
normSquared = x[0]*x[0]+x[1]*x[1]
return [2*x[0] / (normSquared+1), 2*x[1] / (normSquared+1), (normSquared-1)/ (normSquared+1)]
#a = 20
#normSquared = a*a*(x[0]*x[0]+x[1]*x[1])
#return [a*2*x[0] / (normSquared+1), a*2*x[1] / (normSquared+1), (normSquared-1)/ (normSquared+1)]
def df(x):
normSquared = x[0]*x[0]+x[1]*x[1]
denominator = (1+normSquared)*(1+normSquared)
return (( (2*(1+normSquared) - 4*x[0]*x[0]) / denominator, (-4*x[0]*x[1]) / denominator),
( (-4*x[1]*x[0]) / denominator, (2*(1+normSquared) - 4*x[1]*x[1]) / denominator),
(4*x[0]/denominator,4*x[1]/denominator))
fdf = (f, df)
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