fixed a bug with jacobian

This commit is contained in:
Jukka Aho
2015-09-22 20:05:40 +03:00
parent 46df20868a
commit c6d472295a
+3 -13
View File
@@ -42,22 +42,12 @@ function get_detJ(eq::Equation, ip::IntegrationPoint)
get_detJ(el, ip)
end
function get_detJ(el::Element, ip::IntegrationPoint)
J = get_Jacobian(el, ip.xi)
ls = length(size(J))
if ls == 1 # for manifolds
return norm(J)
else
return det(J)
end
J = get_detJ(el, ip.xi)
end
function get_detJ(el::Element, xi::Vector)
J = get_Jacobian(el, xi)
ls = length(size(J))
if ls == 1 # for manifolds
return norm(J)
else
return det(J)
end
s = size(J)
return s[1] == s[2] ? det(J) : norm(J)
end
"""