]> https://gitweb.dealii.org/ - dealii.git/commit
Break dependency of MappingQ from MappingQGeneric.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 28 Oct 2015 21:33:36 +0000 (16:33 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 28 Oct 2015 21:33:36 +0000 (16:33 -0500)
commitb1cb46bff51a9cf670b236045f8e98719841d6fd
treea20566047347a7731d2a1e67836b4c48388e1c18
parent6e737c79179d611a15cb62fbcadeb420e767a399
Break dependency of MappingQ from MappingQGeneric.

As discussed in #1732, MappingQ doesn't have the is-a property with
regard to MappingQGeneric. Nor does it have it with regard to its previous
base class, MappingQ1, and this was already fixed previously (#1429). Rather, what
it should be is a has-a relationship with regard to both the MappingQGeneric
(used on cells on the boundary) and MappingQ1 (used for interior cells).

This patch implements this. The part of the patch for MappingQ itself is
relatively straightforward: have it store pointers to both Q1 and Qp
mappings, and where it currently dispatches to the base class
MappingQGeneric, just dispatch to the Qp object instead. We can
then break the inheritance from  MappingQ
to MappingQGeneric, at the cost of reimplementing a couple of
trivial functions of the Mapping interface that were previously
provided by the MappingQGeneric class.

The bigger problems appear in the MappingQEulerian and
MappingC1 classes which previously overloaded functions
declared in MappingQGeneric and that are now no longer
available to the MappingQGeneric object we now keep a
pointer to, rather than have as base class. This is
worked around by having both MappingQEulerian and
MappingC1 declare their own internal classes derived
from MappingQGeneric that provide the now missing
functions.
include/deal.II/fe/mapping_c1.h
include/deal.II/fe/mapping_q.h
include/deal.II/fe/mapping_q_eulerian.h
source/fe/mapping_c1.cc
source/fe/mapping_q.cc
source/fe/mapping_q_eulerian.cc
source/fe/mapping_q_generic.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.