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
This commit is contained in:
Jukka Aho
2017-01-30 12:28:33 +02:00
committed by Tero Frondelius
parent ddabc9d82b
commit c307c1482c
25 changed files with 2061 additions and 1766 deletions
+5 -28
View File
@@ -33,27 +33,6 @@ function aster_parse_nodes(section; strip_characters=true)
return nodes
end
function parse(mesh, ::Type{Val{:CODE_ASTER_MAIL}})
model = Dict()
header = nothing
data = []
for line in split(mesh, '\n')
length(line) != 0 || continue
info("line: $line")
if is_aster_mail_keyword(strip(line))
header = parse_aster_header(line)
empty!(data)
continue
end
if line == "FINSF"
info(data)
header = nothing
process_aster_section!(model, join(data, ""), header, Val{header[1]})
end
end
return model
end
""" Code Aster binary file (.med). """
type MEDFile
@@ -161,7 +140,7 @@ Returns
Dict containing fields "nodes" and "connectivity".
"""
function parse_aster_med_file(fn, mesh_name=nothing; debug=false)
function parse_aster_med_file(fn, mesh_name=nothing)
med = MEDFile(fn)
mesh_names = get_mesh_names(med::MEDFile)
all_meshes = join(mesh_names, ", ")
@@ -173,12 +152,10 @@ function parse_aster_med_file(fn, mesh_name=nothing; debug=false)
end
nsets = get_node_sets(med, mesh_name)
elsets = get_element_sets(med, mesh_name)
if debug
elset_names = join(values(elsets), ", ")
info("Code Aster .med reader: found $(length(elsets)) element sets: $elset_names")
nset_names = join(values(nsets), ", ")
info("Code ASter .med reader: found $(length(nsets)) node sets: $nset_names")
end
elset_names = join(values(elsets), ", ")
debug("Code Aster .med reader: found $(length(elsets)) element sets: $elset_names")
nset_names = join(values(nsets), ", ")
debug("Code ASter .med reader: found $(length(nsets)) node sets: $nset_names")
nodes = get_nodes(med, nsets, mesh_name)
conn = get_connectivity(med, elsets, mesh_name)
result = Dict("nodes" => nodes, "connectivity" => conn)