]> https://gitweb.dealii.org/ - dealii.git/commit
Use a cheaper call. 4536/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Jun 2017 14:01:23 +0000 (08:01 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Jun 2017 14:01:23 +0000 (08:01 -0600)
commitb233570b855c91217e25bfbde63880ba72a6f31e
tree917ebad5b320966ef4a2418cc368c71a2ebf11a5
parent83e28cd0b73f2e8a8269efd077b39b08441894f7
Use a cheaper call.

The functions in question take an IndexSet argument that can either mean
something, or if it is empty, is ignored. In the places where an empty
IndexSet is passed, it actually has size zero, not just zero elements,
but in the existing code, we test whether 'indices.n_elements()==0'.
It turns out that 'n_elements()' is a pretty expensive function to call.
What we really wanted, of course, was 'indices.size()==0', and this
patch makes that change.

I ran all multigrid tests (the functions in question are multigrid
related), and they all succeed.
source/dofs/dof_handler_policy.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.