Dear Wolfgang, dear community, obviously this is a mistake. I checked the source files which we have used for results in corresponding paper. There I have found the following coding:
resid_old = resid; resid_vector = system_rhs_newton; resid_vector.compress(VectorOperation::insert); int is_my_set_changed = (active_set == active_set_old) ? 0 : 1; int num_changed = Utilities::MPI::sum(is_my_set_changed, MPI_COMM_WORLD); if (num_changed == 0 && resid < 1e-8) break; active_set_old = active_set; Unfortunately I have not been working with deal.ii for over two years now. For this reason I would be glad if someone else could fix this bug. Otherwise I would need a short manual how to do it by myself. With the best wishes for the future for deal.ii and their developers! Joerg ________________________________________ Von: Wolfgang Bangerth [bange...@colostate.edu] Gesendet: Dienstag, 16. Januar 2018 21:48 An: dealii@googlegroups.com; Frohne, Joerg Cc: Suttmeier, Franz-Theo Betreff: Re: [deal.II] step-42 clarification On 01/16/2018 12:59 AM, Alberto Salvadori wrote: > Dear community, > > I am studying with pleasure step-42 and I got a bit confused in the > method PlasticityContactProblem::solve_newton. At the very end of it, we > find these instructions: > > old_active_set = active_set; > previous_residual_norm = residual_norm; > if (Utilities::MPI::sum > <http://www.dealii.org/8.5.0/doxygen/deal.II/namespaceUtilities_1_1MPI.html#ab544a3bf3301a6dd3e705ee352c5551b>((active_set > == old_active_set) ? 0 : 1, > mpi_communicator) == 0) > { > pcout << " Active set did not change!" << std::endl; > if (residual_norm < 1e-10) > break; > } > > > Now, I am a bit confused by the if statement and I am clearly missing > something. The first instruction makes old_active_set equal to > active_set. Accordingly, wouldn't active_set == old_active_set always > be true? What am I missing? You're right -- the code would suggest that the if-condition is always true and that what matter is only the inner if. I'm not sure I have the current email address of Joerg Frohne who wrote step-42. He would be the one who could possibly provide a better answer. Best W. -- ------------------------------------------------------------------------ Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.