]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed interfaces in project_to_surface.
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Feb 2014 00:41:22 +0000 (00:41 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 Feb 2014 00:41:22 +0000 (00:41 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32399 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/project_to_surface_01.cc
tests/deal.II/project_to_surface_02.cc
tests/deal.II/project_to_surface_03.cc

index 7fda38c7ae8818fa8974f088a36a1270838d7189..f6775cc67e1e214cd74ab6ee41d2ed8eb5051d32 100644 (file)
@@ -97,14 +97,23 @@ void test ()
       Point<dim> trial_point;
       for (unsigned int i=0; i<dim; ++i)
         trial_point[i] = 1.5;
-
+      
+      std::vector<Point<dim> > vs(2);
+      
       for (unsigned int e=0; e<GeometryInfo<dim>::lines_per_cell; ++e)
         {
           deallog << "    Line " << e << ", projected point=";
-          if (dim > 1)
-            deallog << boundary.project_to_surface (cell->line(e), trial_point);
-          else
-            deallog << boundary.project_to_surface (cell, trial_point);
+         vs.resize(2);
+          if (dim > 1) {
+           vs[0] = cell->line(e)->vertex(0);
+           vs[1] = cell->line(e)->vertex(1);
+            deallog << boundary.project_to_manifold (vs, trial_point);
+         }
+          else {
+           vs[0] = cell->vertex(0);
+           vs[1] = cell->vertex(1);
+            deallog << boundary.project_to_manifold (vs, trial_point);
+         }
 
           deallog << "  (line is from ";
           if (dim > 1)
index 9e42fc3a6c7900c945330aa07744a2b08b63ca22..b098e96d9027805e0ef28a02bfc1dcb5996e5d40 100644 (file)
@@ -97,7 +97,9 @@ void test ()
       Point<dim> trial_point;
       for (unsigned int i=0; i<dim; ++i)
         trial_point[i] = 1.5;
-
+      
+      std::vector<Point<dim> > vs(GeometryInfo<dim>::vertices_per_cell);
+      
       for (unsigned int e=0; e<GeometryInfo<dim>::quads_per_cell; ++e)
         {
           const typename Triangulation<dim>::quad_iterator
@@ -105,8 +107,10 @@ void test ()
                   *reinterpret_cast<const typename Triangulation<dim>::quad_iterator *>(&cell));
 
           deallog << "    Quad " << e << ", projected point=";
+         for(unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
+           vs[i] = quad->vertex(i);
 
-          const Point<dim> p = boundary.project_to_surface (quad, trial_point);
+          const Point<dim> p = boundary.project_to_manifold (vs, trial_point);
           deallog << p;
           deallog << "  (quad is from ";
           deallog << quad->vertex(0);
index f99a6de525510ada54786841a6869e3ab67521fc..9b488cf2b91b1607d8ecf1fbde48cf77be99436f 100644 (file)
@@ -69,6 +69,8 @@ void test ()
 
       deallog << "Trial point = " << trial_point << std::endl;
 
+      std::vector<Point<dim> > vs(GeometryInfo<dim>::vertices_per_cell);
+
       for (unsigned int e=0; e<GeometryInfo<dim>::quads_per_cell; ++e)
         {
           const typename Triangulation<dim>::quad_iterator
@@ -76,8 +78,11 @@ void test ()
                   *reinterpret_cast<const typename Triangulation<dim>::quad_iterator *>(&cell));
 
           deallog << "    Quad " << e << ", projected point=";
+         
+         for(unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
+           vs[i] = quad->vertex(i);
 
-          const Point<dim> p = boundary.project_to_surface (quad, trial_point);
+          const Point<dim> p = boundary.project_to_surface (vs, trial_point);
           deallog << p;
           deallog << "  (quad is from ";
           deallog << quad->vertex(0);

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.