fixed problems with surface loads. det(element, ip, time) should be avoided.

This commit is contained in:
Jukka Aho
2015-12-13 13:47:45 +02:00
parent 3242241cd4
commit ccf32d5b76
10 changed files with 102 additions and 63 deletions
+12 -1
View File
@@ -6,7 +6,7 @@ module ElementTests
using JuliaFEM.Test
using JuliaFEM.Core: AbstractElement, Element, Field, FieldSet, test_element
using JuliaFEM.Core: Tri3
using JuliaFEM.Core: Tri3, Quad4
import JuliaFEM.Core: get_basis, get_dbasis, calculate_normal_tangential_coordinates!
import Base: size
@@ -91,4 +91,15 @@ function test_calculate_normal_tangential_coordinates()
end
#test_calculate_normal_tangential_coordinates()
function test_manifold_determinant()
el = Quad4([1, 2, 3, 4])
#el["geometry"] = Vector{Float64}[[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]]
el["geometry"] = Vector{Float64}[[0.0, 0.0, 1.0], [1.0, 0.0, 1.0], [1.0, 1.0, 1.0], [0.0, 1.0, 1.0]]
# mother element area = 2*2 = 4, this element is 1, determinant should be 1/4 everywhere
d = det(el, [0.1, 0.2], 0.0)
d_expected = 0.25
@test d == d_expected
end
#test_manifold_determinant()
end