Files
JuliaFEM.jl/test/test_elements_nurbs.jl
T
Jukka Aho 0ca7efd631 Testing/code coverage (#83)
Change the code coverage to green. 

* removed duplicate code

* Removed unused code

* removed unmaintained code

* DCTI + DVTI refactored

* discrete fields refactored and tested

* fields are now tested quite well.

* Removed obsolete code not used anywhere

* Element descriptions to common dictionary

* size in global const dictionary also

* Added coverage to sparse tools and removed couple unused functions

* get nonzero rows from SparseMatrixCSC

* bugfix: extending element basis now working and tested

* Removed two unused functions from elements.jl

* removed useless function

* Useless conversion

* remove elasticity assembly using ForwardDiff because it's not used anywhere'

* Added basic testing for NURBS. Fixed bug in NSolid interpolation.

* removed unused functions

* Removed some debug stuff

* renamed file

* removed field assembly posthook, i think not good idea at all

* test for nnz(K) == 0 and automatic determination of dofs

* Testing that solver is throwing error if having problems with boundary assembly

* Removed some unused options. Refactoring.

* Moved solver non-related code to elements.jl

* Removed custom exception (no need)

* unneeded postprocess code

* More tests for NURBS elements.

* Removed unfinished .mail parser

* proper use of Logging package

* also read results

* renamed test file

* create_surface_elements accepts surface name in String now

* bugfix: remove zero rows from constraint matrix after manually removing dofs from some boundary assemblies.

* New test, displacement 3d patch test

* skip displacement field in surface element splitting if not defined

* test element splitting and linear surface elements, fails.

* Bugfix: Xdmf, not XDMF

* removed nonworking tests, requires bugfix

* abaqus_read_results is not working -> bug
2017-01-30 12:28:33 +02:00

29 lines
863 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
using JuliaFEM.Testing
@testset "NSeg interpolate" begin
element = Element(NSeg, [1, 2])
@test element([0.0], 0.0) == [0.5 0.5]
@test size(element) == (1, 2)
@test is_nurbs(element)
element2 = Element(Seg2, [1, 2])
@test !is_nurbs(element2)
end
@testset "NSurf interpolate" begin
element = Element(NSurf, [1, 2, 3, 4])
@test element([0.0, 0.0], 0.0) == [0.25 0.25 0.25 0.25]
@test size(element) == (2, 4)
@test is_nurbs(element)
end
@testset "NSolid interpolate" begin
element = Element(NSolid, [1, 2, 3, 4, 5, 6, 7, 8])
@test element([0.0, 0.0, 0.0], 0.0) == [0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125]
@test size(element) == (3, 8)
@test is_nurbs(element)
end