From e13d552b48a3f4147f3f7096a50c035460ba8648 Mon Sep 17 00:00:00 2001 From: Javi Garate Date: Mon, 14 Oct 2024 12:08:16 +0200 Subject: [PATCH 1/2] if param is integer, read it as double, it's not a mistake --- .../python_scripts/convection_diffusion_solver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py b/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py index f91e5268974..77e2348d7f8 100644 --- a/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py +++ b/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py @@ -472,7 +472,7 @@ def _assign_nodally_properties(self): for key, value in mat["Variables"].items(): var = KratosMultiphysics.KratosGlobals.GetVariable(key) if (self._check_variable_to_set(var)): - if value.IsDouble(): + if value.IsDouble() or value.IsInt(): KratosMultiphysics.VariableUtils().SetVariable(var, value.GetDouble(), model_part.Nodes) elif value.IsVector(): KratosMultiphysics.VariableUtils().SetVariable(var, value.GetVector(), model_part.Nodes) From c537b26a1ceecaa53b8c06531297079595c4ae26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20G=C3=A1rate?= Date: Mon, 4 Nov 2024 10:16:07 +0100 Subject: [PATCH 2/2] Update applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py Co-authored-by: Philipp Bucher --- .../python_scripts/convection_diffusion_solver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py b/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py index 77e2348d7f8..8ab26d2ccb2 100644 --- a/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py +++ b/applications/ConvectionDiffusionApplication/python_scripts/convection_diffusion_solver.py @@ -472,7 +472,7 @@ def _assign_nodally_properties(self): for key, value in mat["Variables"].items(): var = KratosMultiphysics.KratosGlobals.GetVariable(key) if (self._check_variable_to_set(var)): - if value.IsDouble() or value.IsInt(): + if value.IsNumber(): KratosMultiphysics.VariableUtils().SetVariable(var, value.GetDouble(), model_part.Nodes) elif value.IsVector(): KratosMultiphysics.VariableUtils().SetVariable(var, value.GetVector(), model_part.Nodes)