Skip to content

Commit b4ce022

Browse files
committed
Add the simple reaction energy for heterogenous material
1 parent 3bd55f9 commit b4ce022

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/structure/physics/ablation/ablation.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ function update_new_bcs!(chunk::Peridynamics.AbstractBodyChunk, new_add_bcs_idx:
103103

104104
for id in intersect(new_add_bcs_idx, chunk.system.chunk_handler.loc_points)
105105
i_ch = chunk.system.chunk_handler.localizer[id]
106-
chunk.storage.hsource[1, i_ch] = chunk.paramsetup.energy
106+
paramsetup = chunk.paramsetup
107+
if paramsetup isa Peridynamics.AbstractPointParameters
108+
chunk.storage.hsource[1, i_ch] = chunk.paramsetup.energy
109+
else
110+
params_i = Peridynamics.get_params(paramsetup, i_ch)
111+
chunk.storage.hsource[1, i_ch] = params_i.energy
112+
end
107113
end
108114
end
109115

0 commit comments

Comments
 (0)