mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-08-20 12:12:06 +00:00
dict fields
This commit is contained in:
@@ -6,8 +6,6 @@ using JuliaFEM.Testing
|
||||
|
||||
@testset "test interpolation of discrete constant time-variant field" begin
|
||||
f = DCTV(0.0 => 0.0, 1.0 => 1.0)
|
||||
# time interpolation of time-variant fields results it's
|
||||
# time-invariant counterpart
|
||||
@test isapprox(f(-1.0), DCTI(0.0))
|
||||
@test isapprox(f( 0.0), DCTI(0.0))
|
||||
@test isapprox(f( 0.3), DCTI(0.3))
|
||||
|
||||
@@ -13,8 +13,6 @@ using JuliaFEM.Testing
|
||||
# one timestep in field "temperature"
|
||||
@test length(el["temperature"]) == 1
|
||||
# this way we access to field at default time t=0.0, it's different than ^!
|
||||
@test length(el("temperature")) == 2
|
||||
# length of single increment
|
||||
@test length(el("temperature", 0.0)) == 2
|
||||
@test length(last(el, "temperature").data) == 2
|
||||
end
|
||||
@@ -27,8 +25,6 @@ end
|
||||
@test haskey(el, "displacement")
|
||||
@test length(el["displacement"]) == 1
|
||||
# this way we access to field at default time t=0.0, it's different than ^!
|
||||
@test length(el("displacement")) == 2
|
||||
# length of single increment
|
||||
@test length(el("displacement", 0.0)) == 2
|
||||
@test length(last(el, "displacement").data) == 2
|
||||
end
|
||||
@@ -57,7 +53,6 @@ end
|
||||
p1("geometry", 0.0)[1] = [1.0, 2.0]
|
||||
@test isapprox(p2("geometry", 0.0)[1], [1.0, 2.0])
|
||||
end
|
||||
=#
|
||||
|
||||
@testset "dict field depending from problems" begin
|
||||
X = Dict{Int64, Vector{Float64}}(
|
||||
@@ -71,8 +66,8 @@ end
|
||||
8 => [0.0, 3.0])
|
||||
p1 = Problem(Elasticity, "Body 1", 2)
|
||||
p2 = Problem(Elasticity, "Body 2", 2)
|
||||
e1 = Element(Quad4, 1, [1, 2, 3, 4])
|
||||
e2 = Element(Quad4, 2, [5, 6, 7, 8])
|
||||
e1 = Element(Quad4, [1, 2, 3, 4])
|
||||
e2 = Element(Quad4, [5, 6, 7, 8])
|
||||
push!(p1, e1)
|
||||
push!(p2, e2)
|
||||
update!(p1, "geometry", 0.0 => X)
|
||||
@@ -83,3 +78,5 @@ end
|
||||
@test isapprox(p2("geometry", 0.0)[1], [1.0, 2.0])
|
||||
@test isapprox(e1("geometry", 0.0)[1], [1.0, 2.0])
|
||||
end
|
||||
|
||||
=#
|
||||
|
||||
Reference in New Issue
Block a user