From e9e63d0b6db7b0c60b4707ed2f14247bd73e4ff8 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 2 Nov 2017 13:57:39 +0100 Subject: [PATCH] Implement ChartManifold::get_intermediate_point. --- include/deal.II/grid/manifold.h | 10 ++++++++++ source/grid/manifold.cc | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/include/deal.II/grid/manifold.h b/include/deal.II/grid/manifold.h index b2942a514d..02dd9a4214 100644 --- a/include/deal.II/grid/manifold.h +++ b/include/deal.II/grid/manifold.h @@ -930,6 +930,16 @@ public: */ virtual ~ChartManifold () = default; + /** + * Refer to the general documentation of this class and the documentation of + * the base class for more information. + */ + virtual + Point + get_intermediate_point (const Point &p1, + const Point &p2, + const double w) const override; + /** * Refer to the general documentation of this class and the documentation of * the base class for more information. diff --git a/source/grid/manifold.cc b/source/grid/manifold.cc index 5175500f25..5940478ad5 100644 --- a/source/grid/manifold.cc +++ b/source/grid/manifold.cc @@ -693,6 +693,21 @@ ChartManifold::ChartManifold (const Tensor<1,chartdim> &p +template +Point +ChartManifold:: +get_intermediate_point (const Point &p1, + const Point &p2, + const double w) const +{ + const std::array, 2> points({{p1, p2}}); + const std::array weights({{1.-w, w}}); + return get_new_point(make_array_view(points.begin(), points.end()), + make_array_view(weights.begin(), weights.end())); +} + + + template Point ChartManifold:: -- 2.39.5