diff --git a/src/Realm.C b/src/Realm.C index c09fc62c7..ad2091758 100644 --- a/src/Realm.C +++ b/src/Realm.C @@ -2561,6 +2561,10 @@ Realm::set_current_coordinates(stk::mesh::Part* targetPart) VectorFieldType* displacement = meta_data().get_field( stk::topology::NODE_RANK, "mesh_displacement"); + modelCoords->sync_to_host(); + currentCoords->sync_to_host(); + displacement->sync_to_host(); + stk::mesh::Selector s_all_nodes = stk::mesh::Selector(*targetPart); stk::mesh::BucketVector const& node_buckets = @@ -2578,6 +2582,7 @@ Realm::set_current_coordinates(stk::mesh::Part* targetPart) cCoords[offSet + j] = mCoords[offSet + j] + dx[offSet + j]; } } + currentCoords->modify_on_host(); } //-------------------------------------------------------------------------- @@ -2643,6 +2648,8 @@ Realm::init_current_coordinates() stk::topology::NODE_RANK, "mesh_displacement"); modelCoords->sync_to_host(); + currentCoords->sync_to_host(); + displacement->sync_to_host(); stk::mesh::Selector s_all_nodes = (meta_data().locally_owned_part() | meta_data().globally_shared_part()) &