Back to index

salome-med  6.5.0
GMESHClient.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 #ifndef _GMESHCLIENT_HXX
00024 #define _GMESHCLIENT_HXX
00025 
00026 #include "MEDClient.hxx"
00027 
00028 #include <SALOMEconfig.h>
00029 #include <utilities.h>
00030 #include "MEDMEM_GMesh.hxx"
00031 #include CORBA_CLIENT_HEADER(MED)
00032 
00033 namespace MEDMEM {
00034 class MESHClient;
00035 
00036 class MEDCLIENT_EXPORT GMESHClient : public GMESH
00037 {
00038 private :
00039 
00040   const SALOME_MED::GMESH_var IOR_Mesh;
00041 
00042   mutable bool _complete;
00043   
00044   //mutable int _refCounter;
00045   MESHClient* _uMesh;
00046 
00047 public :
00048 
00049   GMESHClient(const SALOME_MED::GMESH_ptr m);
00050   virtual bool operator==(const GMESH& other) const;
00051 
00052   void blankCopy();
00053   void fillCopy();
00054 //   virtual void addReference() const;
00055 //   virtual void removeReference() const;
00056   virtual void write(int index=0) const;
00057   virtual void write(const GENDRIVER & genDriver,
00058                      MED_EN::med_mode_acces medMode=MED_EN::WRONLY) const;
00059   virtual void write(driverTypes        driverType,
00060                      const std::string& filename,
00061                      const std::string& meshname="",
00062                      MED_EN::med_mode_acces medMode=MED_EN::WRONLY) const;
00063   virtual void printMySelf(ostream &os) const;
00064 
00065   virtual bool isEmpty() const;
00066   virtual bool deepCompare(const GMESH&) const;
00067   virtual int getMeshDimension() const;
00068   virtual bool getIsAGrid() const;
00069   virtual std::string getCoordinatesSystem() const;
00070   virtual const std::string* getCoordinatesNames() const;
00071   virtual const std::string* getCoordinatesUnits() const;
00072   virtual int getNumberOfNodes() const;
00073   virtual int getNumberOfTypes(MED_EN::medEntityMesh) const;
00074   virtual int getNumberOfElements(MED_EN::medEntityMesh, MED_EN::medGeometryElement) const;
00075   virtual const MED_EN::medGeometryElement* getTypes(MED_EN::medEntityMesh) const;
00076   virtual MED_EN::medGeometryElement getElementType(MED_EN::medEntityMesh, int) const;
00077   virtual const MESH* convertInMESH() const;
00078   virtual SUPPORT* getBoundaryElements(MED_EN::medEntityMesh) const throw (MEDEXCEPTION);
00079   virtual SUPPORT* getSkin(const SUPPORT*) throw (MEDEXCEPTION);
00080   virtual SUPPORT* buildSupportOnNodeFromElementList(const std::list<int>&, MED_EN::medEntityMesh) const throw (MEDEXCEPTION);
00081   virtual void fillSupportOnNodeFromElementList(const std::list<int>&, SUPPORT*) const throw (MEDEXCEPTION);
00082   virtual FIELD<double>* getVolume(const SUPPORT*, bool) const throw (MEDEXCEPTION);
00083   virtual FIELD<double>* getArea(const SUPPORT*) const throw (MEDEXCEPTION);
00084   virtual FIELD<double>* getLength(const SUPPORT*) const throw (MEDEXCEPTION);
00085   virtual FIELD<double>* getNormal(const SUPPORT*) const throw (MEDEXCEPTION);
00086   virtual FIELD<double>* getBarycenter(const SUPPORT*) const throw (MEDEXCEPTION);
00087   virtual std::vector<std::vector<double> > getBoundingBox() const;
00088 
00089 private:
00090   virtual ~GMESHClient();
00091 };
00092 }
00093 
00094 #endif
00095