mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-25 03:24:28 +00:00
postprocessing utility
This commit is contained in:
+15
-1
@@ -4,7 +4,7 @@
|
||||
using JuliaFEM
|
||||
using JuliaFEM.Testing
|
||||
|
||||
@testset "test initialize field problem" begin
|
||||
@testset "test initialize scalar field problem" begin
|
||||
el = Element(Seg2, [1, 2])
|
||||
pr = Problem(Heat, 1)
|
||||
push!(pr, el)
|
||||
@@ -19,6 +19,20 @@ using JuliaFEM.Testing
|
||||
@test length(last(el, "temperature").data) == 2
|
||||
end
|
||||
|
||||
@testset "test initialize vector field problem" begin
|
||||
el = Element(Seg2, [1, 2])
|
||||
pr = Problem(Elasticity, 2)
|
||||
push!(pr, el)
|
||||
initialize!(pr)
|
||||
@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
|
||||
|
||||
@testset "test initialize boundary problem" begin
|
||||
el = Element(Seg2, [1, 2])
|
||||
pr = Problem(Dirichlet, "bc", 1, "temperature")
|
||||
|
||||
Reference in New Issue
Block a user