]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed compilation issue
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Aug 2013 18:45:49 +0000 (18:45 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 21 Aug 2013 18:45:49 +0000 (18:45 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@30379 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-1/step-1.cc
deal.II/include/deal.II/grid/manifold_lib.h
deal.II/include/deal.II/grid/tria.h
deal.II/source/grid/CMakeLists.txt
deal.II/source/grid/manifold_lib.cc
deal.II/source/grid/manifold_lib.inst.in [new file with mode: 0644]

index 6019451d593b0d8de5b1bb35e04684a332ca8a43..eb44c75af1bd009ffe01aff4fac191e6a3063ea8 100644 (file)
@@ -29,7 +29,7 @@
 #include <deal.II/grid/grid_generator.h>
 // We would like to use boundaries which are not straight lines, so we import
 // some classes which predefine some boundary descriptions:
-#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/manifold_lib.h>
 // Output of grids in various graphics formats:
 #include <deal.II/grid/grid_out.h>
 
@@ -123,8 +123,8 @@ void second_grid ()
   // complicated topic; if you're confused about what exactly is happening
   // here, you may want to look at the
   // @ref GlossBoundaryIndicator "glossary entry on this topic".)
-  const HyperShellBoundary<2> boundary_description(center);
-  triangulation.set_boundary (0, boundary_description);
+  const PolarManifold<2> boundary_description(center);
+  triangulation.set_manifold (0, boundary_description);
 
   // In order to demonstrate how to write a loop over all cells, we will
   // refine the grid in five steps towards the inner circle of the domain:
@@ -200,7 +200,7 @@ void second_grid ()
   // follows. Note that this sets the boundary object used for part "0" of the
   // boundary back to a default object, over which the triangulation has full
   // control.
-  triangulation.set_boundary (0);
+  triangulation.set_manifold (0);
   // An alternative to doing so, and one that is frequently more convenient,
   // would have been to declare the boundary object before the triangulation
   // object. In that case, the triangulation would have let lose of the
index 3b1d7ac5995db271299cd006fc0ec8e47e2ca512..97d203e8fcfd6e03da95e8d50101bec974fcb9fa 100644 (file)
@@ -31,7 +31,7 @@ DEAL_II_NAMESPACE_OPEN
  * and returns its space representation.
  */
 template <int spacedim>
-class PolarManifold : public ManifoldChart<spacedim,spacedim> 
+class PolarManifold : public FlatManifold<spacedim> 
 {
   public:
     PolarManifold(const Point<spacedim> center = Point<spacedim>());
@@ -41,12 +41,6 @@ class PolarManifold : public ManifoldChart<spacedim,spacedim>
                   const std::vector<double> &weights) const;
 
     
-    virtual Point<spacedim>
-    pull_back (const Point<spacedim> &space_point) const;
-    
-    virtual Point<spacedim>
-    push_forward (const Point<spacedim> &chart_point) const;
-    
   private:
     Point<spacedim> center;
 };
index db9f3669d64bae3f89e7004110f2ddaf1e02a507..e74d18321ddd4800fe17c925a9797a5eef8d3355 100644 (file)
@@ -1593,7 +1593,7 @@ public:
     virtual
     void
     create_notification (const Triangulation<dim, spacedim> &tria);
-  } DEAL_II_DEPRECATED;
+  }; // DEAL_II_DEPRECATED;
 
   /**
    * A structure that is used as an
index 4968dd0fe6dc4566c11e228ca39582591467d77f..7c20b596cedeee8f3eb7cd6b2ceb8177a80552c1 100644 (file)
@@ -48,6 +48,7 @@ SET(_inst
   grid_tools.inst.in
   intergrid_map.inst.in
   manifold.inst.in
+  manifold_lib.inst.in
   tria_accessor.inst.in
   tria_boundary.inst.in
   tria_boundary_lib.inst.in
index d69c3164af0db028e25e264f8bc12ade4101ea96..c7dae42946f3943c82c33c6eb23074452bf3872e 100644 (file)
@@ -29,18 +29,29 @@ PolarManifold<spacedim>::PolarManifold(const Point<spacedim> center):
 {}
 
 
-template <int spacedim>
-Point<spacedim>
-PolarManifold<spacedim>::push_forward (const Point<spacedim> &chart_point) const
-{
-  return chart_point;  
-}
 
 template <int spacedim>
 Point<spacedim>
-PolarManifold<spacedim>::pull_back (const Point<spacedim> &space_point) const
+PolarManifold<spacedim>::
+get_new_point (const std::vector<Point<spacedim> > &surrounding_points,
+              const std::vector<double> &weights) const
 {
-  return space_point;
+  Assert(surrounding_points.size() == weights.size(),
+        ExcDimensionMismatch(surrounding_points.size(), weights.size()));
+
+  double radius = 0;
+  for(unsigned int i=0; i<surrounding_points.size(); ++i)
+    radius += weights[i]*surrounding_points[i].norm();
+
+  Point<spacedim> p = FlatManifold<spacedim>::get_new_point(surrounding_points, weights);
+
+  p = p*(radius/p.norm());
+  return p;
 }
 
+
+
+// explicit instantiations
+#include "manifold_lib.inst"
+
 DEAL_II_NAMESPACE_CLOSE
diff --git a/deal.II/source/grid/manifold_lib.inst.in b/deal.II/source/grid/manifold_lib.inst.in
new file mode 100644 (file)
index 0000000..5349d55
--- /dev/null
@@ -0,0 +1,35 @@
+// ---------------------------------------------------------------------
+// $Id: tria_boundary_lib.inst.in 30130 2013-07-23 13:01:18Z heltai $
+//
+// Copyright (C) 1999 - 2013 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+for (deal_II_dimension : DIMENSIONS)
+  {
+    template class PolarManifold<deal_II_dimension>;
+//     template class ConeBoundary<deal_II_dimension>;
+//     template class HyperBallBoundary<deal_II_dimension>;
+//     template class HalfHyperBallBoundary<deal_II_dimension>;
+//     template class HyperShellBoundary<deal_II_dimension>;
+//     template class HalfHyperShellBoundary<deal_II_dimension>;
+// 
+// #if deal_II_dimension != 3
+//     template class HyperBallBoundary<deal_II_dimension,deal_II_dimension+1>;
+// #endif
+// #if deal_II_dimension == 3
+//    template class CylinderBoundary<deal_II_dimension-1,deal_II_dimension>;
+// #endif
+  }
+
+

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.