From c2a4ff64de6cfbc7b05c196340006036d2f66066 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Tue, 22 Aug 2023 18:33:45 -0600 Subject: [PATCH] step-75: enable pseudo-3d solution --- examples/step-75/step-75.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/step-75/step-75.cc b/examples/step-75/step-75.cc index 75181b33fe..0d781469dd 100644 --- a/examples/step-75/step-75.cc +++ b/examples/step-75/step-75.cc @@ -110,16 +110,18 @@ namespace Step75 public: Solution() : Function() - {} + { + Assert(dim > 1, ExcNotImplemented()); + } virtual double value(const Point &p, const unsigned int /*component*/) const override { - const std::array p_sphere = - GeometricUtilities::Coordinates::to_spherical(p); + const std::array polar = + GeometricUtilities::Coordinates::to_spherical(Point<2>(p[0], p[1])); constexpr const double alpha = 2. / 3.; - return std::pow(p_sphere[0], alpha) * std::sin(alpha * p_sphere[1]); + return std::pow(polar[0], alpha) * std::sin(alpha * polar[1]); } }; -- 2.39.5