Back to index

salome-med  6.5.0
MEDMEM_ConnectZone.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // File: MEDMEM_ConnectZone.hxx  Author: Nadir Bouhamou (CEA Saclay)
00024 //
00025 # ifndef __CONNECTZONE_HXX__
00026 # define __CONNECTZONE_HXX__
00027 
00028 #include "MEDMEM.hxx"
00029 
00030 // few STL include files
00031 #include <map>
00032 
00033 // few Med Memory include files
00034 #include "MEDMEM_STRING.hxx"
00035 #include "MEDMEM_define.hxx"
00036 #include "MEDMEM_Mesh.hxx"
00037 #include "MEDMEM_SkyLineArray.hxx"
00038 
00039 namespace MEDMEM {
00040 class MEDMEM_EXPORT CONNECTZONE
00041 {
00042 private :
00043   string _name;
00044   string _description;
00045   int _localDomainNumber;
00046   int _distantDomainNumber;
00047 
00048   MEDMEM::MESH * _localMesh;
00049   MEDMEM::MESH * _distantMesh;
00050 
00051   MEDMEM::MEDSKYLINEARRAY * _nodeCorresp;
00052   MEDMEM::MEDSKYLINEARRAY * _faceCorresp;
00053   
00054   map < pair <MED_EN::medEntityMesh, MED_EN::medEntityMesh>,
00055                                      MEDMEM::MEDSKYLINEARRAY * > 
00056   _entityCorresp;
00057 
00058 public :
00059   CONNECTZONE();
00060   ~CONNECTZONE();
00061   CONNECTZONE(const CONNECTZONE & myConnectZone);
00062 
00063   string getName() const ;
00064   string getDescription() const ;
00065   int getDistantDomainNumber() const ;
00066   int getLocalDomainNumber() const ;
00067   MEDMEM::MESH * getLocalMesh() const ;
00068   MEDMEM::MESH * getDistantMesh() const ;
00069 
00070   bool isEntityCorrespPresent(MED_EN::medEntityMesh localEntity,
00071                               MED_EN::medEntityMesh distantEntity) const;
00072   const int * getNodeCorrespIndex() const;
00073   const int * getNodeCorrespValue() const;
00074   int getNodeNumber() const;
00075   const int * getFaceCorrespIndex() const;
00076   const int * getFaceCorrespValue() const;
00077   int getFaceNumber() const;
00078   const int * getEntityCorrespIndex(MED_EN::medEntityMesh localEntity,
00079                                     MED_EN::medEntityMesh distantEntity) const;
00080   const int * getEntityCorrespValue(MED_EN::medEntityMesh localEntity,
00081                                     MED_EN::medEntityMesh distantEntity) const;
00082   int getEntityCorrespNumber(MED_EN::medEntityMesh localEntity,
00083                   MED_EN::medEntityMesh distantEntity) const;
00084   int getEntityCorrespLength(MED_EN::medEntityMesh localEntity,
00085                   MED_EN::medEntityMesh distantEntity) const;
00086   void setName(string name) ;
00087   void setDescription(string description) ;
00088   void setDistantDomainNumber(int distantDomainNumber) ;
00089   void setLocalDomainNumber(int distantDomainNumber) ;
00090   void setLocalMesh(MEDMEM::MESH * localMesh) ;
00091   void setDistantMesh(MEDMEM::MESH * distantMesh) ;
00092 
00093   void setNodeCorresp(int * nodeCorresp, int nbnode);
00094   void setNodeCorresp(MEDMEM::MEDSKYLINEARRAY* array);
00095   void setFaceCorresp(int * faceCorresp, int nbface);
00096   void setFaceCorresp(MEDMEM::MEDSKYLINEARRAY* array);
00097   void setEntityCorresp(MED_EN::medEntityMesh localEntity,
00098                         MED_EN::medEntityMesh distantEntity,
00099                         int * entityCorresp, int nbentity);
00100   void setEntityCorresp(MED_EN::medEntityMesh localEntity,
00101                         MED_EN::medEntityMesh distantEntity,
00102                         MEDMEM::MEDSKYLINEARRAY* array);
00103 };
00104 }
00105 # endif