]> https://gitweb.dealii.org/ - dealii.git/commitdiff
convert_hypercube_to_simplex_mesh_01: generalize the test.
authorDavid Wells <drwells@email.unc.edu>
Mon, 12 May 2025 13:52:01 +0000 (09:52 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 12 May 2025 21:28:07 +0000 (17:28 -0400)
tests/simplex/convert_hypercube_to_simplex_mesh_01.cc

index ed7e38bf25d5293e789c292bcb5dd14f12e42366..752d6d3134dc601426fe569d8acd5ce59aedaa5b 100644 (file)
@@ -48,7 +48,7 @@ create_triangulation(Triangulation<dim, dim> &triangulation)
 
 template <int dim, int spacedim>
 void
-check_file(unsigned int n_refinements = 0) // for dim = spaceim
+check_file(unsigned int n_divisions, unsigned int n_refinements = 0)
 {
   Triangulation<dim, spacedim> in_tria, out_tria;
   create_triangulation(in_tria);
@@ -74,7 +74,9 @@ check_file(unsigned int n_refinements = 0) // for dim = spaceim
         }
     }
 
-  GridGenerator::convert_hypercube_to_simplex_mesh(in_tria, out_tria);
+  GridGenerator::convert_hypercube_to_simplex_mesh(in_tria,
+                                                   out_tria,
+                                                   n_divisions);
 
   // copy manifolds to test global refining
   for (const auto i : in_tria.get_manifold_ids())
@@ -121,27 +123,27 @@ main()
   // dim = spacedim = 2
   deallog.push(
     "2D: conversion triangulation with quad elements to tri elements: ");
-  check_file<2, 2>();
+  check_file<2, 2>(8);
   deallog.pop();
 
-  // TETRAHEDRAL ELEMENTS
+  // TRIANGULAR ELEMENTS
   // dim = 2, spacedim = 2
   deallog.push(
     "2D: conversion triangulation with quad elements to tri elements: ");
-  check_file<2, 3>();
+  check_file<2, 3>(8);
   deallog.pop();
 
   // TETRAHEDRAL ELEMENTS
   // dim = spacedim = 3
   deallog.push(
     "3D: conversion triangulation with tet elements to hex elements: ");
-  check_file<3, 3>();
+  check_file<3, 3>(24);
   deallog.pop();
 
   // TETRAHEDRAL ELEMENTS
   // dim = spacedim = 3
   deallog.push(
     "3D: conversion triangulation with tet elements to hex elements + refinement: ");
-  check_file<3, 3>(1);
+  check_file<3, 3>(24, 1);
   deallog.pop();
 }

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.