3 #if !defined(KRATOS_RENUMBERING_NODES_UTILITY)
4 #define KRATOS_RENUMBERING_NODES_UTILITY
14 #include "pybind11/stl.h"
27 mListOfModelParts.push_back(&mp1);
28 std::map<int,int> aux_map;
29 mListOfMapsOfIdsNewToOld.push_back(aux_map);
33 mListOfModelParts.push_back(&mp2);
34 std::map<int,int> aux_map;
35 mListOfMapsOfIdsNewToOld.push_back(aux_map);
39 mListOfModelParts.push_back(&mp3);
40 std::map<int,int> aux_map;
41 mListOfMapsOfIdsNewToOld.push_back(aux_map);
45 mListOfModelParts.push_back(&mp4);
46 std::map<int,int> aux_map;
47 mListOfMapsOfIdsNewToOld.push_back(aux_map);
51 mListOfModelParts.push_back(&mp5);
52 std::map<int,int> aux_map;
53 mListOfMapsOfIdsNewToOld.push_back(aux_map);
61 for (
int i = 0;
i < (
int)mListOfModelParts.size(); ++
i){
63 std::map<int,int>& new_to_old = mListOfMapsOfIdsNewToOld[
i];
67 auto it = it_node_begin +
j;
68 new_to_old[id] = it->Id();
76 for (
int i = 0;
i < (
int)mListOfModelParts.size(); ++
i){
78 std::map<int, int>& new_to_old = mListOfMapsOfIdsNewToOld[
i];
82 auto it = it_node_begin +
j;
83 it->SetId(new_to_old[it->Id()]);
90 for (
int i = 0;
i < (
int)mListOfModelParts.size(); ++
i){
92 std::map<int, int>& new_to_old = mListOfMapsOfIdsNewToOld[
i];
96 auto it = it_elem_begin +
j;
97 new_to_old[id] = it->Id();
105 for (
int i = 0;
i < (
int)mListOfModelParts.size(); ++
i){
107 std::map<int, int>& new_to_old = mListOfMapsOfIdsNewToOld[
i];
111 auto it = it_elem_begin +
j;
112 it->SetId(new_to_old[it->Id()]);
120 std::vector<ModelPart*> mListOfModelParts;
121 std::vector<std::map<int, int>> mListOfMapsOfIdsNewToOld;
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
Definition: renumbering_model_parts_utility.h:20
void UndoRenumber()
Definition: renumbering_model_parts_utility.h:75
void UndoRenumberElements()
Definition: renumbering_model_parts_utility.h:104
RenumberingNodesUtility(ModelPart &mp1, ModelPart &mp2, ModelPart &mp3, ModelPart &mp4)
Definition: renumbering_model_parts_utility.h:44
KRATOS_CLASS_POINTER_DEFINITION(RenumberingNodesUtility)
virtual ~RenumberingNodesUtility()
Definition: renumbering_model_parts_utility.h:57
RenumberingNodesUtility(ModelPart &mp1, ModelPart &mp2, ModelPart &mp3, ModelPart &mp4, ModelPart &mp5)
Definition: renumbering_model_parts_utility.h:50
RenumberingNodesUtility(ModelPart &mp1, ModelPart &mp2)
Definition: renumbering_model_parts_utility.h:32
RenumberingNodesUtility(ModelPart &mp1)
Definition: renumbering_model_parts_utility.h:26
void Renumber()
Definition: renumbering_model_parts_utility.h:59
void RenumberElements()
Definition: renumbering_model_parts_utility.h:88
RenumberingNodesUtility(ModelPart &mp1, ModelPart &mp2, ModelPart &mp3)
Definition: renumbering_model_parts_utility.h:38
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17