]> https://gitweb.dealii.org/ - dealii.git/commit
DoFTools: restructure set_periodicity_constraints
authorMatthias Maier <tamiko@43-1.org>
Fri, 18 Jan 2019 17:14:09 +0000 (11:14 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 18 Jan 2019 19:37:58 +0000 (13:37 -0600)
commitedac86b8ac625dc7c9c5655b6fb560ab5bdd8c1d
tree3d4a4fd69f73f6028b1b626484dded34c304b600
parent32fa9bf23447686253c1aed47b8efb7a1376a033
DoFTools: restructure set_periodicity_constraints

This commit restructures the function set_periodicity_constraints. Over
the last years (and after fixing about a dozen periodicity related bugs)
this function has gotten out of control. The aim for this restructuring
is to put back some order into the function. This is achieved by:

 - Merging loops and if clauses that were redundant.

 - Minor code cleanup.

 - Switching to a different idiom:

   if(... special case ...)
     {
       // do special case
       continue;
     }

   // next special case

   This saves about 5 (!) levels of indentation and makes the control
   flow significantly more obvious to (a) comment on and (b) understand
   again later.

This commit does not introduce a functional change.
source/dofs/dof_tools_constraints.cc

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.