mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-26 11:51:31 +00:00
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:
committed by
Tero Frondelius
parent
ddabc9d82b
commit
c307c1482c
@@ -81,10 +81,6 @@ function isempty(assembly::Assembly)
|
||||
return T
|
||||
end
|
||||
|
||||
function get_dofs(assembly::Assembly)
|
||||
return sort(unique(assembly.K.J))
|
||||
end
|
||||
|
||||
type Problem{P<:AbstractProblem}
|
||||
name :: AbstractString # descriptive name for problem
|
||||
dimension :: Int # degrees of freedom per node
|
||||
@@ -359,10 +355,6 @@ function push!(problem::Problem, elements_::Vector...)
|
||||
end
|
||||
end
|
||||
|
||||
function get_connectivity(problem::Problem)
|
||||
return union([get_connectivity(element) for element in get_elements(problem)]...)
|
||||
end
|
||||
|
||||
function get_gdofs(element::Element, dim::Int)
|
||||
conn = get_connectivity(element)
|
||||
if length(conn) == 0
|
||||
@@ -372,10 +364,6 @@ function get_gdofs(element::Element, dim::Int)
|
||||
return gdofs
|
||||
end
|
||||
|
||||
function get_dofs(problem::Problem)
|
||||
return get_dofs(problem.assembly)
|
||||
end
|
||||
|
||||
function empty!(problem::Problem)
|
||||
empty!(problem.assembly)
|
||||
end
|
||||
@@ -396,33 +384,3 @@ function get_gdofs(problem::Problem, element::Element)
|
||||
end
|
||||
return problem.dofmap[element]
|
||||
end
|
||||
|
||||
""" Find dofs corresponding to nodes. """
|
||||
function find_dofs_by_nodes(problem::Problem, nodes)
|
||||
dim = get_unknown_field_dimension(problem)
|
||||
return find_dofs_by_nodes(dim, nodes)
|
||||
end
|
||||
function find_dofs_by_nodes(dim::Int, nodes)
|
||||
dofs = Int64[]
|
||||
for node in nodes
|
||||
for j=1:dim
|
||||
push!(dofs, dim*(node-1)+j)
|
||||
end
|
||||
end
|
||||
return dofs
|
||||
end
|
||||
|
||||
""" Find nodes corresponding to dofs. """
|
||||
function find_nodes_by_dofs(problem::Problem, dofs)
|
||||
dim = get_unknown_field_dimension(problem)
|
||||
return find_nodes_by_dofs(dim, dofs)
|
||||
end
|
||||
function find_nodes_by_dofs(dim, dofs)
|
||||
nodes = Int64[]
|
||||
for dof in dofs
|
||||
j = Int(ceil(dof/dim))
|
||||
j in nodes && continue
|
||||
push!(nodes, j)
|
||||
end
|
||||
return nodes
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user