]> https://gitweb.dealii.org/ - dealii.git/commit
Introduce a class that can't be used.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 13 Sep 2017 18:45:34 +0000 (12:45 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 13 Sep 2017 18:47:17 +0000 (12:47 -0600)
commit5cdeaf6968dcb680eb25e7ca6f8090a060b9d465
tree31b9a9aa971bbb38e73eb92a20621365eda4ab4b
parentbadbb893a6444117547e363ff75c2869bd180885
Introduce a class that can't be used.

Specifically, declare DoFInvalidAccessor that is the accessor
for cases where dim>spacedim -- i.e., things that can't logically
happen, but that at times do happen in code like

  for (quad=0; quad<GeometryInfo<dim>::quads_per_cell; ++quad)
    cell->quad(quad)->do_something();

Here, the code is not executed in 1d, but we want it to be syntactically
correct so that we can compile the function. Having a DoFInvalidAccessor
then serves the same purpose that InvalidAccessor already does for
tria accessor functions: such objects cannot be created but rather
throw an exception, but they provide the correct syntax.
include/deal.II/dofs/dof_accessor.h
include/deal.II/dofs/dof_iterator_selector.h
source/dofs/dof_accessor.cc
source/dofs/dof_accessor.inst.in

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.