Version: 6.3.1

src/MEDLoader/MEDFileMeshElt.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 __MEDFILEMESHELT_HXX__
00021 #define __MEDFILEMESHELT_HXX__
00022 
00023 #include "MEDCouplingMemArray.hxx"
00024 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
00025 
00026 #include "NormalizedUnstructuredMesh.hxx"
00027 
00028 extern "C"
00029 {
00030 #include "med.h"
00031 }
00032 
00033 namespace ParaMEDMEM
00034 {
00035   class MEDCouplingUMesh;
00036 
00037   class MEDFileUMeshPerType : public RefCountObject
00038   {
00039   public:
00040     static MEDFileUMeshPerType *New(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType geoElt2);
00041     static bool isExisting(med_idt fid, const char *mName, int dt, int it, med_geometry_type geoElt, med_entity_type& whichEntity);
00042     int getDim() const;
00043     const DataArrayInt *getNodal() const { return _conn; }
00044     const DataArrayInt *getNodalIndex() const { return _conn_index; }
00045     const DataArrayInt *getFam() const { return _fam; }
00046     const DataArrayInt *getNum() const { return _num; }
00047     static void write(med_idt fid, const char *mname, int mdim, const MEDCouplingUMesh *m, const DataArrayInt *fam, const DataArrayInt *num);
00048   private:
00049     MEDFileUMeshPerType(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
00050                         med_entity_type entity);
00051     void loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
00052                             med_entity_type entity);
00053     void loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, int arraySize, med_geometry_type geoElt,
00054                    med_entity_type entity);
00055     void loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, int connFaceLgth, med_geometry_type geoElt,
00056                    med_entity_type entity);
00057   private:
00058     MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _conn;
00059     MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _conn_index;
00060     MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _num;
00061     MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _fam;
00062     INTERP_KERNEL::NormalizedCellType _type;
00063     med_entity_type _entity;
00064   };
00065 }
00066 
00067 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS