mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-18 09:41:31 +00:00
time properly implemented to .. everything.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user