diff --git a/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp b/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp index b707e3e79703..2ce29608bcb3 100644 --- a/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp +++ b/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.cpp @@ -21,7 +21,7 @@ namespace Kratos::Python { -void AddCustomUtilitiesToPython(pybind11::module& rModule) +void AddCustomUtilitiesToPython(const pybind11::module& rModule) { pybind11::class_(rModule, "NodeUtilities") .def("AssignUpdatedVectorVariableToNonFixedComponentsOfNodes", diff --git a/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.h b/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.h index 4c814194dc1f..dd9edb7f77c6 100644 --- a/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.h +++ b/applications/GeoMechanicsApplication/custom_python/add_custom_utilities_to_python.h @@ -25,7 +25,7 @@ namespace Kratos::Python { -void AddCustomUtilitiesToPython(pybind11::module& rModule); +void AddCustomUtilitiesToPython(const pybind11::module& rModule); } // namespace Kratos::Python. diff --git a/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp b/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp index 9c763019a3f1..4447f27177fc 100644 --- a/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp +++ b/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.cpp @@ -339,10 +339,8 @@ std::shared_ptr KratosGeoSettlement::MakeStrategyWrapper(const GetMainModelPart().CloneTimeStep(); if (rProjectParameters["solver_settings"]["reset_displacements"].GetBool()) { - constexpr auto source_index = std::size_t{0}; - constexpr auto destination_index = std::size_t{1}; - RestoreValuesOfNodalVariable(DISPLACEMENT, source_index, destination_index); - RestoreValuesOfNodalVariable(ROTATION, source_index, destination_index); + ResetValuesOfNodalVariable(DISPLACEMENT); + ResetValuesOfNodalVariable(ROTATION); VariableUtils{}.UpdateCurrentToInitialConfiguration(GetComputationalModelPart().Nodes()); } diff --git a/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.h b/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.h index d0700c825625..42c84579fc4c 100644 --- a/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.h +++ b/applications/GeoMechanicsApplication/custom_workflows/dgeosettlement.h @@ -74,7 +74,7 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) KratosGeoSettlement const std::stringstream& rKratosLogBuffer) const; template - void RestoreValuesOfNodalVariable(const TVariableType& rVariable, Node::IndexType SourceIndex, Node::IndexType DestinationIndex) + void ResetValuesOfNodalVariable(const TVariableType& rVariable) { if (!GetComputationalModelPart().HasNodalSolutionStepVariable(rVariable)) return;