]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make step-53 compatible with the new interface.
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 6 Apr 2018 16:42:55 +0000 (18:42 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Mon, 9 Apr 2018 12:32:12 +0000 (14:32 +0200)
examples/step-53/step-53.cc

index d0a0b5608281bee20281d1800ce17bf848a963d6..eb2035251776038dffdc23264ed5feaa8ce9d7e5 100644 (file)
@@ -210,11 +210,13 @@ namespace Step53
   public:
     virtual
     Point<3>
-    pull_back(const Point<3> &space_point) const;
+    pull_back(const Point<3> &space_point) const override;
 
     virtual
     Point<3>
-    push_forward(const Point<3> &chart_point) const;
+    push_forward(const Point<3> &chart_point) const override;
+
+    virtual std::unique_ptr<Manifold<3,3> > clone() const override;
 
   private:
     static const double    R;
@@ -251,6 +253,15 @@ namespace Step53
   }
 
 
+  // This function is required by the interface of the Manifold base
+  // class, and allows you to clone the AfricaGeometry class:
+  std::unique_ptr<Manifold<3,3> >
+  AfricaGeometry::clone() const
+  {
+    return std::unique_ptr<Manifold<3,3> >(new AfricaGeometry());
+  }
+
+
   // The following two functions then define the forward and inverse
   // transformations that correspond to the WGS 84 reference shape of
   // Earth. The forward transform follows the formula shown in the

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.