Skip to content
Snippets Groups Projects
Verified Commit c866ebe6 authored by Marcus Mohr's avatar Marcus Mohr
Browse files

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.
parent 0eb71c56
1 merge request!36Remove unreachable and/or unneeded branches in function_space.py
Pipeline #70590 failed with stages
in 32 minutes and 40 seconds
...@@ -213,44 +213,6 @@ class LagrangianFunctionSpace(FunctionSpace): ...@@ -213,44 +213,6 @@ class LagrangianFunctionSpace(FunctionSpace):
elif ( elif (
isinstance(geometry, TriangleElement) 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.family in ["Lagrange"]
and self._degree == 2 and self._degree == 2
): ):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment