#include <boost/iostreams/filter/gzip.hpp>
#include <boost/iostreams/device/file.hpp>
+// The last include file is required because we will be using a feature that is
+// not part of the cxx11 standard. The deal.II library, however, can be installed
+// with a cxx11 compliant compiler, without assuming that cxx14 or cxx17 features are
+// available. As some of these features are very useful, we provide their
+// implementation in an internal namespace, if the compiler does not support them:
+#include <deal.II/base/std_cxx14/memory.h>
+
#include <iostream>
#include <fstream>
// This function is required by the interface of the Manifold base
- // class, and allows you to clone the AfricaGeometry class:
+ // class, and allows you to clone the AfricaGeometry class. This is
+ // where we use a feature that is only available in cxx14, namely the
+ // make_unique function, that simplifies the creation of
+ // std::unique_ptr objects. Notice that, while the function returns a
+ // std::unique_ptr<Manifold<3,3> >, we internally create a
+ // unique_ptr<AfricaGeometry>. C++11 knows how to handle these cases,
+ // and is able to transform a unique pointer to a derived class to a
+ // unique pointer to its base class automatically:
std::unique_ptr<Manifold<3,3> >
AfricaGeometry::clone() const
{
- return std::unique_ptr<Manifold<3,3> >(new AfricaGeometry());
+ return std_cxx14::make_unique<AfricaGeometry>();
}
#include <deal.II/base/thread_management.h>
#include <deal.II/base/point.h>
#include <deal.II/base/derivative_form.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/tria_accessor.h>
CompositionManifold(const ChartManifold<dim1, intermediate_dim, chartdim> &F,
const ChartManifold<dim2, spacedim, intermediate_dim> &G);
+ /**
+ * Make a clone of this Manifold.
+ */
+ virtual std::unique_ptr<Manifold<dim, spacedim> > clone() const override;
+
/**
* Pull back the given point in spacedim to the Euclidean chartdim
* dimensional space. This function calls the pull_back() function
}
+template <int dim, int spacedim, int chartdim, int intermediate_dim,
+ int dim1, int dim2>
+std::unique_ptr<Manifold<dim,spacedim> >
+CompositionManifold<dim,spacedim,chartdim,intermediate_dim,dim1,dim2>::clone() const
+{
+ return std_cxx14::make_unique<CompositionManifold<dim,spacedim,chartdim,intermediate_dim,dim1,dim2> >(*F, *G);
+}
+
template <int dim, int spacedim, int chartdim, int intermediate_dim,
int dim1, int dim2>
std::vector<bool> coarse_cell_is_flat;
/**
- * A flat manifold used to compute new points in the chart space where it we
+ * A flat manifold used to compute new points in the chart space where we
* use a FlatManifold description.
*/
FlatManifold<dim> chart_manifold;
#include <deal.II/base/config.h>
#include <deal.II/base/subscriptor.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/base/point.h>
#include <deal.II/grid/manifold.h>
const ChartManifold<dim_A, spacedim_A, chartdim_A> &manifold_A,
const ChartManifold<dim_B, spacedim_B, chartdim_B> &manifold_B);
+ /**
+ * Clone this manifold.
+ */
+ virtual std::unique_ptr<Manifold<dim,spacedim_A+spacedim_B> >
+ clone() const override;
+
/**
* Pull back operation.
*/
virtual
Point<chartdim>
- pull_back(const Point<spacedim> &space_point) const;
+ pull_back(const Point<spacedim> &space_point) const override;
/**
* Push forward operation.
*/
virtual
Point<spacedim>
- push_forward(const Point<chartdim> &chart_point) const;
+ push_forward(const Point<chartdim> &chart_point) const override;
/**
* Gradient.
*/
virtual
DerivativeForm<1,chartdim,spacedim>
- push_forward_gradient(const Point<chartdim> &chart_point) const;
+ push_forward_gradient(const Point<chartdim> &chart_point) const override;
private:
SmartPointer<const ChartManifold<dim_A, spacedim_A, chartdim_A>,
manifold_B (&manifold_B)
{}
+template <int dim,
+ int dim_A, int spacedim_A, int chartdim_A,
+ int dim_B, int spacedim_B, int chartdim_B>
+std::unique_ptr<Manifold<dim,spacedim_A+spacedim_B> >
+TensorProductManifold<dim, dim_A, spacedim_A, chartdim_A, dim_B, spacedim_B, chartdim_B>::clone() const
+{
+ return std_cxx14::make_unique<TensorProductManifold<dim, dim_A, spacedim_A, chartdim_A, dim_B, spacedim_B, chartdim_B> >
+ (*manifold_A, *manifold_B);
+}
+
template <int dim,
int dim_A, int spacedim_A, int chartdim_A,
int dim_B, int spacedim_B, int chartdim_B>
// Save manifolds
auto manifold_ids = tria.get_manifold_ids();
- std::map<types::manifold_id, const Manifold<dim,spacedim>*> manifolds;
+ std::map<types::manifold_id, std::unique_ptr<Manifold<dim,spacedim> > > manifolds;
// Set manifolds in new Triangulation
for (auto manifold_id: manifold_ids)
if (manifold_id != numbers::invalid_manifold_id)
- manifolds[manifold_id] = &tria.get_manifold(manifold_id);
+ manifolds[manifold_id] = tria.get_manifold(manifold_id).clone();
tria.clear();
#include <deal.II/base/tensor.h>
#include <deal.II/base/table.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/grid/manifold.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
std::unique_ptr<Manifold<dim, spacedim> >
FlatManifold<dim,spacedim>::clone() const
{
- return std::unique_ptr<Manifold<dim,spacedim> >(new FlatManifold<dim,spacedim>(periodicity, tolerance));
+ return std_cxx14::make_unique<FlatManifold<dim,spacedim> >(periodicity, tolerance);
}
#include <deal.II/base/tensor.h>
#include <deal.II/base/table.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_iterator.h>
#include <deal.II/grid/tria_accessor.h>
std::unique_ptr<Manifold<dim, spacedim> >
PolarManifold<dim,spacedim>::clone() const
{
- return std::unique_ptr<Manifold<dim,spacedim> >(new PolarManifold<dim,spacedim>(center));
+ return std_cxx14::make_unique<PolarManifold<dim,spacedim> >(center);
}
std::unique_ptr<Manifold<dim, spacedim> >
SphericalManifold<dim,spacedim>::clone() const
{
- return std::unique_ptr<Manifold<dim,spacedim> >(new SphericalManifold<dim,spacedim>(center));
+ return std_cxx14::make_unique<SphericalManifold<dim,spacedim> >(center);
}
std::unique_ptr<Manifold<dim, spacedim> >
CylindricalManifold<dim,spacedim>::clone() const
{
- return std::unique_ptr<Manifold<dim,spacedim> >
- (new CylindricalManifold<dim,spacedim>(direction, point_on_axis, tolerance));
+ return std_cxx14::make_unique<CylindricalManifold<dim,spacedim> >(direction, point_on_axis, tolerance);
}
std::unique_ptr<Manifold<dim, spacedim> >
FunctionManifold<dim,spacedim,chartdim>::clone() const
{
+ // This manifold can be constructed either by providing an expression for the
+ // push forward and the pull back charts, or by providing two Function
+ // objects. In the first case, the push_forward and pull_back functions are
+ // created internally in FunctionManifold, and destroyed when this object is
+ // deleted. We need to make sure that our cloned object is constructed in the
+ // same way this class was constructed, and that its internal Function
+ // pointers point either to the same Function objects used to construct this
+ // function (owns_pointers == false) or that the newly generated manifold
+ // creates internally the push_forward and pull_back functions using the same
+ // expressions that were used to construct this class (own_pointers == true).
if (owns_pointers == true)
{
- return std::unique_ptr<Manifold<dim,spacedim> >
- (new FunctionManifold<dim,spacedim,chartdim>(push_forward_expression,
- pull_back_expression,
- this->get_periodicity(),
- const_map,
- chart_vars,
- space_vars,
- tolerance,
- finite_difference_step));
+ return std_cxx14::make_unique<FunctionManifold<dim,spacedim,chartdim> >(push_forward_expression,
+ pull_back_expression,
+ this->get_periodicity(),
+ const_map,
+ chart_vars,
+ space_vars,
+ tolerance,
+ finite_difference_step);
}
else
- return std::unique_ptr<Manifold<dim,spacedim> >
- (new FunctionManifold<dim,spacedim,chartdim>(*push_forward_function,
- *pull_back_function,
- this->get_periodicity(),
- tolerance));
+ return std_cxx14::make_unique<FunctionManifold<dim,spacedim,chartdim> >(*push_forward_function,
+ *pull_back_function,
+ this->get_periodicity(),
+ tolerance);
}
std::unique_ptr<Manifold<dim, 3> >
TorusManifold<dim>::clone() const
{
- return std::unique_ptr<Manifold<dim,3> >(new TorusManifold<dim>(R,r));
+ return std_cxx14::make_unique<TorusManifold<dim> >(R,r);
}
template <int dim>
class MyManifold : public Manifold<dim>
{
+ virtual std::unique_ptr<Manifold<dim> > clone() const override
+ {
+ return std::unique_ptr<Manifold<dim> >(new MyManifold<dim>());
+ }
+
virtual Point<dim>
get_new_point_on_line (const typename Triangulation<dim>::line_iterator &line) const
{
public:
virtual Point<dim>
get_new_point (const ArrayView<const Point<dim>> &surrounding_points,
- const ArrayView<const double> &weights) const
+ const ArrayView<const double> &weights) const override
{
Point<dim> middle = FlatManifold<dim>::get_new_point(surrounding_points, weights);
return middle;
}
+
+ virtual std::unique_ptr<Manifold<dim,dim> > clone() const override
+ {
+ return std::unique_ptr<Manifold<dim,dim> >(new Ball<dim>());
+ }
};
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim>
{
public:
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
return space_point;
}
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
return chart_point;
}
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim+1>
{
public:
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
virtual
Point<spacedim+1>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
Point<spacedim+1> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
Point<spacedim>
- push_forward(const Point<spacedim+1> &chart_point) const
+ push_forward(const Point<spacedim+1> &chart_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
DerivativeForm<1,spacedim+1,spacedim>
- push_forward_gradient(const Point<spacedim+1> &chart_point) const
+ push_forward_gradient(const Point<spacedim+1> &chart_point) const override
{
DerivativeForm<1,spacedim+1,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim>
{
public:
+ virtual
+ std::unique_ptr<Manifold<dim,spacedim> >
+ clone() const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold<dim,spacedim>());
+ }
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
return space_point;
}
-
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
return chart_point;
}
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim+1>
{
public:
+
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
virtual
Point<spacedim+1>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
Point<spacedim+1> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
Point<spacedim>
- push_forward(const Point<spacedim+1> &chart_point) const
+ push_forward(const Point<spacedim+1> &chart_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
DerivativeForm<1,spacedim+1,spacedim>
- push_forward_gradient(const Point<spacedim+1> &chart_point) const
+ push_forward_gradient(const Point<spacedim+1> &chart_point) const override
{
DerivativeForm<1,spacedim+1,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
ChartManifold<dim,spacedim,spacedim> (periodicity)
{}
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold(this->get_periodicity()));
+ }
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
return space_point;
}
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
return chart_point;
}
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim>
{
public:
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
return space_point;
}
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
return chart_point;
}
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim+1>
{
public:
+ std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
+
virtual
Point<spacedim+1>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
Point<spacedim+1> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
Point<spacedim>
- push_forward(const Point<spacedim+1> &chart_point) const
+ push_forward(const Point<spacedim+1> &chart_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
DerivativeForm<1,spacedim+1,spacedim>
- push_forward_gradient(const Point<spacedim+1> &chart_point) const
+ push_forward_gradient(const Point<spacedim+1> &chart_point) const override
{
DerivativeForm<1,spacedim+1,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim>
{
public:
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
return space_point;
}
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
return chart_point;
}
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
class MyFlatManifold : public ChartManifold<dim,spacedim,spacedim>
{
public:
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold());
+ }
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
{}
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold(this->get_periodicity()));
+ }
+
+
virtual
Point<spacedim>
pull_back(const Point<spacedim> &space_point) const
ChartManifold<dim,spacedim,spacedim>(periodicity)
{}
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyFlatManifold(this->get_periodicity()));
+ }
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
Point<spacedim> p;
for (unsigned int d=0; d<spacedim; ++d)
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> x;
for (unsigned int d=0; d<spacedim; ++d)
{}
+ virtual std::unique_ptr<Manifold<dim,spacedim> >
+ clone () const override
+ {
+ return std::unique_ptr<Manifold<dim,spacedim> >(new MyCylinderManifold());
+ }
+
+
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
const double x = space_point[0];
const double y = space_point[1];
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
const double r = chart_point[0];
const double phi = chart_point[1];
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> g;
ChartManifold<dim,spacedim,spacedim>(periodicity)
{}
+ virtual
+ std::unique_ptr<Manifold<2,3> >
+ clone() const override
+ {
+ return std::unique_ptr<Manifold<2,3> > (new MyCylinderManifold());
+ }
virtual
Point<spacedim>
- pull_back(const Point<spacedim> &space_point) const
+ pull_back(const Point<spacedim> &space_point) const override
{
const double x = space_point[0];
const double y = space_point[1];
virtual
Point<spacedim>
- push_forward(const Point<spacedim> &chart_point) const
+ push_forward(const Point<spacedim> &chart_point) const override
{
const double r = chart_point[0];
const double phi = chart_point[1];
virtual
DerivativeForm<1,spacedim,spacedim>
- push_forward_gradient(const Point<spacedim> &chart_point) const
+ push_forward_gradient(const Point<spacedim> &chart_point) const override
{
DerivativeForm<1,spacedim,spacedim> g;
// all include files you need here
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/grid/tria.h>
#include <deal.II/grid/tria_accessor.h>
#include <deal.II/grid/tria_iterator.h>
p[1] = 4*p[0]*(1-p[0]);
return p;
}
+
+ std::unique_ptr<Manifold<dim,spacedim> > clone() const override
+ {
+ return std_cxx14::make_unique<MyManifold<dim,spacedim> >();
+ }
};
// Helper function
}
static const SphericalManifold<dim> spherical_manifold;
tria.set_manifold(1, spherical_manifold);
- static TransfiniteInterpolationManifold<dim> transfinite;
- transfinite.initialize(tria);
- tria.set_manifold(0, transfinite);
+ static TransfiniteInterpolationManifold<dim> transfinite0;
+ transfinite0.initialize(tria);
+ tria.set_manifold(0, transfinite0);
+
+ const auto &transfinite = tria.get_manifold(0);
const std::array<Point<3>, 2> points({{Point<3>(0, 0.360566, 0), Point<3>(0, 0.321132, 0)}});
const std::array<double, 2> weights({{0.4, 0.6}});
#include <deal.II/base/function.h>
#include <deal.II/base/quadrature_lib.h>
+#include <deal.II/base/std_cxx14/memory.h>
#include <deal.II/dofs/dof_handler.h>
class Geometry: public ChartManifold<dim>
{
public:
- virtual Point<dim> pull_back(const Point<dim> &space_point) const;
- virtual Point<dim> push_forward(const Point<dim> &chart_point) const;
+ virtual Point<dim> pull_back(const Point<dim> &space_point) const override;
+ virtual Point<dim> push_forward(const Point<dim> &chart_point) const override;
+ virtual std::unique_ptr<Manifold<dim> >clone() const override;
};
template <int dim>
return p;
}
+template <int dim>
+std::unique_ptr<Manifold<dim> >
+Geometry<dim>::clone() const
+{
+ return std_cxx14::make_unique<Geometry<dim> >();
+}
template <int dim>
class Geometry: public ChartManifold<dim>
{
public:
- virtual Point<dim> pull_back(const Point<dim> &space_point) const;
- virtual Point<dim> push_forward(const Point<dim> &chart_point) const;
+ virtual Point<dim> pull_back(const Point<dim> &space_point) const override;
+ virtual Point<dim> push_forward(const Point<dim> &chart_point) const override;
+ virtual std::unique_ptr<Manifold<dim> >clone() const override;
};
template <int dim>
return p;
}
+template <int dim>
+std::unique_ptr<Manifold<dim> >
+Geometry<dim>::clone() const
+{
+ return std_cxx14::make_unique<Geometry<dim> >();
+}
+
template <int dim>
class VectorFunction : public Function<dim>
{