Salome HOME
debug: forget of TRI6
[tools/medcoupling.git] / src / ParaMEDMEM / ParaMESH.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef __PARAMESH_HXX__
20 #define __PARAMESH_HXX__
21
22 #include "MEDCouplingUMesh.hxx"
23 #include "ProcessorGroup.hxx"
24
25 #include <string>
26 #include <vector>
27
28 namespace ParaMEDMEM
29 {
30   class Topology;
31   class BlockTopology;
32   class DataArrayInt;
33
34   class ParaMESH
35   {
36   public:
37     ParaMESH( MEDCouplingUMesh *subdomain_mesh,
38               MEDCouplingUMesh *subdomain_face,
39               DataArrayInt *CorrespElt_local2global,
40               DataArrayInt *CorrespFace_local2global,
41               DataArrayInt *CorrespNod_local2global,
42               const ProcessorGroup& proc_group ) ;
43     ParaMESH( MEDCouplingUMesh *mesh,
44               const ProcessorGroup& proc_group, const std::string& name);
45
46     virtual ~ParaMESH();
47     Topology* getTopology() const { return _explicit_topology; }
48     bool isStructured() const { return _cell_mesh->isStructured(); }
49     MEDCouplingUMesh *getCellMesh() const { return _cell_mesh; }
50     MEDCouplingUMesh *getFaceMesh() const { return _face_mesh; }
51     BlockTopology* getBlockTopology() const { return _block_topology; }
52
53     const int* getGlobalNumberingNode() const { return _node_global->getPointer(); } 
54     const int* getGlobalNumberingFace() const { return _face_global->getPointer(); } 
55     const int* getGlobalNumberingCell() const { return _cell_global->getPointer(); } 
56
57   private:
58     //mesh object underlying the ParaMESH object
59     MEDCouplingUMesh *_cell_mesh ;
60     MEDCouplingUMesh *_face_mesh ;
61
62     //id of the local grid
63     int _my_domain_id;
64
65     //global topology of the cells
66     ParaMEDMEM::BlockTopology* _block_topology;
67     Topology*  _explicit_topology;
68     // pointers to global numberings
69     DataArrayInt* _node_global;
70     DataArrayInt* _face_global;
71     DataArrayInt* _cell_global;
72   };
73 }
74
75 #endif