diff --git a/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_explicit_dynamic_solver.py b/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_explicit_dynamic_solver.py index 3763b0ed8a11..99e5322b4ac6 100644 --- a/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_explicit_dynamic_solver.py +++ b/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_explicit_dynamic_solver.py @@ -106,7 +106,7 @@ def Initialize(self): print("::[Mechanical Solver]:: -END- ") - def SetVariables(self): + def AddVariables(self): solid_mechanics_solver.MechanicalSolver.SetVariables(self) diff --git a/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_solver.py b/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_solver.py index 6fa06662c766..ccf7e496f845 100644 --- a/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_solver.py +++ b/applications/SolidMechanicsApplication/python_scripts/solid_mechanics_solver.py @@ -100,8 +100,9 @@ def SetVariables(self): self.nodal_variables = self.nodal_variables + ['VOLUME_ACCELERATION','POSITIVE_FACE_PRESSURE','NEGATIVE_FACE_PRESSURE','POINT_LOAD','LINE_LOAD','SURFACE_LOAD'] # Add nodal force variables for component wise calculation - if self.settings["component_wise"].GetBool(): - self.nodal_variables = self.nodal_variables + ['INTERNAL_FORCE','EXTERNAL_FORCE'] + if( self.settings.Has("component_wise") ): + if self.settings["component_wise"].GetBool(): + self.nodal_variables = self.nodal_variables + ['INTERNAL_FORCE','EXTERNAL_FORCE'] # Add rotational variables if self.settings["rotation_dofs"].GetBool():