From: Sebastian Pauletti Date: Tue, 20 Mar 2012 18:09:14 +0000 (+0000) Subject: Added missing function (detected by Martin Kronbichler) X-Git-Tag: v8.0.0~2751 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=186436cfe3e798ebe5bbd9ace635e643f0ed4c2d;p=dealii.git Added missing function (detected by Martin Kronbichler) git-svn-id: https://svn.dealii.org/trunk@25310 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/fe/mapping_q.h b/deal.II/include/deal.II/fe/mapping_q.h index b6898c65db..6e3bab2913 100644 --- a/deal.II/include/deal.II/fe/mapping_q.h +++ b/deal.II/include/deal.II/fe/mapping_q.h @@ -134,6 +134,13 @@ class MappingQ : public MappingQ1 const typename Mapping::InternalDataBase &internal, const MappingType type) const; + virtual + void + transform (const VectorSlice > > input, + VectorSlice > > output, + const typename Mapping::InternalDataBase &internal, + const MappingType type) const; + /** * Return the degree of the * mapping, i.e. the value which diff --git a/deal.II/source/fe/mapping_q.cc b/deal.II/source/fe/mapping_q.cc index 8336a05e3d..c36b40c1b8 100644 --- a/deal.II/source/fe/mapping_q.cc +++ b/deal.II/source/fe/mapping_q.cc @@ -1331,6 +1331,42 @@ MappingQ::transform ( } +template +void MappingQ::transform +(const VectorSlice > > input, + VectorSlice > > output, + const typename Mapping::InternalDataBase &mapping_data, + const MappingType mapping_type) const +{ + AssertDimension (input.size(), output.size()); + // The data object may be jsut a + // MappingQ1::InternalData, so we + // have to test for this first. + const typename MappingQ1::InternalData *q1_data = + dynamic_cast::InternalData *> (&mapping_data); + Assert(q1_data!=0, ExcInternalError()); + + // If it is a genuine + // MappingQ::InternalData, we have + // to test further + if (!q1_data->is_mapping_q1_data) + { + Assert (dynamic_cast(&mapping_data) != 0, + ExcInternalError()); + const InternalData &data = static_cast(mapping_data); + // If we only use the + // Q1-portion, we have to + // extract that data object + if (data.use_mapping_q1_on_current_cell) + q1_data = &data.mapping_q1_data; + } + // Now, q1_data should have the + // right tensors in it and we call + // the base classes transform + // function + MappingQ1::transform(input, output, *q1_data, mapping_type); +} + template Point