From 09c2e332011c898a57a84db16c714890a3dacee0 Mon Sep 17 00:00:00 2001 From: sunethwarna Date: Sun, 17 Mar 2024 01:49:44 +0100 Subject: [PATCH] var name change --- .../custom_python/optimization_python_application.cpp | 2 +- .../OptimizationApplication/optimization_application.cpp | 2 +- .../optimization_application_variables.cpp | 2 +- .../optimization_application_variables.h | 2 +- .../python_scripts/filtering/helmholtz_solver_base.py | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/applications/OptimizationApplication/custom_python/optimization_python_application.cpp b/applications/OptimizationApplication/custom_python/optimization_python_application.cpp index 0bb58388b6ca..808f62757341 100644 --- a/applications/OptimizationApplication/custom_python/optimization_python_application.cpp +++ b/applications/OptimizationApplication/custom_python/optimization_python_application.cpp @@ -175,7 +175,7 @@ PYBIND11_MODULE(KratosOptimizationApplication, m) KRATOS_REGISTER_IN_PYTHON_VARIABLE(m, HELMHOLTZ_SCALAR ); KRATOS_REGISTER_IN_PYTHON_VARIABLE(m, HELMHOLTZ_SCALAR_SOURCE ); KRATOS_REGISTER_IN_PYTHON_VARIABLE(m, HELMHOLTZ_RADIUS ); - KRATOS_REGISTER_IN_PYTHON_VARIABLE(m, NUMBER_OF_HELMHOLTZ_FILTERS); + KRATOS_REGISTER_IN_PYTHON_VARIABLE(m, NUMBER_OF_SOLVERS_USING_NODES); KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(m, HELMHOLTZ_VECTOR); KRATOS_REGISTER_IN_PYTHON_3D_VARIABLE_WITH_COMPONENTS(m, HELMHOLTZ_VECTOR_SOURCE); KRATOS_REGISTER_IN_PYTHON_VARIABLE(m, ELEMENT_STRAIN_ENERGY ); diff --git a/applications/OptimizationApplication/optimization_application.cpp b/applications/OptimizationApplication/optimization_application.cpp index dee4b9b3a8b1..7dd669fe4fbc 100644 --- a/applications/OptimizationApplication/optimization_application.cpp +++ b/applications/OptimizationApplication/optimization_application.cpp @@ -189,7 +189,7 @@ namespace Kratos KRATOS_REGISTER_VARIABLE(HELMHOLTZ_RADIUS); KRATOS_REGISTER_VARIABLE(HELMHOLTZ_SCALAR); KRATOS_REGISTER_VARIABLE(HELMHOLTZ_SCALAR_SOURCE); - KRATOS_REGISTER_VARIABLE(NUMBER_OF_HELMHOLTZ_FILTERS); + KRATOS_REGISTER_VARIABLE(NUMBER_OF_SOLVERS_USING_NODES); KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS( HELMHOLTZ_VECTOR); KRATOS_REGISTER_3D_VARIABLE_WITH_COMPONENTS( HELMHOLTZ_VECTOR_SOURCE); diff --git a/applications/OptimizationApplication/optimization_application_variables.cpp b/applications/OptimizationApplication/optimization_application_variables.cpp index 6221e2a5747a..f44cec48d1ad 100644 --- a/applications/OptimizationApplication/optimization_application_variables.cpp +++ b/applications/OptimizationApplication/optimization_application_variables.cpp @@ -142,7 +142,7 @@ namespace Kratos KRATOS_CREATE_VARIABLE( double, HELMHOLTZ_RADIUS); KRATOS_CREATE_VARIABLE( double, HELMHOLTZ_SCALAR); KRATOS_CREATE_VARIABLE( double, HELMHOLTZ_SCALAR_SOURCE); - KRATOS_CREATE_VARIABLE( int, NUMBER_OF_HELMHOLTZ_FILTERS); + KRATOS_CREATE_VARIABLE( int, NUMBER_OF_SOLVERS_USING_NODES); KRATOS_CREATE_3D_VARIABLE_WITH_COMPONENTS( HELMHOLTZ_VECTOR); KRATOS_CREATE_3D_VARIABLE_WITH_COMPONENTS( HELMHOLTZ_VECTOR_SOURCE); diff --git a/applications/OptimizationApplication/optimization_application_variables.h b/applications/OptimizationApplication/optimization_application_variables.h index 4f4d3ad4c6cf..90d5d4231341 100644 --- a/applications/OptimizationApplication/optimization_application_variables.h +++ b/applications/OptimizationApplication/optimization_application_variables.h @@ -171,7 +171,7 @@ namespace Kratos KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, HELMHOLTZ_RADIUS); KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, HELMHOLTZ_SCALAR); KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, double, HELMHOLTZ_SCALAR_SOURCE); - KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, int, NUMBER_OF_HELMHOLTZ_FILTERS); + KRATOS_DEFINE_APPLICATION_VARIABLE(OPTIMIZATION_APPLICATION, int, NUMBER_OF_SOLVERS_USING_NODES); KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS( OPTIMIZATION_APPLICATION, HELMHOLTZ_VECTOR); KRATOS_DEFINE_3D_APPLICATION_VARIABLE_WITH_COMPONENTS( OPTIMIZATION_APPLICATION, HELMHOLTZ_VECTOR_SOURCE); diff --git a/applications/OptimizationApplication/python_scripts/filtering/helmholtz_solver_base.py b/applications/OptimizationApplication/python_scripts/filtering/helmholtz_solver_base.py index 6b6191a5d60a..76768eb257c0 100644 --- a/applications/OptimizationApplication/python_scripts/filtering/helmholtz_solver_base.py +++ b/applications/OptimizationApplication/python_scripts/filtering/helmholtz_solver_base.py @@ -243,7 +243,7 @@ def PrepareModelPart(self) -> str: # the model part needs to be created. self.__helmholtz_model_part = self.model.CreateModelPart(computing_model_part_name) KOA.OptimizationUtils.CopySolutionStepVariablesList(self.__helmholtz_model_part, self.GetOriginRootModelPart()) - self.GetOriginModelPart()[KOA.NUMBER_OF_HELMHOLTZ_FILTERS] = 1 + self.GetOriginModelPart()[KOA.NUMBER_OF_SOLVERS_USING_NODES] = 1 # now fill with the appropriate elements and conditions self._FillComputingModelPart() @@ -259,10 +259,10 @@ def __IncrementModelPartUsageCounter(self) -> None: # in here, the origin model part and its parents are updated. This is because, # the computing model part shares nodes with the origin model part. def increase_counter(model_part: KM.ModelPart) -> None: - if model_part.Has(KOA.NUMBER_OF_HELMHOLTZ_FILTERS): - model_part[KOA.NUMBER_OF_HELMHOLTZ_FILTERS] += 1 + if model_part.Has(KOA.NUMBER_OF_SOLVERS_USING_NODES): + model_part[KOA.NUMBER_OF_SOLVERS_USING_NODES] += 1 else: - model_part[KOA.NUMBER_OF_HELMHOLTZ_FILTERS] = 1 + model_part[KOA.NUMBER_OF_SOLVERS_USING_NODES] = 1 current_model_part = self.GetOriginModelPart() increase_counter(current_model_part)