Skip to content

Commit

Permalink
Changes to interfaces
Browse files Browse the repository at this point in the history
* use postprocess_analysis to update material internal paremeters
  • Loading branch information
ahojukka5 committed Sep 16, 2018
1 parent 4d337b7 commit ca78461
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/idealplastic.jl
Expand Up @@ -90,15 +90,20 @@ function postprocess_increment!(material::Material{M}, element, ip, time) where
return nothing
end

function postprocess_analysis!(material::Material{IdealPlastic}, element, ip, time)
# TODO: why?
preprocess_increment!(material, element, ip, time)
integrate_material!(material) # one more time!
function postprocess_analysis!(material::Material{IdealPlastic})
props = material.properties
material.stress .+= material.dstress
material.strain .+= material.dstrain
props.plastic_strain .+= props.dplastic_strain
props.plastic_multiplier += props.dplastic_multiplier
return nothing
end

function postprocess_analysis!(material::Material{IdealPlastic}, element, ip, time)
# TODO: why?
preprocess_increment!(material, element, ip, time)
integrate_material!(material) # one more time!
postprocess_analysis!(material)
update!(ip, "stress", time => copy(material.stress))
update!(ip, "strain", time => copy(material.strain))
return nothing
Expand Down

0 comments on commit ca78461

Please sign in to comment.