From c866ebe6ebffab656ff31ccdc374a3805dc1ab89 Mon Sep 17 00:00:00 2001 From: Marcus Mohr <marcus.mohr@lmu.de> Date: Tue, 26 Nov 2024 14:45:23 +0100 Subject: [PATCH] Remove unreachable and/or unneeded branches in function_space.py This commit fixes issue #43 by removing three unreachable and/or unneeded branches that apparently were connected to left-overs from an initial treatment of manifolds. --- hog/function_space.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/hog/function_space.py b/hog/function_space.py index af40883..2d27469 100644 --- a/hog/function_space.py +++ b/hog/function_space.py @@ -213,44 +213,6 @@ class LagrangianFunctionSpace(FunctionSpace): elif ( isinstance(geometry, TriangleElement) - and geometry.dimensions == geometry.space_dimension - and self.family in ["Lagrange"] - and self._degree == 2 - ): - x = symbols[0] - y = symbols[1] - basis_functions = [ - 2 * x**2 + 4 * x * y - 3 * x + 2 * y**2 - 3 * y + 1, - 2 * x**2 - x, - 2 * y**2 - y, - 4 * x * y, - -4 * x * y - 4 * y**2 + 4 * y, - -4 * x**2 - 4 * x * y + 4 * x, - ] - - elif ( - isinstance(geometry, TriangleElement) - and geometry.dimensions == geometry.space_dimension - 1 - and self.family in ["Lagrange"] - and self._degree == 0 - ): - basis_functions = [sp.sympify(1)] - - elif ( - isinstance(geometry, TriangleElement) - and geometry.dimensions == geometry.space_dimension - 1 - and self.family in ["Lagrange"] - and self._degree == 1 - ): - basis_functions = [ - 1 - symbols[0] - symbols[1], - symbols[0], - symbols[1], - ] - - elif ( - isinstance(geometry, TriangleElement) - and geometry.dimensions == geometry.space_dimension - 1 and self.family in ["Lagrange"] and self._degree == 2 ): -- GitLab