1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef SequentialTOPOLOGY_HXX_
20 #define SequentialTOPOLOGY_HXX_
22 #include "MEDSPLITTER.hxx"
24 namespace MEDSPLITTER {
25 class SequentialTopology:public Topology
31 SequentialTopology(std::vector<MEDMEM::MESH*>, std::vector<MEDMEM::CONNECTZONE*>);
33 //!converts a list of global cell numbers
34 //!to a distributed array with local cell numbers
35 void convertGlobalNodeList(const int*, int,int*,int*);
37 //!converts a list of global node numbers
38 //!to a distributed array with local cell numbers
39 void convertGlobalCellList(const int*, int , int*, int *);
47 //number of cells on a specific domain
48 int nbCells(int idomain) const;
50 //!creating node mapping
51 void createNodeMapping(vector<int*> type_connectivity,int* present_type_numbers, int idomain);
53 //!converting node global numberings to local numberings
54 void convertToLocal(vector<int*> type_connectivity,int* present_type_numbers);
56 //!retrieving number of nodes
57 int getNodeNumber(int idomain) const ;
59 //!retrieving list of nodes
60 void getNodeList(int idomain, int* list) const;
62 //!retrieving number of cells
63 int getCellNumber(int idomain) const ;
65 //!retrieving list of cells
66 void getCellList(int idomain, int* list) const;
69 //!mapping global -> local
70 map<int,pair<int,int> > m_glob_to_loc;
72 //!mapping local -> global
73 map<pair<int,int>,int> m_loc_to_glob;
75 //!mapping global -> local
76 multimap<int,pair<int,int> > m_node_glob_to_loc;
78 //!mapping local -> global
79 map<pair<int,int>,int> m_node_loc_to_glob;
81 vector<int> m_nb_cells;
83 vector<int> m_nb_nodes;
90 #endif /*SequentialTOPOLOGY_HXX_*/