time properly implemented to .. everything.

This commit is contained in:
Jukka Aho
2015-09-29 00:07:56 +03:00
parent b5bcc0a630
commit 7403fb8cb7
9 changed files with 410 additions and 287 deletions
+3 -9
View File
@@ -2,13 +2,7 @@
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
using FactCheck
using JuliaFEM: test_element
facts("test set and interpolate field variable") do
el = Quad4(1, [1, 2, 3, 4])
set_coordinates(el, [0.0 0.0; 10.0 0.0; 10.0 1.0; 0.0 1.0]')
set_field(el, "displacement", [0.0 0.0; 0.0 0.0; 0.5 0.0; 0.0 0.0]'')
fval = interpolate(el, "displacement", [0.0, 1.0])
Logging.debug(fval)
@fact fval --> roughly([0.25 0.0]')
end
using JuliaFEM: Quad4
test_element(Quad4)
+4
View File
@@ -57,4 +57,8 @@ facts("test fields and interpolation") do
@fact diff(h)([0.0, 0.0])*X --> [0.5 0.0; 0.0 0.5]
@fact (diff(h)*X)([0.0, 0.0]) --> [0.5 0.0; 0.0 0.5]
b = Basis((xi) -> [1/2*(1-xi[1]), 1/2*(1+xi[1])])
f = Field(0.0, 100.0)
@fact b(0.0) * f --> [50.0, 50.0]
end