Skip to content

Commit

Permalink
Bug isotropic_elasticity_tensor over written (#56)
Browse files Browse the repository at this point in the history
* Fix #55, isotropic_elasticity_tensor over written.
  • Loading branch information
TeroFrondelius authored Oct 21, 2019
1 parent e630b39 commit a3a546b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
9 changes: 7 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Materials"
uuid = "35fa313e-aa48-52ea-bc82-ddb91c7db87b"
version = "0.2.0"
version = "0.2.1"

[deps]
Einsum = "b7d42ee7-0b51-5a75-98ca-779d3107e4c0"
Expand All @@ -11,7 +11,12 @@ Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
Tensors = "48a634ad-e948-5137-8d70-aa71f2a747f4"

[compat]
julia = "≥ 1.0.0"
julia = "1.0.0"
Einsum = "0.4.1"
ForwardDiff = "0.10.3"
NLsolve = "4.1.0"
Parameters = "0.12.0"
Tensors = "1.2.0"

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
7 changes: 7 additions & 0 deletions src/Materials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ end

export integrate_material!, update_material!, reset_material!

function isotropic_elasticity_tensor(lambda, mu)
delta(i,j) = i==j ? 1.0 : 0.0
g(i,j,k,l) = lambda*delta(i,j)*delta(k,l) + mu*(delta(i,k)*delta(j,l)+delta(i,l)*delta(j,k))
jacobian = SymmetricTensor{4, 3, Float64}(g)
return jacobian
end

include("idealplastic.jl")
export IdealPlastic, IdealPlasticDriverState, IdealPlasticParameterState, IdealPlasticVariableState

Expand Down
7 changes: 0 additions & 7 deletions src/chaboche.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/Materials.jl/blob/master/LICENSE

function isotropic_elasticity_tensor(lambda, mu)
delta(i,j) = i==j ? 1.0 : 0.0
g(i,j,k,l) = lambda*delta(i,j)*delta(k,l) + mu*(delta(i,k)*delta(j,l)+delta(i,l)*delta(j,k))
jacobian = SymmetricTensor{4, 3, Float64}(g)
return jacobian
end

@with_kw mutable struct ChabocheDriverState <: AbstractMaterialState
time :: Float64 = zero(Float64)
strain :: SymmetricTensor{2,3} = zero(SymmetricTensor{2,3,Float64})
Expand Down
7 changes: 0 additions & 7 deletions src/idealplastic.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/Materials.jl/blob/master/LICENSE

function isotropic_elasticity_tensor(lambda, mu)
delta(i,j) = i==j ? 1.0 : 0.0
g(i,j,k,l) = lambda*delta(i,j)*delta(k,l) + mu*(delta(i,k)*delta(j,l)+delta(i,l)*delta(j,k))
jacobian = SymmetricTensor{4, 3, Float64}(g)
return jacobian
end

@with_kw mutable struct IdealPlasticDriverState <: AbstractMaterialState
time :: Float64 = zero(Float64)
strain :: SymmetricTensor{2,3} = zero(SymmetricTensor{2,3,Float64})
Expand Down

0 comments on commit a3a546b

Please sign in to comment.