]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use default constructed linear mapping. 11538/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 14 Jan 2021 00:01:42 +0000 (17:01 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 14 Jan 2021 16:30:15 +0000 (09:30 -0700)
include/deal.II/base/parsed_convergence_table.h
include/deal.II/fe/fe_tools.templates.h
include/deal.II/numerics/error_estimator.templates.h
include/deal.II/numerics/matrix_creator.templates.h
include/deal.II/numerics/vector_tools_boundary.templates.h
include/deal.II/numerics/vector_tools_interpolate.templates.h
include/deal.II/numerics/vector_tools_mean_value.templates.h
include/deal.II/numerics/vector_tools_point_gradient.templates.h
include/deal.II/numerics/vector_tools_point_value.templates.h
include/deal.II/numerics/vector_tools_project.templates.h
include/deal.II/numerics/vector_tools_rhs.templates.h

index 5681e237c966005d4460512ca335c16d007028a8..08b884bb88f21c671bfd6c0af132f1a50350ecba 100644 (file)
@@ -527,8 +527,12 @@ ParsedConvergenceTable::error_from_exact(const DoFHandler<dim, spacedim> &dh,
                                          const Function<spacedim> &exact,
                                          const Function<spacedim> *weight)
 {
-  error_from_exact(
-    StaticMappingQ1<dim, spacedim>::mapping, dh, solution, exact, weight);
+  error_from_exact(ReferenceCell::get_default_linear_mapping(
+                     dh.get_triangulation()),
+                   dh,
+                   solution,
+                   exact,
+                   weight);
 }
 
 
index fe4cdfc29222ee725200278aedb9b282bfae98d8..23f8c234f0ae1860c27242a80e6ba65859a77099 100644 (file)
@@ -2292,7 +2292,8 @@ namespace FETools
                 q_points_coarse[q](j) = q_points_fine[q](j);
             Quadrature<dim> q_coarse(q_points_coarse, fine.get_JxW_values());
             FEValues<dim, spacedim> coarse(
-              StaticMappingQ1<dim, spacedim>::mapping,
+              ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+                coarse_cell->reference_cell_type()),
               fe,
               q_coarse,
               update_values);
