diff --git a/gustaf/faces.py b/gustaf/faces.py index d0f913428..83ebbe9f0 100644 --- a/gustaf/faces.py +++ b/gustaf/faces.py @@ -331,6 +331,6 @@ def to_subelements( ------- subelements: boundary class """ - return eval( - f"self.to_{self.__boundary_class__.__qualname__.lower()}(unique)" - ) + return getattr( + self, f"to_{self.__boundary_class__.__qualname__.lower()}" + )(unique)