new tutorial about material models.

This commit is contained in:
Jukka Aho
2015-11-05 10:20:00 +02:00
parent 6a9002320d
commit 3469d48e69
3 changed files with 359 additions and 11 deletions
File diff suppressed because one or more lines are too long
+1
View File
@@ -1,6 +1,7 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
function get_default_integration_points(element::Quad4)
[
IntegrationPoint(1.0/sqrt(3.0)*[-1, -1], 1.0),
+16 -11
View File
@@ -1,28 +1,33 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
### INTEGRATIONPOINT ###
function ForwardDiff.derivative{T}(f::Function, S::Matrix{T}, args...)
shape = size(S)
wrapper(S::Vector) = f(reshape(S, shape))
deriv = ForwardDiff.gradient(wrapper, vec(S), args...)
return reshape(deriv, shape)
end
"""
Integration point
xi :: Array{Float64, 1}
xi
(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.
weight
integration weight
fields
FieldSet what can be used to store internal variables, stress, strain, ...
"""
type IntegrationPoint
xi :: Vector
weight :: Float64
fields :: Dict{ASCIIString, FieldSet}
fields :: FieldSet
end
function IntegrationPoint(xi, weight)
IntegrationPoint(xi, weight, Dict())
end
call(N::Basis, ip::IntegrationPoint) = N(ip.xi)
function Base.convert(::Type{Number}, ip::IntegrationPoint)
return ip.xi
end