Get Newly Created or Existing Model Parts List With Common Reference Entities Between Reference List And Examined List.
This method returns newly created or gets an existing sub-model part in each model part in rReferenceModelParts with entities common between that model part and all the model parts in rExaminedModelPartsList with following entities.
- If AreNodesConsidered is made to true, then common nodes are found and added to the resulting sub-model part.
- If AreConditionsConsidered is made to true, then common conditions are found and added to the resulting sub-model part. All the nodes belonging to added conditions are also added to the sub-model part.
- If AreElementsConsidered is made to true, then common elements are found and added to the resulting sub-model part. All the nodes belonging to added elements are also added to the sub-model part.
- If AreNeighboursConsidered is made to true, then first common nodes are found. Then neighbour conditions (if AreConditionsConsidered is set to true) and elements (if AreElementsConsidered is set to true) for those common nodes are found and added to the sub-model part. All nodes belonging to added conditions and elements are also added to the sub-model part.
The created sub-model part is only populated with the entities from the refrence model part. Hence, to find common conditions and elements, each entity from each model part in rExaminedModelPartsList is searched within each of the model parts in rReferenceModelParts.
This method creates the sub-model parts with unique name generated for all the input arguments. If it finds an existing sub-model part with the same name, then it is retrieved. Hence this method only creates these model parts with expensive operations only one. If it is required to force create, then the sub-model parts should be removed. All the sub-model parts created by this method have names starting with "<OPTIMIZATION_APP_AUTO>" so it is easier to search and remove them if required.
This method keeps the communicator types, process info, properties and tables as same as the rReferenceModelParts. The local mesh, interface mesh and ghost meshes are properly updated. Hence this method is compatible with OpenMP and MPI.
This method does not create or destroy nodes, conditions and elements.
- Parameters
-
rExaminedModelPartsList | List of input model parts where the entities are searched between. |
rReferenceModelParts | List of reference model parts where common entities are added to output model parts. |
AreNodesConsidered | If true, common nodes from reference model parts are added to output model parts. |
AreConditionsConsidered | If true, common conditions from reference model parts are added to output model parts. |
AreElementsConsidered | If true, common elements from reference model parts are added to output model parts. |
AreNeighboursConsidered | If true, neighbour conditions and elements from reference model parts for common nodes are added to output model parts. |
EchoLevel | Echo level for printing info. |
- Returns
- std::vector<ModelPart*> List of output model parts.