00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 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 __MEDNORMALIZEDUNSTRUCTUREDMESH_HXX__ 00021 #define __MEDNORMALIZEDUNSTRUCTUREDMESH_HXX__ 00022 00023 #include "INTERPKERNELDefines.hxx" 00024 #include "NormalizedUnstructuredMesh.hxx" 00025 00026 namespace MEDMEM 00027 { 00028 class MESH; 00029 } 00030 00031 template<int SPACEDIM,int MESHDIM> 00032 class MEDNormalizedUnstructuredMesh : public INTERP_KERNEL::GenericMesh 00033 { 00034 public: 00035 static const int MY_SPACEDIM=SPACEDIM; 00036 static const int MY_MESHDIM=MESHDIM; 00037 typedef int MyConnType; 00038 static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_FORTRAN_MODE; 00039 public: 00040 MEDNormalizedUnstructuredMesh(const MEDMEM::MESH *mesh); 00041 ~MEDNormalizedUnstructuredMesh(); 00042 void getBoundingBox(double *boundingBox) const; 00043 INTERP_KERNEL::NormalizedCellType getTypeOfElement(int eltId) const; 00044 unsigned char getNumberOfNodesOfElement(int eltId) const; 00045 unsigned long getNumberOfElements() const; 00046 unsigned long getNumberOfNodes() const; 00047 const int *getConnectivityPtr() const; 00048 const double *getCoordinatesPtr() const; 00049 const int *getConnectivityIndexPtr() const; 00050 void releaseTempArrays(); 00051 protected: 00052 void prepare(); 00053 protected: 00054 const MEDMEM::MESH *_meshInMedMode; 00055 int *_conn_for_interp; 00056 bool _own_conn_for_interp; 00057 int *_conn_index_for_interp; 00058 bool _own_conn_index_for_interp; 00059 }; 00060 00061 #endif