]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reverse order of mapping and triangulation in compute_aspect_ratio 10124/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sun, 10 May 2020 16:49:06 +0000 (18:49 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Sun, 10 May 2020 16:49:06 +0000 (18:49 +0200)
include/deal.II/grid/grid_tools.h
source/grid/grid_tools.cc
source/grid/grid_tools.inst.in
tests/grid/grid_generator_open_torus.cc
tests/grid/grid_tools_aspect_ratio.cc

index 9a8016766c4e0853c9e256e9a9d55db5ab100d33..fc9015fd5872d3e10bfffdebe6349303db9028fa 100644 (file)
@@ -260,8 +260,8 @@ namespace GridTools
    */
   template <int dim>
   Vector<double>
-  compute_aspect_ratio_of_cells(const Triangulation<dim> &triangulation,
-                                const Mapping<dim> &      mapping,
+  compute_aspect_ratio_of_cells(const Mapping<dim> &      mapping,
+                                const Triangulation<dim> &triangulation,
                                 const Quadrature<dim> &   quadrature);
 
   /**
@@ -275,8 +275,8 @@ namespace GridTools
    */
   template <int dim>
   double
-  compute_maximum_aspect_ratio(const Triangulation<dim> &triangulation,
-                               const Mapping<dim> &      mapping,
+  compute_maximum_aspect_ratio(const Mapping<dim> &      mapping,
+                               const Triangulation<dim> &triangulation,
                                const Quadrature<dim> &   quadrature);
 
   /**
index 6a78bf705e28f29581dcd653e09b5969db95c58b..5b41068c71979c4ad90067e671035440c20bc7d5 100644 (file)
@@ -189,8 +189,8 @@ namespace GridTools
 
   template <int dim>
   Vector<double>
-  compute_aspect_ratio_of_cells(const Triangulation<dim> &triangulation,
-                                const Mapping<dim> &      mapping,
+  compute_aspect_ratio_of_cells(const Mapping<dim> &      mapping,
+                                const Triangulation<dim> &triangulation,
                                 const Quadrature<dim> &   quadrature)
   {
     FE_Nothing<dim> fe;
@@ -255,12 +255,12 @@ namespace GridTools
 
   template <int dim>
   double
-  compute_maximum_aspect_ratio(const Triangulation<dim> &triangulation,
-                               const Mapping<dim> &      mapping,
+  compute_maximum_aspect_ratio(const Mapping<dim> &      mapping,
+                               const Triangulation<dim> &triangulation,
                                const Quadrature<dim> &   quadrature)
   {
     Vector<double> aspect_ratio_vector =
-      compute_aspect_ratio_of_cells(triangulation, mapping, quadrature);
+      compute_aspect_ratio_of_cells(mapping, triangulation, quadrature);
 
     return VectorTools::compute_global_error(triangulation,
                                              aspect_ratio_vector,
index 77b083198df159ba400f0e1b25570100450bf873..e08f457d1c79fd64c8dcbaaa48ef0bdc5f7a8ba3 100644 (file)
@@ -178,13 +178,13 @@ for (deal_II_space_dimension : SPACE_DIMENSIONS)
       const std::vector<BoundingBox<deal_II_space_dimension>> &, MPI_Comm);
 
     template Vector<double> GridTools::compute_aspect_ratio_of_cells(
-      const Triangulation<deal_II_space_dimension> &,
       const Mapping<deal_II_space_dimension> &,
+      const Triangulation<deal_II_space_dimension> &,
       const Quadrature<deal_II_space_dimension> &);
 
     template double GridTools::compute_maximum_aspect_ratio(
-      const Triangulation<deal_II_space_dimension> &,
       const Mapping<deal_II_space_dimension> &,
+      const Triangulation<deal_II_space_dimension> &,
       const Quadrature<deal_II_space_dimension> &);
   }
 
index cc665493a7c6a646aaab94ac394f47ede1befe7c..a50e53e9198ff164fca863f5b476196daf743d13 100644 (file)
@@ -52,9 +52,9 @@ test()
   QGauss<3> const          gauss(4);
 
   double const ar_full_torus =
-    GridTools::compute_maximum_aspect_ratio(tria, mapping, gauss);
+    GridTools::compute_maximum_aspect_ratio(mapping, tria, gauss);
   double const ar_open_torus =
-    GridTools::compute_maximum_aspect_ratio(tria_open, mapping, gauss);
+    GridTools::compute_maximum_aspect_ratio(mapping, tria_open, gauss);
 
   deallog << "N_active_cells_full = " << tria.n_global_active_cells()
           << std::endl;
index 5822658c05014cdd97f97f25ade18b6cfa5f7206..39e310cb6e43fe14e69a618355f460586f68115b 100644 (file)
@@ -76,7 +76,7 @@ compute_aspect_ratio_hyper_rectangle(
   QGauss<dim> const          gauss(n_q_points);
 
   Vector<double> ratios =
-    GridTools::compute_aspect_ratio_of_cells(tria, mapping, gauss);
+    GridTools::compute_aspect_ratio_of_cells(mapping, tria, gauss);
 
   deallog << std::endl
           << "Parameters:"
@@ -87,7 +87,7 @@ compute_aspect_ratio_hyper_rectangle(
   deallog << "Aspect ratio vector = " << std::endl;
   ratios.print(deallog.get_file_stream());
 
-  return GridTools::compute_maximum_aspect_ratio(tria, mapping, gauss);
+  return GridTools::compute_maximum_aspect_ratio(mapping, tria, gauss);
 }
 
 int

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.