Back to index

salome-med  6.5.0
MEDPARTITIONER_Topology.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 
00020 #ifndef __MEDPARTITIONER_TOPOLOGY_HXX__
00021 #define __MEDPARTITIONER_TOPOLOGY_HXX__
00022 
00023 #include <map>
00024 #include <vector>
00025 
00026 namespace ParaMEDMEM
00027 {
00028   class MEDCouplingUMesh;
00029 }
00030 
00031 namespace MEDPARTITIONER
00032 {
00033   class Graph;
00034   class ConnectZone;
00035   class SkyLineArray;
00036   class MeshCollection;
00037   class MEDPARTITIONER_FaceModel;
00038     
00039   class Topology
00040   {
00041   public:
00042     Topology() { }
00043     Topology(std::vector<ParaMEDMEM::MEDCouplingUMesh*>, std::vector<MEDPARTITIONER::ConnectZone*>) { }
00044     virtual ~Topology() { }
00045     
00049     virtual void convertGlobalNodeList(const int *list, int nb, int *local, int*ip) = 0;
00050     virtual void convertGlobalNodeList(const int *list, int nb, int *local, int ip) = 0;
00051     //converts a list of global node numbers
00053     virtual void convertGlobalCellList(const int*list , int nb, int *local, int*ip) = 0;
00054     
00058      virtual void convertGlobalFaceList(const int*list , int nb, int* local, int*ip) = 0;
00059     virtual void convertGlobalFaceList(const int*list , int nb, int* local, int ip) = 0;
00060     virtual void convertGlobalFaceListWithTwins(const int *face_list, int nbface, int*& local, int*& ip, int*& full_array, int& size) = 0;
00061     virtual void convertGlobalNodeListWithTwins(const int *face_list, int nbnode, int*& local, int*& ip, int*& full_array, int& size) = 0;
00063     virtual int nbDomain() const = 0;
00065     virtual int nbCells() const = 0;
00067     virtual int nbNodes() const = 0;
00069     virtual int nbCells(int idomain) const = 0;
00071     virtual void convertToLocal2ndVersion(int*,int,int) = 0;
00072     virtual int convertNodeToGlobal(int ip,int icell) const = 0;
00073     virtual int convertFaceToGlobal(int ip,int icell) const = 0;
00074     virtual int convertCellToGlobal(int ip,int icell) const = 0;
00075     virtual void convertNodeToGlobal(int ip,const int *local, int n, int *global) const = 0;
00076     virtual void convertCellToGlobal(int ip,const int *local, int n, int *global) const = 0;
00077     virtual void convertFaceToGlobal(int ip,const int *local, int n, int *global) const = 0;
00079     virtual int getNodeNumber(int idomain) const = 0;
00080     virtual int getNodeNumber() const = 0;
00082     virtual void getNodeList(int idomain, int *list) const = 0;
00083     virtual std::vector<int> & getFusedCellNumbers(int idomain) = 0;
00084     virtual const std::vector<int> & getFusedCellNumbers(int idomain) const = 0;
00085     virtual std::vector<int> & getFusedFaceNumbers(int idomain) = 0;
00086     virtual const std::vector<int> & getFusedFaceNumbers(int idomain) const = 0;
00088     virtual int getCellNumber(int idomain) const = 0;
00090     virtual void getCellList(int idomain, int *list) const = 0;
00092     virtual int getFaceNumber(int idomain) const = 0;
00093     virtual int getFaceNumber() const = 0;
00095     virtual void getFaceList(int idomain, int *list) const = 0;
00097     virtual void appendFace(int idomain, int ilocal, int iglobal) = 0;
00099     virtual int getMaxGlobalFace() const = 0;
00101     virtual std::pair<int,int> convertGlobalCell(int iglobal) const = 0;
00103     virtual int convertGlobalFace(int iglobal, int idomain) = 0;
00105     virtual int convertGlobalNode(int iglobal, int idomain) = 0;
00106   };
00107 }
00108 
00109 #endif