index 5b72586f20fcfe5bce950cd911611643e73e4015..9bf3177bbae30aefbbd2b60569707223c5a12255 100644 (file)
@@ -1055,7 +1055,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const types::material_id  material_id,
   const Strategy            strategy)
 {
-  estimate(StaticMappingQ1<dim, spacedim>::mapping,
+  estimate(ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+             dof_handler.get_triangulation()),
            dof_handler,
            quadrature,
            neumann_bc,
@@ -1125,7 +1126,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const types::material_id  material_id,
   const Strategy            strategy)
 {
-  estimate(StaticMappingQ1<dim, spacedim>::mapping,
+  estimate(ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+             dof_handler.get_triangulation()),
            dof_handler,
            quadrature,
            neumann_bc,
@@ -1370,7 +1372,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const types::material_id                material_id,
   const Strategy                          strategy)
 {
-  estimate(StaticMappingQ1<dim, spacedim>::mapping,
+  estimate(ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+             dof_handler.get_triangulation()),
            dof_handler,
            quadrature,
            neumann_bc,
@@ -1404,7 +1407,8 @@ KellyErrorEstimator<dim, spacedim>::estimate(
   const types::material_id                material_id,
   const Strategy                          strategy)
 {
-  estimate(StaticMappingQ1<dim, spacedim>::mapping,
+  estimate(ReferenceCell::get_default_linear_mapping<dim, spacedim>(
+             dof_handler.get_triangulation()),
            dof_handler,
            quadrature,
            neumann_bc,
index 57f067889ed39c639623d674a29eae6e022ced37..335d034179d682728b0200858031d5193e7026e0 100644 (file)
@@ -689,7 +689,8 @@ namespace MatrixCreator
                      const Function<spacedim, number> *const coefficient,
                      const AffineConstraints<number> &       constraints)
   {
-    create_mass_matrix(StaticMappingQ1<dim, spacedim>::mapping,
+    create_mass_matrix(ReferenceCell::get_default_linear_mapping(
+                         dof.get_triangulation()),
                        dof,
                        q,
                        matrix,
@@ -766,7 +767,8 @@ namespace MatrixCreator
                      const Function<spacedim, number> *const coefficient,
                      const AffineConstraints<number> &       constraints)
   {
-    create_mass_matrix(StaticMappingQ1<dim, spacedim>::mapping,
+    create_mass_matrix(ReferenceCell::get_default_linear_mapping(
+                         dof.get_triangulation()),
                        dof,
                        q,
                        matrix,
@@ -1728,7 +1730,8 @@ namespace MatrixCreator
     const Function<spacedim, number> *const a,
     std::vector<unsigned int>               component_mapping)
   {
-    create_boundary_mass_matrix(StaticMappingQ1<dim, spacedim>::mapping,
+    create_boundary_mass_matrix(ReferenceCell::get_default_linear_mapping(
+                                  dof.get_triangulation()),
                                 dof,
                                 q,
                                 matrix,
@@ -1917,7 +1920,8 @@ namespace MatrixCreator
                         const Function<spacedim> *const  coefficient,
                         const AffineConstraints<double> &constraints)
   {
-    create_laplace_matrix(StaticMappingQ1<dim, spacedim>::mapping,
+    create_laplace_matrix(ReferenceCell::get_default_linear_mapping(
+                            dof.get_triangulation()),
                           dof,
                           q,
                           matrix,
@@ -1993,7 +1997,8 @@ namespace MatrixCreator
                         const Function<spacedim> *const  coefficient,
                         const AffineConstraints<double> &constraints)
   {
-    create_laplace_matrix(StaticMappingQ1<dim, spacedim>::mapping,
+    create_laplace_matrix(ReferenceCell::get_default_linear_mapping(
+                            dof.get_triangulation()),
                           dof,
                           q,
                           matrix,
index 18e5379abc268708551a0b6dfc4f812a95c241de..3ba3933fa647809dad7c482abc58ac4df143ecf2 100644 (file)
@@ -466,7 +466,8 @@ namespace VectorTools
     std::map<types::global_dof_index, number> &boundary_values,
     const ComponentMask &                      component_mask)
   {
-    interpolate_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
+    interpolate_boundary_values(ReferenceCell::get_default_linear_mapping(
+                                  dof.get_triangulation()),
                                 dof,
                                 boundary_component,
                                 boundary_function,
@@ -485,7 +486,8 @@ namespace VectorTools
     std::map<types::global_dof_index, number> &boundary_values,
     const ComponentMask &                      component_mask)
   {
-    interpolate_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
+    interpolate_boundary_values(ReferenceCell::get_default_linear_mapping(
+                                  dof.get_triangulation()),
                                 dof,
                                 function_map,
                                 boundary_values,
@@ -598,7 +600,8 @@ namespace VectorTools
     AffineConstraints<number> &       constraints,
     const ComponentMask &             component_mask)
   {
-    interpolate_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
+    interpolate_boundary_values(ReferenceCell::get_default_linear_mapping(
+                                  dof.get_triangulation()),
                                 dof,
                                 boundary_component,
                                 boundary_function,
@@ -617,7 +620,8 @@ namespace VectorTools
     AffineConstraints<number> &constraints,
     const ComponentMask &      component_mask)
   {
-    interpolate_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
+    interpolate_boundary_values(ReferenceCell::get_default_linear_mapping(
+                                  dof.get_triangulation()),
                                 dof,
                                 function_map,
                                 constraints,
@@ -883,7 +887,8 @@ namespace VectorTools
     std::map<types::global_dof_index, number> &boundary_values,
     std::vector<unsigned int>                  component_mapping)
   {
-    project_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
+    project_boundary_values(ReferenceCell::get_default_linear_mapping(
+                              dof.get_triangulation()),
                             dof,
                             boundary_functions,
                             q,
@@ -973,7 +978,8 @@ namespace VectorTools
     AffineConstraints<number> &constraints,
     std::vector<unsigned int>  component_mapping)
   {
-    project_boundary_values(StaticMappingQ1<dim, spacedim>::mapping,
+    project_boundary_values(ReferenceCell::get_default_linear_mapping(
+                              dof.get_triangulation()),
                             dof,
                             boundary_functions,
                             q,
index 235d6ee7851da94989454ad5d88616d72f79d12d..7edd39de41debd57230c5b0bcec586a6769df76e 100644 (file)
@@ -531,7 +531,8 @@ namespace VectorTools
     VectorType &                                               vec,
     const ComponentMask &                                      component_mask)
   {
-    interpolate(StaticMappingQ1<dim, spacedim>::mapping,
+    interpolate(ReferenceCell::get_default_linear_mapping(
+                  dof.get_triangulation()),
                 dof,
                 function,
                 vec,
index 64f7dbe8fb8fadc91bd94c1a15e493df3ed404d8..040013dac4272adc4fc418a8589aea43dbb07de3 100644 (file)
@@ -197,8 +197,12 @@ namespace VectorTools
                      const VectorType &               v,
                      const unsigned int               component)
   {
-    return compute_mean_value(
-      StaticMappingQ1<dim, spacedim>::mapping, dof, quadrature, v, component);
+    return compute_mean_value(ReferenceCell::get_default_linear_mapping(
+                                dof.get_triangulation()),
+                              dof,
+                              quadrature,
+                              v,
+                              component);
   }
 } // namespace VectorTools
 
index f9e373ed1b5293469987d48fac8636a8a4e87bbb..961e967ac6749f566036af662b14e8ba4979e3f5 100644 (file)
@@ -49,7 +49,8 @@ namespace VectorTools
       &gradients)
   {
     if (dof.has_hp_capabilities() == false)
-      point_gradient(StaticMappingQ1<dim, spacedim>::mapping,
+      point_gradient(ReferenceCell::get_default_linear_mapping(
+                       dof.get_triangulation()),
                      dof,
                      fe_function,
                      point,
@@ -70,7 +71,8 @@ namespace VectorTools
                  const Point<spacedim> &          point)
   {
     if (dof.has_hp_capabilities() == false)
-      return point_gradient(StaticMappingQ1<dim, spacedim>::mapping,
+      return point_gradient(ReferenceCell::get_default_linear_mapping(
+                              dof.get_triangulation()),
                             dof,
                             fe_function,
                             point);
index f771017d8f069d46d73329c0a3e650ed9240d0a1..038f0fbbdfac1c63e65f61184c63f6c334e8b77b 100644 (file)
@@ -48,7 +48,8 @@ namespace VectorTools
               Vector<typename VectorType::value_type> &value)
   {
     if (dof.has_hp_capabilities() == false)
-      point_value(StaticMappingQ1<dim, spacedim>::mapping,
+      point_value(ReferenceCell::get_default_linear_mapping(
+                    dof.get_triangulation()),
                   dof,
                   fe_function,
                   point,
@@ -69,7 +70,8 @@ namespace VectorTools
               const Point<spacedim> &          point)
   {
     if (dof.has_hp_capabilities() == false)
-      return point_value(StaticMappingQ1<dim, spacedim>::mapping,
+      return point_value(ReferenceCell::get_default_linear_mapping(
+                           dof.get_triangulation()),
                          dof,
                          fe_function,
                          point);
@@ -323,7 +325,8 @@ namespace VectorTools
         p,
         rhs_vector);
     else
-      create_point_source_vector(StaticMappingQ1<dim, spacedim>::mapping,
+      create_point_source_vector(ReferenceCell::get_default_linear_mapping(
+                                   dof_handler.get_triangulation()),
                                  dof_handler,
                                  p,
                                  rhs_vector);
@@ -429,7 +432,8 @@ namespace VectorTools
         orientation,
         rhs_vector);
     else
-      create_point_source_vector(StaticMappingQ1<dim, spacedim>::mapping,
+      create_point_source_vector(ReferenceCell::get_default_linear_mapping(
+                                   dof_handler.get_triangulation()),
                                  dof_handler,
                                  p,
                                  orientation,
index a1d2a568c42d055c405d24e98ad496f9f87ae3b5..3fdf7a4d6fc5df04d30924c075c79f70685212dc 100644 (file)
@@ -887,7 +887,7 @@ namespace VectorTools
            ExcMessage("Please specify the mapping explicitly "
                       "when building with MSVC!"));
 #else
-    project(StaticMappingQ1<dim, spacedim>::mapping,
+    project(ReferenceCell::get_default_linear_mapping(dof.get_triangulation()),
             dof,
             constraints,
             quadrature,
index 96fe8feb5d7ae76ec7176d641c1491fb126d46cc..d288a91097818eac335ef8836e658abdd24985b4 100644 (file)
@@ -470,7 +470,8 @@ namespace VectorTools
     VectorType &                                               rhs_vector,
     const AffineConstraints<typename VectorType::value_type> & constraints)
   {
-    create_right_hand_side(StaticMappingQ1<dim, spacedim>::mapping,
+    create_right_hand_side(ReferenceCell::get_default_linear_mapping(
+                             dof_handler.get_triangulation()),
                            dof_handler,
                            quadrature,
                            rhs_function,

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.