From f0e5c54e978a20ab59da9d375d1ddb0501bd12b5 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Tue, 30 Jun 2020 18:35:12 -0500 Subject: [PATCH] symbolic.primitives: Fix the dimension check for a few 3D-surface-only operators --- pytential/symbolic/primitives.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytential/symbolic/primitives.py b/pytential/symbolic/primitives.py index 1799e09b..bb5dfcbf 100644 --- a/pytential/symbolic/primitives.py +++ b/pytential/symbolic/primitives.py @@ -759,7 +759,7 @@ def first_fundamental_form(ambient_dim, dim=None, dofdesc=None): if dim is None: dim = ambient_dim - 1 - if ambient_dim != 3 and dim != 2: + if not (ambient_dim == 3 and dim == 2): raise NotImplementedError("only available for surfaces in 3D") pd_mat = parametrization_derivative_matrix(ambient_dim, dim, dofdesc) @@ -782,7 +782,7 @@ def second_fundamental_form(ambient_dim, dim=None, dofdesc=None): if dim is None: dim = ambient_dim - 1 - if ambient_dim != 3 and dim != 2: + if not (ambient_dim == 3 and dim == 2): raise NotImplementedError("only available for surfaces in 3D") r = nodes(ambient_dim, dofdesc=dofdesc).as_vector() @@ -814,7 +814,7 @@ def shape_operator(ambient_dim, dim=None, dofdesc=None): if dim is None: dim = ambient_dim - 1 - if ambient_dim != 3 and dim != 2: + if not (ambient_dim == 3 and dim == 2): raise NotImplementedError("only available for surfaces in 3D") # https://en.wikipedia.org/w/index.php?title=Differential_geometry_of_surfaces&oldid=833587563 -- GitLab