From b7159cd4e690ec34762b6b808e99167947d3576e Mon Sep 17 00:00:00 2001 From: Vicente Mataix Ferrandiz Date: Wed, 2 Apr 2025 13:05:38 +0200 Subject: [PATCH 1/9] [IO] Improve comments and add new partitioning information in PartitioningInfo struct --- kratos/includes/io.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index 6ba39356d6a7..d595a4dd89ac 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -4,8 +4,8 @@ // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // -// License: BSD License -// Kratos default license: kratos/license.txt +// License: BSD License +// Kratos default license: kratos/license.txt // // Main authors: Pooyan Dadvand // @@ -13,8 +13,6 @@ #pragma once // System includes -#include -#include #include // External includes @@ -98,17 +96,21 @@ class KRATOS_API(KRATOS_CORE) IO typedef DenseMatrix GraphType; - // auxiliary struct containg information about the partitioning of the entities in a ModelPart + // Auxiliary struct containing information about the partitioning of the entities in a ModelPart struct PartitioningInfo { GraphType Graph; - PartitionIndicesType NodesPartitions; // partition where the Node is local - PartitionIndicesType ElementsPartitions; // partition where the Element is local - PartitionIndicesType ConditionsPartitions; // partition where the Condition is local - PartitionIndicesContainerType NodesAllPartitions; // partitions, in which the Node is present (local & ghost) - PartitionIndicesContainerType ElementsAllPartitions; // partitions, in which the Element is present (local & ghost) - PartitionIndicesContainerType ConditionsAllPartitions; // partitions, in which the Condition is present (local & ghost) - }; + PartitionIndicesType NodesPartitions; // Partition where the Node is local + PartitionIndicesType ElementsPartitions; // Partition where the Element is local + PartitionIndicesType ConditionsPartitions; // Partition where the Condition is local + PartitionIndicesType ConstraintsPartitions; // Partition where the MasterSlaveConstraint is local + PartitionIndicesType GeometriesPartitions; // Partition where the Geometry is local + PartitionIndicesContainerType NodesAllPartitions; // Partitions, in which the Node is present (local & ghost) + PartitionIndicesContainerType ElementsAllPartitions; // Partitions, in which the Element is present (local & ghost) + PartitionIndicesContainerType ConditionsAllPartitions; // Partitions, in which the Condition is present (local & ghost) + PartitionIndicesContainerType ConstraintsAllPartitions; // Partitions, in which the MasterSlaveConstraint is present (local & ghost) + PartitionIndicesContainerType GeometriesAllPartitions; // Partitions, in which the Geometry is present (local & ghost) + };; ///@} ///@name Life Cycle From ff9d50d9daf227101690105f808c9f87e748cfde Mon Sep 17 00:00:00 2001 From: Vicente Mataix Ferrandiz Date: Wed, 2 Apr 2025 19:30:37 +0200 Subject: [PATCH 2/9] Add methods to read master-slave constraints and geometries from sub-model parts --- kratos/includes/io.h | 65 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index d595a4dd89ac..9e486515882b 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -566,22 +566,79 @@ class KRATOS_API(KRATOS_CORE) IO KRATOS_ERROR << "Calling base class method (DivideInputToPartitions). Please check the definition of derived class" << std::endl; } + /** + * @brief Virtual method to read element and condition IDs from a sub-model part. + * @details This method is intended to be overridden by derived classes. + * @param rModelPartName The name of the sub-model part to read from. + * @param rElementsIds Set to store element IDs. + * @param rConditionsIds Set to store condition IDs. + */ virtual void ReadSubModelPartElementsAndConditionsIds( std::string const& rModelPartName, - std::unordered_set &rElementsIds, - std::unordered_set &rConditionsIds) + std::unordered_set& rElementsIds, + std::unordered_set& rConditionsIds) { KRATOS_ERROR << "Calling base class method (ReadSubModelPartElementsAndConditionsIds). Please check the definition of derived class" << std::endl; } + /** + * @brief Virtual method to read element, condition, master-slave constraint, and geometry IDs from a sub-model part. + * @details This method is intended to be overridden by derived classes. + * @param rModelPartName The name of the sub-model part to read from. + * @param rElementsIds Set to store element IDs. + * @param rConditionsIds Set to store condition IDs. + * @param rMasterSlaveConstraintIds Set to store master-slave constraint IDs. + * @param rGeometriesIds Set to store geometry IDs. + */ + virtual void ReadSubModelPartElementsAndConditionsIds( + std::string const& rModelPartName, + std::unordered_set& rElementsIds, + std::unordered_set& rConditionsIds, + std::unordered_set& rMasterSlaveConstraintIds, + std::unordered_set& rGeometriesIds) + { + KRATOS_WARNING("ReadSubModelPartElementsAndConditionsIds") << " The method ReadSubModelPartElementsAndConditionsIds with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; + return ReadSubModelPartElementsAndConditionsIds(rModelPartName, rElementsIds, rConditionsIds); + } + + /** + * @brief Virtual method to read nodal graph from entities list. + * @details This method is intended to be overridden by derived classes. + * @param rAuxConnectivities Container of connectivities. + * @param rElementsIds Set of element IDs. + * @param rConditionsIds Set of condition IDs. + * @return The size of the nodal graph. + */ virtual std::size_t ReadNodalGraphFromEntitiesList( ConnectivitiesContainerType& rAuxConnectivities, - std::unordered_set &rElementsIds, - std::unordered_set &rConditionsIds) + std::unordered_set& rElementsIds, + std::unordered_set& rConditionsIds) { KRATOS_ERROR << "Calling base class method (ReadNodalGraphFromEntitiesList). Please check the definition of derived class" << std::endl; } + /** + * @brief Virtual method to read nodal graph from entities list including master-slave constraints and geometries. + * @details This method is intended to be overridden by derived classes. + * @param rAuxConnectivities Container of connectivities. + * @param rElementsIds Set of element IDs. + * @param rConditionsIds Set of condition IDs. + * @param rMasterSlaveConstraintIds Set of master-slave constraint IDs. + * @param rGeometriesIds Set of geometry IDs. + * @return The size of the nodal graph. + */ + virtual std::size_t ReadNodalGraphFromEntitiesList( + ConnectivitiesContainerType& rAuxConnectivities, + std::unordered_set& rElementsIds, + std::unordered_set& rConditionsIds, + std::unordered_set& rMasterSlaveConstraintIds, + std::unordered_set& rGeometriesIds + ) + { + KRATOS_WARNING("ReadNodalGraphFromEntitiesList") << " The method ReadNodalGraphFromEntitiesList with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; + return ReadNodalGraphFromEntitiesList(rAuxConnectivities, rElementsIds, rConditionsIds); + } + ///@} ///@name Access ///@{ From b96a59b4cdfb765e354e8fb798fc759bfdfa31c6 Mon Sep 17 00:00:00 2001 From: Vicente Mataix Ferrandiz Date: Thu, 3 Apr 2025 11:15:15 +0200 Subject: [PATCH 3/9] Fix method signatures in IO header for consistency and clarity --- kratos/includes/io.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index 9e486515882b..ca8fe9d0b433 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -576,7 +576,8 @@ class KRATOS_API(KRATOS_CORE) IO virtual void ReadSubModelPartElementsAndConditionsIds( std::string const& rModelPartName, std::unordered_set& rElementsIds, - std::unordered_set& rConditionsIds) + std::unordered_set& rConditionsIds + ) { KRATOS_ERROR << "Calling base class method (ReadSubModelPartElementsAndConditionsIds). Please check the definition of derived class" << std::endl; } @@ -595,7 +596,8 @@ class KRATOS_API(KRATOS_CORE) IO std::unordered_set& rElementsIds, std::unordered_set& rConditionsIds, std::unordered_set& rMasterSlaveConstraintIds, - std::unordered_set& rGeometriesIds) + std::unordered_set& rGeometriesIds + ) { KRATOS_WARNING("ReadSubModelPartElementsAndConditionsIds") << " The method ReadSubModelPartElementsAndConditionsIds with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; return ReadSubModelPartElementsAndConditionsIds(rModelPartName, rElementsIds, rConditionsIds); @@ -612,7 +614,8 @@ class KRATOS_API(KRATOS_CORE) IO virtual std::size_t ReadNodalGraphFromEntitiesList( ConnectivitiesContainerType& rAuxConnectivities, std::unordered_set& rElementsIds, - std::unordered_set& rConditionsIds) + std::unordered_set& rConditionsIds + ) { KRATOS_ERROR << "Calling base class method (ReadNodalGraphFromEntitiesList). Please check the definition of derived class" << std::endl; } From 75b797b6c868d647a6c657c777be0e301a31e0df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Mataix=20Ferr=C3=A1ndiz?= Date: Tue, 13 May 2025 19:18:08 +0200 Subject: [PATCH 4/9] Renaming --- kratos/includes/io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index ca8fe9d0b433..c8b8766f7763 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -591,7 +591,7 @@ class KRATOS_API(KRATOS_CORE) IO * @param rMasterSlaveConstraintIds Set to store master-slave constraint IDs. * @param rGeometriesIds Set to store geometry IDs. */ - virtual void ReadSubModelPartElementsAndConditionsIds( + virtual void ReadSubModelPartEntitiesIds( std::string const& rModelPartName, std::unordered_set& rElementsIds, std::unordered_set& rConditionsIds, From 49fde34349f79c85900ddd59263603cb5e1f9f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Mataix=20Ferr=C3=A1ndiz?= Date: Tue, 13 May 2025 19:23:02 +0200 Subject: [PATCH 5/9] Update --- kratos/includes/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index c8b8766f7763..64c29409c301 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -599,7 +599,7 @@ class KRATOS_API(KRATOS_CORE) IO std::unordered_set& rGeometriesIds ) { - KRATOS_WARNING("ReadSubModelPartElementsAndConditionsIds") << " The method ReadSubModelPartElementsAndConditionsIds with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; + KRATOS_WARNING("IO") << " The method ReadSubModelPartEntitiesIds with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; return ReadSubModelPartElementsAndConditionsIds(rModelPartName, rElementsIds, rConditionsIds); } @@ -638,7 +638,7 @@ class KRATOS_API(KRATOS_CORE) IO std::unordered_set& rGeometriesIds ) { - KRATOS_WARNING("ReadNodalGraphFromEntitiesList") << " The method ReadNodalGraphFromEntitiesList with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; + KRATOS_WARNING("IO") << " The method ReadNodalGraphFromEntitiesList with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; return ReadNodalGraphFromEntitiesList(rAuxConnectivities, rElementsIds, rConditionsIds); } From 2c7454f435ce5b590ab713f97c7b61962e822083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Mataix=20Ferr=C3=A1ndiz?= Date: Tue, 13 May 2025 20:58:28 +0200 Subject: [PATCH 6/9] Missing --- kratos/includes/io.h | 95 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 81 insertions(+), 14 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index 64c29409c301..444c9b180cc4 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -70,31 +70,50 @@ class KRATOS_API(KRATOS_CORE) IO KRATOS_DEFINE_LOCAL_FLAG( MESH_ONLY ); KRATOS_DEFINE_LOCAL_FLAG( SCIENTIFIC_PRECISION ); - typedef Node NodeType; + /// Node type definition + using NodeType = Node; - typedef Geometry GeometryType; + /// Geometry type definition + using GeometryType = Geometry; - typedef Mesh MeshType; + /// Mesh type definition + using MeshType = Mesh; - typedef MeshType::NodesContainerType NodesContainerType; + /// Nodes container type within MeshType + using NodesContainerType = typename MeshType::NodesContainerType; - typedef MeshType::PropertiesContainerType PropertiesContainerType; + /// Properties container type within MeshType + using PropertiesContainerType = typename MeshType::PropertiesContainerType; - typedef ModelPart::GeometryContainerType GeometryContainerType; + /// Geometry container type within ModelPart + using GeometryContainerType = typename ModelPart::GeometryContainerType; - typedef MeshType::ElementsContainerType ElementsContainerType; + /// The geometry map type within ModelPart + using GeometriesMapType = typename ModelPart::GeometriesMapType; - typedef MeshType::ConditionsContainerType ConditionsContainerType; + /// Elements container type within MeshType + using ElementsContainerType = typename MeshType::ElementsContainerType; - typedef std::vector > ConnectivitiesContainerType; + /// Conditions container type within MeshType + using ConditionsContainerType = typename MeshType::ConditionsContainerType; - typedef std::vector > PartitionIndicesContainerType; + /// MasterSlaveConstraint container type within MeshType + using MasterSlaveConstraintContainerType = typename MeshType::MasterSlaveConstraintContainerType; - typedef std::vector PartitionIndicesType; + /// Connectivities container type + using ConnectivitiesContainerType = std::vector>; - typedef std::size_t SizeType; + /// Partition indices container type + using PartitionIndicesContainerType = std::vector>; - typedef DenseMatrix GraphType; + /// Partition indices type + using PartitionIndicesType = std::vector; + + /// Size type definition + using SizeType = std::size_t; + + /// Graph type definition + using GraphType = DenseMatrix; // Auxiliary struct containing information about the partitioning of the entities in a ModelPart struct PartitioningInfo @@ -351,6 +370,54 @@ class KRATOS_API(KRATOS_CORE) IO KRATOS_ERROR << "Calling base class method (WriteConditions). Please check the definition of derived class" << std::endl; } + /** + * @brief Reads the master-slave constraints from an input source. + * @details This method is intended to be overridden by derived classes to implement + * the specific logic for reading master-slave constraints into the provided + * container. The base class implementation throws an error, indicating that + * the method must be implemented in the derived class. + * @param rThisNodes The nodes to be used for associating the master-slave constraints. + * @param rMasterSlaveConstraintContainer The container where the master-slave + * constraints will be stored. This container is expected to be populated + * by the derived class implementation. + * @throws Exception If the base class method is called directly, an error is + * thrown to indicate that the method must be implemented in a derived class. + */ + virtual void ReadMasterSlaveConstraints( + NodesContainerType& rThisNodes, + MasterSlaveConstraintContainerType& rMasterSlaveConstraintContainer + ) + { + KRATOS_ERROR << "Calling base class method (ReadNewMasterSlaveConstraint). Please check the definition of derived class" << std::endl; + } + + /** + * @brief This method reads the constraints connectivities + * @param rConditionsConnectivities The constraints connectivities + * @return The number of constraints + */ + virtual std::size_t ReadMasterSlaveConstraintsConnectivities(ConnectivitiesContainerType& rMasterSlaveConstraintsConnectivities) + { + KRATOS_ERROR << "Calling base class method (ReadMasterSlaveConstraintsConnectivities). Please check the definition of derived class" << std::endl; + } + + /** + * @brief Writes the master-slave constraints to the output. + * @details This method is intended to be overridden by derived classes to provide + * specific functionality for writing master-slave constraints. The base + * class implementation throws an error, indicating that the method must + * be implemented in the derived class. + * @param rMasterSlaveConstraintContainer The container holding the master-slave + * constraints to be written. + * @throws Exception Always throws an error if called on the base class. + * Derived classes must override this method to provide the actual + * implementation. + */ + virtual void WriteMasterSlaveConstraints(MasterSlaveConstraintContainerType const& rMasterSlaveConstraintContainer) + { + KRATOS_ERROR << "Calling base class method (WriteNewMasterSlaveConstraint). Please check the definition of derived class" << std::endl; + } + /** * @brief This method reads the initial values of the model part * @param rThisModelPart The model part with the initial values to be read @@ -781,4 +848,4 @@ inline std::ostream& operator << (std::ostream& rOStream, ///@} -} // namespace Kratos. +} // namespace Kratos. \ No newline at end of file From 100ad6b2e8f0e55f033754dd88d17e8c2106bdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Mataix=20Ferr=C3=A1ndiz?= Date: Wed, 14 May 2025 11:16:56 +0200 Subject: [PATCH 7/9] Missing --- kratos/includes/io.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index 444c9b180cc4..ba028ea74eba 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -370,6 +370,23 @@ class KRATOS_API(KRATOS_CORE) IO KRATOS_ERROR << "Calling base class method (WriteConditions). Please check the definition of derived class" << std::endl; } + /** + * @brief Reads a new master-slave constraint. + * @details This method is intended to be overridden in derived classes. The base class implementation + * produces an error message indicating that the derived class should provide its own implementation. + * @param rThisNodes The container holding the nodes involved in the constraint. + * @param pThisMasterSlaveConstraint A pointer to the master-slave constraint object that will be read. + * @note Calling this base class method will trigger an error. Ensure that the method is properly defined + * in any derived class. + */ + virtual void ReadNewMasterSlaveConstraint( + NodesContainerType& rThisNodes, + MasterSlaveConstraint::Pointer& pThisMasterSlaveConstraint + ) + { + KRATOS_ERROR << "Calling base class method (ReadNewMasterSlaveConstraint). Please check the definition of derived class" << std::endl; + } + /** * @brief Reads the master-slave constraints from an input source. * @details This method is intended to be overridden by derived classes to implement @@ -388,7 +405,7 @@ class KRATOS_API(KRATOS_CORE) IO MasterSlaveConstraintContainerType& rMasterSlaveConstraintContainer ) { - KRATOS_ERROR << "Calling base class method (ReadNewMasterSlaveConstraint). Please check the definition of derived class" << std::endl; + KRATOS_ERROR << "Calling base class method (ReadMasterSlaveConstraints). Please check the definition of derived class" << std::endl; } /** From 1bca5cc0c8d96a2f7bba64e21c8f0b67fbb36cb8 Mon Sep 17 00:00:00 2001 From: Vicente Mataix Ferrandiz Date: Mon, 26 May 2025 19:05:25 +0200 Subject: [PATCH 8/9] Refactor IO class methods to use generic constraint terminology --- kratos/includes/io.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index ba028ea74eba..0bf4ed9302f7 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -375,16 +375,16 @@ class KRATOS_API(KRATOS_CORE) IO * @details This method is intended to be overridden in derived classes. The base class implementation * produces an error message indicating that the derived class should provide its own implementation. * @param rThisNodes The container holding the nodes involved in the constraint. - * @param pThisMasterSlaveConstraint A pointer to the master-slave constraint object that will be read. + * @param pThisConstraint A pointer to the master-slave constraint object that will be read. * @note Calling this base class method will trigger an error. Ensure that the method is properly defined * in any derived class. */ - virtual void ReadNewMasterSlaveConstraint( + virtual void ReadNewConstraint( NodesContainerType& rThisNodes, - MasterSlaveConstraint::Pointer& pThisMasterSlaveConstraint + MasterSlaveConstraint::Pointer& pThisConstraint ) { - KRATOS_ERROR << "Calling base class method (ReadNewMasterSlaveConstraint). Please check the definition of derived class" << std::endl; + KRATOS_ERROR << "Calling base class method (ReadNewConstraint). Please check the definition of derived class" << std::endl; } /** @@ -394,18 +394,18 @@ class KRATOS_API(KRATOS_CORE) IO * container. The base class implementation throws an error, indicating that * the method must be implemented in the derived class. * @param rThisNodes The nodes to be used for associating the master-slave constraints. - * @param rMasterSlaveConstraintContainer The container where the master-slave + * @param rConstraintContainer The container where the master-slave * constraints will be stored. This container is expected to be populated * by the derived class implementation. * @throws Exception If the base class method is called directly, an error is * thrown to indicate that the method must be implemented in a derived class. */ - virtual void ReadMasterSlaveConstraints( + virtual void ReadConstraints( NodesContainerType& rThisNodes, - MasterSlaveConstraintContainerType& rMasterSlaveConstraintContainer + MasterSlaveConstraintContainerType& rConstraintContainer ) { - KRATOS_ERROR << "Calling base class method (ReadMasterSlaveConstraints). Please check the definition of derived class" << std::endl; + KRATOS_ERROR << "Calling base class method (ReadConstraints). Please check the definition of derived class" << std::endl; } /** @@ -413,9 +413,9 @@ class KRATOS_API(KRATOS_CORE) IO * @param rConditionsConnectivities The constraints connectivities * @return The number of constraints */ - virtual std::size_t ReadMasterSlaveConstraintsConnectivities(ConnectivitiesContainerType& rMasterSlaveConstraintsConnectivities) + virtual std::size_t ReadConstraintsConnectivities(ConnectivitiesContainerType& rConstraintsConnectivities) { - KRATOS_ERROR << "Calling base class method (ReadMasterSlaveConstraintsConnectivities). Please check the definition of derived class" << std::endl; + KRATOS_ERROR << "Calling base class method (ReadConstraintsConnectivities). Please check the definition of derived class" << std::endl; } /** @@ -424,15 +424,15 @@ class KRATOS_API(KRATOS_CORE) IO * specific functionality for writing master-slave constraints. The base * class implementation throws an error, indicating that the method must * be implemented in the derived class. - * @param rMasterSlaveConstraintContainer The container holding the master-slave + * @param rConstraintContainer The container holding the master-slave * constraints to be written. * @throws Exception Always throws an error if called on the base class. * Derived classes must override this method to provide the actual * implementation. */ - virtual void WriteMasterSlaveConstraints(MasterSlaveConstraintContainerType const& rMasterSlaveConstraintContainer) + virtual void WriteConstraints(MasterSlaveConstraintContainerType const& rConstraintContainer) { - KRATOS_ERROR << "Calling base class method (WriteNewMasterSlaveConstraint). Please check the definition of derived class" << std::endl; + KRATOS_ERROR << "Calling base class method (WriteNewConstraint). Please check the definition of derived class" << std::endl; } /** @@ -672,18 +672,18 @@ class KRATOS_API(KRATOS_CORE) IO * @param rModelPartName The name of the sub-model part to read from. * @param rElementsIds Set to store element IDs. * @param rConditionsIds Set to store condition IDs. - * @param rMasterSlaveConstraintIds Set to store master-slave constraint IDs. + * @param rConstraintIds Set to store master-slave constraint IDs. * @param rGeometriesIds Set to store geometry IDs. */ virtual void ReadSubModelPartEntitiesIds( std::string const& rModelPartName, std::unordered_set& rElementsIds, std::unordered_set& rConditionsIds, - std::unordered_set& rMasterSlaveConstraintIds, + std::unordered_set& rConstraintIds, std::unordered_set& rGeometriesIds ) { - KRATOS_WARNING("IO") << " The method ReadSubModelPartEntitiesIds with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; + KRATOS_WARNING("IO") << " The method ReadSubModelPartEntitiesIds with Constraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; return ReadSubModelPartElementsAndConditionsIds(rModelPartName, rElementsIds, rConditionsIds); } @@ -710,7 +710,7 @@ class KRATOS_API(KRATOS_CORE) IO * @param rAuxConnectivities Container of connectivities. * @param rElementsIds Set of element IDs. * @param rConditionsIds Set of condition IDs. - * @param rMasterSlaveConstraintIds Set of master-slave constraint IDs. + * @param rConstraintIds Set of master-slave constraint IDs. * @param rGeometriesIds Set of geometry IDs. * @return The size of the nodal graph. */ @@ -718,11 +718,11 @@ class KRATOS_API(KRATOS_CORE) IO ConnectivitiesContainerType& rAuxConnectivities, std::unordered_set& rElementsIds, std::unordered_set& rConditionsIds, - std::unordered_set& rMasterSlaveConstraintIds, + std::unordered_set& rConstraintIds, std::unordered_set& rGeometriesIds ) { - KRATOS_WARNING("IO") << " The method ReadNodalGraphFromEntitiesList with MasterSlaveConstraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; + KRATOS_WARNING("IO") << " The method ReadNodalGraphFromEntitiesList with Constraint and Geometries is not implemented. Only the elements and conditions are read." << std::endl; return ReadNodalGraphFromEntitiesList(rAuxConnectivities, rElementsIds, rConditionsIds); } From e53dea21fba9be26c6be91526e868090cf2cf739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20Mataix=20Ferr=C3=A1ndiz?= Date: Wed, 28 May 2025 23:53:12 +0200 Subject: [PATCH 9/9] Remove unused --- kratos/includes/io.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/kratos/includes/io.h b/kratos/includes/io.h index 0bf4ed9302f7..772d73e061ba 100644 --- a/kratos/includes/io.h +++ b/kratos/includes/io.h @@ -370,23 +370,6 @@ class KRATOS_API(KRATOS_CORE) IO KRATOS_ERROR << "Calling base class method (WriteConditions). Please check the definition of derived class" << std::endl; } - /** - * @brief Reads a new master-slave constraint. - * @details This method is intended to be overridden in derived classes. The base class implementation - * produces an error message indicating that the derived class should provide its own implementation. - * @param rThisNodes The container holding the nodes involved in the constraint. - * @param pThisConstraint A pointer to the master-slave constraint object that will be read. - * @note Calling this base class method will trigger an error. Ensure that the method is properly defined - * in any derived class. - */ - virtual void ReadNewConstraint( - NodesContainerType& rThisNodes, - MasterSlaveConstraint::Pointer& pThisConstraint - ) - { - KRATOS_ERROR << "Calling base class method (ReadNewConstraint). Please check the definition of derived class" << std::endl; - } - /** * @brief Reads the master-slave constraints from an input source. * @details This method is intended to be overridden by derived classes to implement