X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_MeshCollection.hxx;h=aa5d9b15a64e08ee1414014934d3605e1626c94c;hb=662a2a2393a25baef77e42f74204b11b70a9646c;hp=7f7ad1316ea6c0eda61a04ad6bf9b8597fb16469;hpb=ec2cb33155cef66242cfd257d2bfd2e50ee99170;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx index 7f7ad1316..aa5d9b15a 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollection.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,6 +23,7 @@ #include "MEDPARTITIONER.hxx" #include "MEDPARTITIONER_Graph.hxx" #include "MEDPARTITIONER_Utils.hxx" +#include "MEDCouplingSkyLineArray.hxx" #include #include @@ -30,7 +31,7 @@ #include "BBTree.txx" -namespace ParaMEDMEM +namespace MEDCoupling { class MEDCouplingUMesh; class DataArrayInt; @@ -46,7 +47,7 @@ namespace MEDPARTITIONER class JointFinder; typedef enum{MedAscii, MedXml, Undefined} DriverType; - typedef std::multimap, std::pair > NodeMapping ; + typedef std::multimap, std::pair > NodeMapping ; typedef std::vector > NodeList; class MEDPARTITIONER_EXPORT MeshCollection @@ -73,9 +74,9 @@ namespace MEDPARTITIONER void setDriverType(MEDPARTITIONER::DriverType type) { _driver_type=type; } //creation of the cell graph - void buildCellGraph(ParaMEDMEM::MEDCouplingSkyLineArray* & array,int *& edgeweights ); + void buildCellGraph(MEDCoupling::MEDCouplingSkyLineArray* & array,int *& edgeweights ); //creation of the cell graph - void buildParallelCellGraph(ParaMEDMEM::MEDCouplingSkyLineArray* & array,int *& edgeweights ); + void buildParallelCellGraph(MEDCoupling::MEDCouplingSkyLineArray* & array,int *& edgeweights ); //creation and partition of the associated graph Topology* createPartition(int nbdomain, Graph::splitter_type type = Graph::METIS, @@ -87,29 +88,29 @@ namespace MEDPARTITIONER //getting mesh dimension int getMeshDimension() const; int getNbOfLocalMeshes() const; - int getNbOfGlobalMeshes() const { return _mesh.size(); } - int getNbOfLocalCells() const; - int getNbOfLocalFaces() const; + int getNbOfGlobalMeshes() const { return (int)_mesh.size(); } + mcIdType getNbOfLocalCells() const; + mcIdType getNbOfLocalFaces() const; //getting a reference to mesh vector - std::vector& getMesh(); - std::vector& getFaceMesh(); - std::vector >& getGroupMeshes(); + std::vector& getMesh(); + std::vector& getFaceMesh(); + std::vector >& getGroupMeshes(); - ParaMEDMEM::MEDCouplingUMesh* getMesh(int idomain) const; - ParaMEDMEM::MEDCouplingUMesh* getFaceMesh(int idomain); - std::vector& getGroupMeshes(int idomain); + MEDCoupling::MEDCouplingUMesh* getMesh(int idomain) const; + MEDCoupling::MEDCouplingUMesh* getFaceMesh(int idomain); + std::vector& getGroupMeshes(int idomain); - std::vector& getCellFamilyIds() { return _cell_family_ids; } - std::vector& getFaceFamilyIds() { return _face_family_ids; } + std::vector& getCellFamilyIds() { return _cell_family_ids; } + std::vector& getFaceFamilyIds() { return _face_family_ids; } - std::map& getMapDataArrayInt() { return _map_dataarray_int; } - std::map& getMapDataArrayDouble() { return _map_dataarray_double; } + std::map& getMapDataArrayInt() { return _map_dataarray_int; } + std::map& getMapDataArrayDouble() { return _map_dataarray_double; } - std::map& getFamilyInfo() { return _family_info; } + std::map& getFamilyInfo() { return _family_info; } std::map >& getGroupInfo() { return _group_info; } - ParaMEDMEM::DataArrayDouble* getField(std::string descriptionField, int iold); + MEDCoupling::DataArrayDouble* getField(std::string descriptionField, int iold); std::vector& getFieldDescriptions() { return _field_descriptions; } void prepareFieldDescriptions(); void filterFaceOnCell(); @@ -138,50 +139,50 @@ namespace MEDPARTITIONER //creates the node mapping between an old collection and the present one void createNodeMapping(MeshCollection& initialCollection, - std::multimap,std::pair >& nodeMapping); + std::multimap,std::pair >& nodeMapping); void castCellMeshes(MeshCollection& initialCollection, - std::vector > >& new2oldIds, - std::vector & o2nRenumber); + std::vector > >& new2oldIds, + std::vector & o2nRenumber); //creates faces on the new collection void castFaceMeshes(MeshCollection& initialCollection, - const std::multimap, std::pair >& nodeMapping, - std::vector > >& new2oldIds); + const std::multimap, std::pair >& nodeMapping, + std::vector > >& new2oldIds); //constructing connect zones void buildConnectZones( const NodeMapping& nodeMapping, - const std::vector & o2nRenumber, + const std::vector & o2nRenumber, int nbInitialDomains ); // Find faces common with neighbor domains and put them in groups void buildBoundaryFaces(); private: - void castIntField(std::vector& meshesCastFrom, - std::vector& meshesCastTo, - std::vector& arrayFrom, + void castIntField(std::vector& meshesCastFrom, + std::vector& meshesCastTo, + std::vector& arrayFrom, std::string nameArrayTo); void castAllFields(MeshCollection& initialCollection, std::string nameArrayTo); - void findCommonDistantNodes(std::vector > >& commonDistantNodes); + void findCommonDistantNodes(std::vector > >& commonDistantNodes); void remapIntField(int inew, int iold, - const ParaMEDMEM::MEDCouplingUMesh& sourceMesh, - const ParaMEDMEM::MEDCouplingUMesh& targetMesh, - const int* fromArray, + const MEDCoupling::MEDCouplingUMesh& sourceMesh, + const MEDCoupling::MEDCouplingUMesh& targetMesh, + const mcIdType* fromArray, std::string nameArrayTo, const BBTreeOfDim* tree); void remapDoubleField(int inew, int iold, - ParaMEDMEM::DataArrayDouble* fromArray, + MEDCoupling::DataArrayDouble* fromArray, std::string nameArrayTo, std::string descriptionField); - void createJointGroup( const std::vector< int >& faces, + void createJointGroup( const std::vector< mcIdType >& faces, const int inew1, const int inew2, const bool is2nd ); @@ -200,29 +201,29 @@ namespace MEDPARTITIONER ParaDomainSelector* _domain_selector; //links to meshes - std::vector _mesh; - std::vector _face_mesh; + std::vector _mesh; + std::vector _face_mesh; //index of a non empty mesh within _mesh (in parallel mode all of meshes can be empty) int _i_non_empty_mesh; //family ids storages - std::vector _cell_family_ids; - std::vector _face_family_ids; + std::vector _cell_family_ids; + std::vector _face_family_ids; //DataArrayInt* storages - std::map _map_dataarray_int; + std::map _map_dataarray_int; //DataArrayDouble* storages - std::map _map_dataarray_double; + std::map _map_dataarray_double; //fields to be partitioned std::vector _field_descriptions; //group family conversion - std::map _family_info; + std::map _family_info; std::map > _group_info; - //list of groups that are not to be splitted + //list of groups that are not to be split std::vector _indivisible_regions; //name of global mesh