surface normals

This commit is contained in:
Jukka Aho
2015-09-14 20:51:39 +03:00
parent de449709e3
commit e76024d8de
3 changed files with 328 additions and 46 deletions
+4 -4
View File
@@ -43,8 +43,8 @@ function get_detJ(eq::Equation, ip::IntegrationPoint)
end
function get_detJ(el::Element, ip::IntegrationPoint)
J = get_Jacobian(el, ip.xi)
n, m = size(J)
if n != m # for manifolds
ls = length(size(J))
if ls == 1 # for manifolds
return norm(J)
else
return det(J)
@@ -52,8 +52,8 @@ function get_detJ(el::Element, ip::IntegrationPoint)
end
function get_detJ(el::Element, xi::Vector)
J = get_Jacobian(el, xi)
n, m = size(J)
if n != m # for manifolds
ls = length(size(J))
if ls == 1 # for manifolds
return norm(J)
else
return det(J)