mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-19 01:48:47 +00:00
9dc794101c
Sometimes user may have the wrong kind of elements in element set when
assembling 3d continuum problem. This could happen for example in
situations, where mesher is giving also segment elements. They may have
some use in certain situations, but currently we don't support them.
When assembly is failing for this reasons, we give a meaningful error
message:
[ Info: It looks that you are trying to assemble elements of type Seg3
to 3d continuum problem. However, they are not supported yet. To filter
out elements from a element set, try `filter(element->!isa(element,
Element{Seg3}), elements)`
ERROR: LoadError: Tried to assemble unsupported elements of type Seg3 to
3d continuum problem.
This commit closes issue #211.
13 lines
433 B
Julia
13 lines
433 B
Julia
# This file is a part of JuliaFEM.
|
|
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
|
|
|
using JuliaFEM, Test
|
|
|
|
# Test that if 3d continuum problem have some elements we don't know how to
|
|
# deal with, raise error with clear message
|
|
|
|
elements = [Element(Seg3, (1, 2, 3))]
|
|
problem = Problem(Elasticity, "test seg3", 3)
|
|
add_elements!(problem, elements)
|
|
@test_throws ErrorException assemble!(problem, 0.0)
|