]> https://gitweb.dealii.org/ - dealii-svn.git/commit
Accelerate the central part of the reordering algorithm by a factor of
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Jul 2011 01:02:06 +0000 (01:02 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Jul 2011 01:02:06 +0000 (01:02 +0000)
commit94eaa5567b9f8a584f968a058ba44e9b28a2eb78
treea25e441c1c6c6b0a7252614ac2325453bd8fc650
parent2ca50797584a9deb0ba0e3f602dbcfa708efc7cc
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.