julia v0.5 compatibility. test -> testing. new elements tri7 and wedge6. abaqus inp reading. more integration rules.

This commit is contained in:
Jukka Aho
2016-07-10 04:26:21 +03:00
parent a4e4347fec
commit a75aaecc97
89 changed files with 969 additions and 801 deletions
+13 -2
View File
@@ -129,7 +129,7 @@ function copy_field!(src_problem::Problem, dst_problem::Problem, field_name, tim
end
""" Return field calculated to nodal points for elements in problem p. """
function call(problem::Problem, field_name::String, time::Float64=0.0)
function call(problem::Problem, field_name::AbstractString, time::Float64=0.0)
f = Dict()
for element in get_elements(problem)
for (c, v) in zip(get_connectivity(element), element(field_name, time))
@@ -143,7 +143,7 @@ function call(problem::Problem, field_name::String, time::Float64=0.0)
end
""" Interpolate field from a set of elements. """
function call(problem::Problem, field_name::String, X::Vector, time::Float64=0.0; fillna=NaN)
function call(problem::Problem, field_name::AbstractString, X::Vector, time::Float64=0.0; fillna=NaN)
for element in get_elements(problem)
if inside(element, X, time)
xi = get_local_coordinates(element, X, time)
@@ -153,3 +153,14 @@ function call(problem::Problem, field_name::String, X::Vector, time::Float64=0.0
return fillna
end
""" Interpolate field from a set of elements. """
function call(problem::Problem, field_name::AbstractString, X::Vector, time::Float64, ::Type{Val{:Grad}}; fillna=NaN)
for element in get_elements(problem)
if inside(element, X, time)
xi = get_local_coordinates(element, X, time)
return element(field_name, xi, time, Val{:Grad})
end
end
return fillna
end