Skip to content

Commit

Permalink
Fixed correspondence
Browse files Browse the repository at this point in the history
  • Loading branch information
JTHesse committed Feb 8, 2024
1 parent 6474e85 commit 2ffcf48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/Physics/Material/Material_Factory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ function compute_forces(datamanager::Module, nodes::Union{SubArray,Vector{Int64}
mod = datamanager.get_model_module(material_model)
datamanager = mod.compute_forces(datamanager, nodes, model_param, time, dt, to)
end
@timeit to "distribute_force_densities" datamanager = Material.distribute_force_densities(datamanager, nodes)
if haskey(model_param, "von Mises stresses") && model["von Mises stresses"]
datamanager = Material.calculate_von_mises_stress(datamanager, nodes)
end
return datamanager
end

Expand Down
8 changes: 7 additions & 1 deletion src/Physics/Physics_Factory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ function compute_models(datamanager::Module, block_nodes::Dict{Int64,Vector{Int6

if options["Material Models"]
if datamanager.check_property(block, "Material Model")
@timeit to "bond_forces" datamanager = Material.compute_forces(datamanager, update_nodes, datamanager.get_properties(block, "Material Model"), time, dt, to)
model_param = datamanager.get_properties(block, "Material Model")
@timeit to "bond_forces" datamanager = Material.compute_forces(datamanager, update_nodes, model_param, time, dt, to)
#TODO: I think this needs to stay here as we need the active_nodes not the update_nodes
@timeit to "distribute_force_densities" datamanager = Material.distribute_force_densities(datamanager, active_nodes)
if haskey(model_param, "von Mises stresses") && model_param["von Mises stresses"]
datamanager = Material.calculate_von_mises_stress(datamanager, active_nodes)
end
end
end
end
Expand Down

0 comments on commit 2ffcf48

Please sign in to comment.