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.

Reply via email to