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
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -371,7 +371,7 @@ function dinterpolate(el::Element, field, xi::Vector)
fld = get_field(el, field)
dbasis = get_dbasisdxi(el, xi)
if isa(dbasis, Vector)
return sum(dbasis .* field)
return sum(dbasis .* fld)
end
return sum([fld[i]*dbasis[i,:] for i in 1:length(fld)])
end
+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)