]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Added missing function (detected by Martin Kronbichler)
authorpauletti <pauletti@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 20 Mar 2012 18:09:14 +0000 (18:09 +0000)
committerpauletti <pauletti@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 20 Mar 2012 18:09:14 +0000 (18:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@25310 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/fe/mapping_q.h
deal.II/source/fe/mapping_q.cc

index b6898c65db6af117fe3fd1a6d5e057d59a9bc944..6e3bab2913ada3e7020c8870eb803a5eec48c094 100644 (file)
@@ -134,6 +134,13 @@ class MappingQ : public MappingQ1<dim,spacedim>
                const typename Mapping<dim,spacedim>::InternalDataBase &internal,
               const MappingType type) const;
 
+    virtual
+    void
+    transform (const VectorSlice<const std::vector<Tensor<2, dim> > >     input,
+               VectorSlice<std::vector<Tensor<2,spacedim> > >             output,
+               const typename Mapping<dim,spacedim>::InternalDataBase &internal,
+               const MappingType type) const;
+
                                     /**
                                      * Return the degree of the
                                      * mapping, i.e. the value which
index 8336a05e3df5f06c1b30a96984f53ac95e534db8..c36b40c1b809e3e761dc9049fea2871066d6baf6 100644 (file)
@@ -1331,6 +1331,42 @@ MappingQ<dim,spacedim>::transform (
 }
 
 
+template<int dim, int spacedim>
+void MappingQ<dim,spacedim>::transform
+(const VectorSlice<const std::vector<Tensor<2, dim> > >     input,
+ VectorSlice<std::vector<Tensor<2,spacedim> > >             output,
+ const typename Mapping<dim,spacedim>::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<dim,spacedim>::InternalData *q1_data =
+    dynamic_cast<const typename MappingQ1<dim,spacedim>::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<const InternalData *>(&mapping_data) != 0,
+             ExcInternalError());
+      const InternalData &data = static_cast<const InternalData&>(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<dim,spacedim>::transform(input, output, *q1_data, mapping_type);
+}
+
 
 template<int dim, int spacedim>
 Point<spacedim>

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.