From: Marc Fehling Date: Wed, 23 Aug 2023 00:33:45 +0000 (-0600) Subject: step-75: enable pseudo-3d solution X-Git-Tag: relicensing~564^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2a4ff64de6cfbc7b05c196340006036d2f66066;p=dealii.git step-75: enable pseudo-3d solution --- 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]); } };