Back to index

salome-med  6.5.0
MEDSPLITTER_SequentialTopology.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 #ifndef SequentialTOPOLOGY_HXX_
00020 #define SequentialTOPOLOGY_HXX_
00021 
00022 #include "MEDSPLITTER.hxx"
00023 
00024 namespace MEDSPLITTER {
00025   class SequentialTopology:public Topology
00026   {
00027 
00028   public:
00029 
00030     SequentialTopology();
00031     SequentialTopology(std::vector<MEDMEM::MESH*>, std::vector<MEDMEM::CONNECTZONE*>);
00032 
00035     void convertGlobalNodeList(const int*, int,int*,int*);
00036 
00039     void convertGlobalCellList(const int*, int , int*, int *);
00040 
00041     //number of doamins
00042     int nbDomain() const;
00043 
00044     //number of cells
00045     int nbCells() const;
00046 
00047     //number of cells on a specific domain
00048     int nbCells(int idomain) const;
00049 
00051     void createNodeMapping(vector<int*> type_connectivity,int* present_type_numbers, int idomain);
00052 
00054     void convertToLocal(vector<int*> type_connectivity,int* present_type_numbers);
00055 
00057     int getNodeNumber(int idomain) const ;
00058 
00060     void getNodeList(int idomain, int* list) const;
00061 
00063     int getCellNumber(int idomain) const ;
00064 
00066     void getCellList(int idomain, int* list) const;
00067 
00068   private:
00070     map<int,pair<int,int> > m_glob_to_loc;
00071 
00073     map<pair<int,int>,int> m_loc_to_glob;
00074 
00076     multimap<int,pair<int,int> > m_node_glob_to_loc;
00077 
00079     map<pair<int,int>,int> m_node_loc_to_glob;
00080 
00081     vector<int> m_nb_cells;
00082 
00083     vector<int> m_nb_nodes;
00084 
00085     int m_nb_total_cells;
00086 
00087     int m_nb_total_nodes;
00088   };
00089 }
00090 #endif /*SequentialTOPOLOGY_HXX_*/