File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -262,16 +262,16 @@ void mpm::Particle<Tdim>::initialise_material(unsigned phase_size) {
262262 std::fill (state_variables_.begin (), state_variables_.end (), mpm::dense_map ());
263263}
264264
265- // ! Assign material state variables from neighbour particle
265+ // ! Assign material history variables
266266template <unsigned Tdim>
267267bool mpm::Particle<Tdim>::assign_material_state_vars(
268268 const mpm::dense_map& state_vars,
269269 const std::shared_ptr<mpm::Material<Tdim>>& material, unsigned phase) {
270270 bool status = false ;
271- if (material != nullptr && this ->material () != nullptr &&
272- this ->material_id () == material->id ()) {
271+ if (material != nullptr && this ->material (phase ) != nullptr &&
272+ this ->material_id (phase ) == material->id ()) {
273273 // Clone state variables
274- auto mat_state_vars = (this ->material ())->initialise_state_variables ();
274+ auto mat_state_vars = (this ->material (phase ))->initialise_state_variables ();
275275 if (state_variables_[phase].size () == state_vars.size () &&
276276 mat_state_vars.size () == state_vars.size ()) {
277277 this ->state_variables_ [phase] = state_vars;
You can’t perform that action at this time.
0 commit comments