mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-12 06:22:00 +00:00
9a3d7038ef
Interpolation tests should respect manifest exports and initialization order from the main module. - Remove duplicated topology/basis includes; import `JuliaFEM` instead.
22 lines
560 B
Julia
22 lines
560 B
Julia
# Test interpolation with basis functions
|
|
using Test
|
|
using StaticArrays, Tensors
|
|
|
|
using JuliaFEM
|
|
|
|
@testset "Interpolation" begin
|
|
@testset "Seg2 linear" begin
|
|
values = SVector(1.0, 2.0)
|
|
N = get_basis_functions(Seg2(), Lagrange{1}(), Vec{1}((0.0,)))
|
|
result = dot(values, N)
|
|
@test result ≈ 1.5
|
|
end
|
|
|
|
@testset "Tri3 at node" begin
|
|
values = SVector(1.0, 2.0, 3.0)
|
|
N = get_basis_functions(Tri3(), Lagrange{1}(), Vec{2}((1.0, 0.0)))
|
|
result = dot(values, N)
|
|
@test result ≈ 2.0
|
|
end
|
|
end
|