From 5a1ad8178cc2df266a51281dd3bfe3d83a313836 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 27 Jan 2022 21:25:16 -0700 Subject: [PATCH] Use copy constructors for manifolds in clone(). --- source/grid/manifold_lib.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/grid/manifold_lib.cc b/source/grid/manifold_lib.cc index ad4ad875a9..1b9ad3730c 100644 --- a/source/grid/manifold_lib.cc +++ b/source/grid/manifold_lib.cc @@ -138,7 +138,7 @@ template std::unique_ptr> PolarManifold::clone() const { - return std::make_unique>(center); + return std::make_unique>(*this); } @@ -369,7 +369,7 @@ template std::unique_ptr> SphericalManifold::clone() const { - return std::make_unique>(center); + return std::make_unique>(*this); } @@ -1080,9 +1080,7 @@ template std::unique_ptr> CylindricalManifold::clone() const { - return std::make_unique>(direction, - point_on_axis, - tolerance); + return std::make_unique>(*this); } @@ -1237,10 +1235,7 @@ template std::unique_ptr> EllipticalManifold::clone() const { - const double eccentricity = 1.0 / cosh_u; - return std::make_unique>(center, - direction, - eccentricity); + return std::make_unique>(*this); } -- 2.39.5