]> https://gitweb.dealii.org/ - dealii.git/commit
Accelerate the central part of the reordering algorithm by a factor of
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 Jul 2011 01:02:06 +0000 (01:02 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 8 Jul 2011 01:02:06 +0000 (01:02 +0000)
commit17ea4bfee2e47c62d17cea5372e2ec7b41671d30
treee4464ad660333deaaff72b5fd518ea1319379108
parentb4f689bedb9d612f88e32a96be659b47284eb855
Accelerate the central part of the reordering algorithm by a factor of
four. This line
      std::transform(inquads.begin(),inquads.end(), std::back_inserter(mquads),
     std::bind2nd(MQuad::MakeQuad(),sides) );
takes up almost the entire time since the call to MakeQuad is linear in the
number of edges and is called a linear number of times -- making the whole
thing quadratic. This may not have been such a big deal when we used the
regular libstdc++ library, but since we now test with the debug version, it
takes positively forever. The patch changes the way we work in MakeQuad:
instead of calling lower_bound four times, we now do the equivalent work only
once and check for all four indices at the same time.

git-svn-id: https://svn.dealii.org/trunk@23934 0785d39b-7218-0410-832d-ea1e28bc413d
deal.II/source/grid/grid_reordering.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.