mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-12 06:22:00 +00:00
elasticity solver design restarted.
This commit is contained in:
File diff suppressed because one or more lines are too long
+9
-2
@@ -162,22 +162,29 @@ Base.call(el::Element, xi::Vector) = el.basis(xi)
|
||||
""" Get partial derivatives of basis functions of element. """
|
||||
get_dbasisdxi(el::Element) = el.basis.dbasisdxi
|
||||
get_dbasisdxi(el::Element, xi::Vector) = el.basis.dbasisdxi(xi)
|
||||
get_dbasisdxi(el::Element, ip::IntegrationPoint) = el.basis.dbasisdxi(ip.xi)
|
||||
|
||||
""" Interpolate field on element. """
|
||||
function interpolate(element::Element, field_name::Union{Symbol, ASCIIString}, xi::Vector, time::Number)
|
||||
function interpolate(element::Element, field_name, xi::Vector, time::Number)
|
||||
fieldset = element[field_name]
|
||||
field = interpolate(fieldset, time)
|
||||
basis = get_basis(element)
|
||||
interpolate(basis, field, xi)
|
||||
end
|
||||
function interpolate(element::Element, field_name, ip::IntegrationPoint, time::Number)
|
||||
interpolate(element, field_name, ip.xi, time)
|
||||
end
|
||||
|
||||
""" Interpolate derivative of field on element. """
|
||||
function dinterpolate(element::Element, field_name::Union{Symbol, ASCIIString}, xi::Vector, time::Number)
|
||||
function dinterpolate(element::Element, field_name, xi::Vector, time::Number)
|
||||
fieldset = element[field_name]
|
||||
field = interpolate(fieldset, time)
|
||||
basis = get_basis(element)
|
||||
dinterpolate(basis, field, xi)
|
||||
end
|
||||
function dinterpolate(element::Element, field_name, ip::IntegrationPoint, time::Number)
|
||||
dinterpolate(element, field_name, ip.xi, time)
|
||||
end
|
||||
|
||||
"""
|
||||
Get jacobian of element evaluated at point ξ on element in reference configuration.
|
||||
|
||||
@@ -8,23 +8,6 @@ function get_unknown_field_name(equation::Equation)
|
||||
error("define get_unknown_field_name for this equation type $eqtype")
|
||||
end
|
||||
|
||||
"""
|
||||
Integration point
|
||||
|
||||
xi :: Array{Float64, 1}
|
||||
(dimensionless) coordinates of integration point
|
||||
weight :: Float64
|
||||
Integration weight
|
||||
attributes :: Dict{Any, Any}
|
||||
This is used to save internal variables of IP needed e.g. for incremental
|
||||
material models.
|
||||
"""
|
||||
type IntegrationPoint
|
||||
xi :: Array{Float64, 1}
|
||||
weight :: Float64
|
||||
attributes :: Dict{Any, Any}
|
||||
end
|
||||
IntegrationPoint(xi, weight) = IntegrationPoint(xi, weight, Dict{ASCIIString, Any}())
|
||||
|
||||
has_lhs(eq::Equation) = false
|
||||
get_lhs(eq::Equation, xi) = nothing
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ Interpolate a field from fieldset for some time t.
|
||||
"""
|
||||
function interpolate(fields::FieldSet, t::Number)
|
||||
if length(fields) == 0
|
||||
throw("Empty set of fields.")
|
||||
throw("Empty set of fields: $fields")
|
||||
end
|
||||
if t <= fields[1].time
|
||||
return Field(t, fields[1].values)
|
||||
|
||||
@@ -96,6 +96,30 @@ diff(h::Basis) = h.dbasisdxi
|
||||
derivative(h::Basis) = h.dbasisdxi
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Integration point
|
||||
|
||||
xi :: Array{Float64, 1}
|
||||
(dimensionless) coordinates of integration point
|
||||
weight :: Float64
|
||||
Integration weight
|
||||
attributes :: Dict{Any, Any}
|
||||
This is used to save internal variables of IP needed e.g. for incremental
|
||||
material models.
|
||||
"""
|
||||
type IntegrationPoint
|
||||
xi :: Array{Float64, 1}
|
||||
weight :: Float64
|
||||
fields :: Dict{Symbol, FieldSet}
|
||||
end
|
||||
function IntegrationPoint(xi, weight)
|
||||
IntegrationPoint(xi, weight, Dict())
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
# convenient functions -- maybe this is not correct place for them
|
||||
""" Evaluate basis function in point ξ. """
|
||||
call(b::Basis, xi) = b.basis(xi)
|
||||
|
||||
Reference in New Issue
Block a user