]> https://gitweb.dealii.org/ - dealii.git/commitdiff
First step in implementing project_to_surface,
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 30 Jul 2009 18:48:05 +0000 (18:48 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 30 Jul 2009 18:48:05 +0000 (18:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@19143 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria_boundary.cc

index c89556a76ed0a40eef87ac73adaa843f14cc4e80..dd6ba2ef5d3b8c60fc5c0092ee74084c067b66d2 100644 (file)
@@ -167,10 +167,15 @@ template <int dim, int spacedim>
 Point<spacedim>
 Boundary<dim, spacedim>::
 project_to_surface (const typename Triangulation<dim, spacedim>::line_iterator &,
-                   const Point<spacedim>                                &) const
+                   const Point<spacedim>                                &trial_point) const
 {
-  Assert (false, ExcPureFunctionCalled());
-  return Point<spacedim>();
+  if (spacedim <= 1)
+    return trial_point;
+  else
+    {
+      Assert (false, ExcPureFunctionCalled());
+      return Point<spacedim>();
+    }
 }
 
 
@@ -179,10 +184,15 @@ template <int dim, int spacedim>
 Point<spacedim>
 Boundary<dim, spacedim>::
 project_to_surface (const typename Triangulation<dim, spacedim>::quad_iterator &,
-                   const Point<spacedim>                                &) const
+                   const Point<spacedim>                                &trial_point) const
 {
-  Assert (false, ExcPureFunctionCalled());
-  return Point<spacedim>();
+  if (spacedim <= 2)
+    return trial_point;
+  else
+    {
+      Assert (false, ExcPureFunctionCalled());
+      return Point<spacedim>();
+    }
 }
 
 
@@ -489,10 +499,15 @@ template <int dim, int spacedim>
 Point<spacedim>
 StraightBoundary<dim, spacedim>::
 project_to_surface (const typename Triangulation<dim, spacedim>::line_iterator &,
-                   const Point<spacedim>                                &) const
+                   const Point<spacedim>                                &trial_point) const
 {
-  Assert (false, ExcPureFunctionCalled());
-  return Point<spacedim>();
+  if (spacedim <= 1)
+    return trial_point;
+  else
+    {
+      Assert (false, ExcPureFunctionCalled());
+      return Point<spacedim>();
+    }
 }
 
 
@@ -501,10 +516,15 @@ template <int dim, int spacedim>
 Point<spacedim>
 StraightBoundary<dim, spacedim>::
 project_to_surface (const typename Triangulation<dim, spacedim>::quad_iterator &,
-                   const Point<spacedim>                                &) const
+                   const Point<spacedim>                                &trial_point) const
 {
-  Assert (false, ExcPureFunctionCalled());
-  return Point<spacedim>();
+  if (spacedim <= 2)
+    return trial_point;
+  else
+    {
+      Assert (false, ExcPureFunctionCalled());
+      return 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.