]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Addition of the 2 new unstructured mesh types.
authorageay <ageay>
Wed, 7 Aug 2013 12:42:16 +0000 (12:42 +0000)
committerageay <ageay>
Wed, 7 Aug 2013 12:42:16 +0000 (12:42 +0000)
src/MEDCoupling/MEDCoupling1GTUMesh.cxx
src/MEDCoupling/MEDCoupling1GTUMesh.hxx
src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.cxx
src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.hxx

index 484ed7aeab16fd68e23ceca625d94ad43a2d5eef..02d38fd91c750a4d7307d58a935f42ba04fb6414 100644 (file)
 
 using namespace ParaMEDMEM;
 
+MEDCoupling1GTUMesh::MEDCoupling1GTUMesh()
+{
+}
+
 MEDCoupling1GTUMesh::MEDCoupling1GTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm):_cm(&cm)
 {
   setName(name);
@@ -465,6 +469,15 @@ MEDCoupling1SGTUMesh::MEDCoupling1SGTUMesh(const char *name, const INTERP_KERNEL
 {
 }
 
+MEDCoupling1SGTUMesh::MEDCoupling1SGTUMesh()
+{
+}
+
+MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New()
+{
+  return new MEDCoupling1SGTUMesh;
+}
+
 MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
 {
   if(type==INTERP_KERNEL::NORM_ERROR)
@@ -1682,6 +1695,11 @@ MEDCoupling1DGTUMesh *MEDCoupling1SGTUMesh::computeDualMesh2D() const throw(INTE
 
 //== 
 
+MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New()
+{
+  return new MEDCoupling1DGTUMesh;
+}
+
 MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
 {
   if(type==INTERP_KERNEL::NORM_ERROR)
@@ -1695,6 +1713,10 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const char *name, INTERP_KERNEL:
   return new MEDCoupling1DGTUMesh(name,cm);
 }
 
+MEDCoupling1DGTUMesh::MEDCoupling1DGTUMesh()
+{
+}
+
 MEDCoupling1DGTUMesh::MEDCoupling1DGTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm):MEDCoupling1GTUMesh(name,cm)
 {
 }
index 690a2c37e8c26b1edb6e0188aaeb1e7faa5335d3..8a8cb16d4f7a6c958fc5e1f530102bd30629ca72 100644 (file)
@@ -73,8 +73,9 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT virtual DataArrayInt *getNodalConnectivity() const throw(INTERP_KERNEL::Exception) = 0;
     MEDCOUPLING_EXPORT virtual void checkCoherencyOfConnectivity() const throw(INTERP_KERNEL::Exception) = 0;
   protected:
-    MEDCOUPLING_EXPORT MEDCoupling1GTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
-    MEDCOUPLING_EXPORT MEDCoupling1GTUMesh(const MEDCoupling1GTUMesh& other, bool recDeepCpy);
+    MEDCoupling1GTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
+    MEDCoupling1GTUMesh(const MEDCoupling1GTUMesh& other, bool recDeepCpy);
+    MEDCoupling1GTUMesh();
   protected:
     const INTERP_KERNEL::CellModel *_cm;
   };
@@ -86,6 +87,8 @@ namespace ParaMEDMEM
   public:
     MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception);
+    //! useless constructor only for CORBA -> not swigged
+    MEDCOUPLING_EXPORT static MEDCoupling1SGTUMesh *New();
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *clone(bool recDeepCpy) const;
     MEDCOUPLING_EXPORT MEDCouplingPointSet *deepCpyConnectivityOnly() const throw(INTERP_KERNEL::Exception);
     // overload of TimeLabel and RefCountObject
@@ -140,8 +143,9 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT MEDCoupling1GTUMesh *computeDualMesh() const throw(INTERP_KERNEL::Exception);
   private:
-    MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
-    MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh(const MEDCoupling1SGTUMesh& other, bool recDeepCpy);
+    MEDCoupling1SGTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
+    MEDCoupling1SGTUMesh(const MEDCoupling1SGTUMesh& other, bool recDeepCpy);
+    MEDCoupling1SGTUMesh();
   private:
     void checkNonDynamicGeoType() const throw(INTERP_KERNEL::Exception);
     static MEDCoupling1SGTUMesh *Merge1SGTUMeshesLL(std::vector<const MEDCoupling1SGTUMesh *>& a) throw(INTERP_KERNEL::Exception);
@@ -160,6 +164,8 @@ namespace ParaMEDMEM
   public:
     MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New(const MEDCouplingUMesh *m) throw(INTERP_KERNEL::Exception);
+    //! useless constructor only for CORBA -> not swigged
+    MEDCOUPLING_EXPORT static MEDCoupling1DGTUMesh *New();
     MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *clone(bool recDeepCpy) const;
     MEDCOUPLING_EXPORT MEDCouplingPointSet *deepCpyConnectivityOnly() const throw(INTERP_KERNEL::Exception);
     // overload of TimeLabel and RefCountObject
@@ -218,8 +224,9 @@ namespace ParaMEDMEM
     MEDCOUPLING_EXPORT static std::vector<int> BuildAPolygonFromParts(const std::vector< std::vector<int> >& parts) throw(INTERP_KERNEL::Exception);
     MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
   private:
-    MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
-    MEDCOUPLING_EXPORT MEDCoupling1DGTUMesh(const MEDCoupling1DGTUMesh& other, bool recDeepCpy);
+    MEDCoupling1DGTUMesh(const char *name, const INTERP_KERNEL::CellModel& cm);
+    MEDCoupling1DGTUMesh(const MEDCoupling1DGTUMesh& other, bool recDeepCpy);
+    MEDCoupling1DGTUMesh();
   private:
     void checkDynamicGeoT2ype() const throw(INTERP_KERNEL::Exception);
     static MEDCoupling1DGTUMesh *Merge1DGTUMeshesLL(std::vector<const MEDCoupling1DGTUMesh *>& a) throw(INTERP_KERNEL::Exception);
index b75dab8d00ce5feace8bf60d8834a19794c18edc..49cae918fc8e4f61b083862935548527eb7a5fc5 100644 (file)
@@ -22,6 +22,9 @@
 #include "MEDCouplingMeshFieldFactoryComponent.hxx"
 #include "MEDCouplingUMesh.hxx"
 #include "MEDCouplingUMeshClient.hxx"
+#include "MEDCoupling1GTUMesh.hxx"
+#include "MEDCoupling1SGTUMeshClient.hxx"
+#include "MEDCoupling1DGTUMeshClient.hxx"
 #include "MEDCouplingExtrudedMesh.hxx"
 #include "MEDCouplingExtrudedMeshClient.hxx"
 #include "MEDCouplingCMesh.hxx"
@@ -217,6 +220,30 @@ void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingCurveLine
   meshFromDistant->decrRef();
 }
 
+void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching1SGTUMesh()
+{
+  SALOME_MED::MEDCoupling1SGTUMeshCorbaInterface_ptr meshPtr=_objC->get1SGTUMesh();
+  ParaMEDMEM::MEDCoupling1SGTUMesh *meshFromDistant=ParaMEDMEM::MEDCoupling1SGTUMeshClient::New(meshPtr);
+  meshPtr->UnRegister();
+  CORBA::release(meshPtr);
+  ParaMEDMEM::MEDCoupling1SGTUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1SGTUMesh();
+  CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
+  meshRef->decrRef();
+  meshFromDistant->decrRef();
+}
+
+void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetching1DGTUMesh()
+{
+  SALOME_MED::MEDCoupling1DGTUMeshCorbaInterface_ptr meshPtr=_objC->get1DGTUMesh();
+  ParaMEDMEM::MEDCoupling1DGTUMesh *meshFromDistant=ParaMEDMEM::MEDCoupling1DGTUMeshClient::New(meshPtr);
+  meshPtr->UnRegister();
+  CORBA::release(meshPtr);
+  ParaMEDMEM::MEDCoupling1DGTUMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::build1DGTUMesh();
+  CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
+  meshRef->decrRef();
+  meshFromDistant->decrRef();
+}
+
 void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaField2DNTFetching()
 {
   SALOME_MED::MEDCouplingFieldDoubleCorbaInterface_ptr fieldPtr=_objC->getFieldScalarOn2DNT();
index 775d812cfc10c6c61c334e48a9b77a8e099f8ce6..59770bf64855806684bb68baf3dd943527183329 100644 (file)
@@ -53,6 +53,8 @@ namespace SALOME_TEST
     CPPUNIT_TEST( checkCorbaFetchingExtruded );
     CPPUNIT_TEST( checkCorbaFetchingCMesh );
     CPPUNIT_TEST( checkCorbaFetchingCurveLinearMesh );
+    CPPUNIT_TEST( checkCorbaFetching1SGTUMesh );
+    CPPUNIT_TEST( checkCorbaFetching1DGTUMesh );
     CPPUNIT_TEST( checkCorbaField2DNTFetching );
     CPPUNIT_TEST( checkCorbaField2DNTMultiFetching );
     CPPUNIT_TEST( checkCorbaField2DNTMultiFetchingMT );
@@ -95,6 +97,8 @@ namespace SALOME_TEST
     void checkCorbaFetchingExtruded();
     void checkCorbaFetchingCMesh();
     void checkCorbaFetchingCurveLinearMesh();
+    void checkCorbaFetching1SGTUMesh();
+    void checkCorbaFetching1DGTUMesh();
     void checkCorbaField2DNTFetching();
     void checkCorbaField2DNTMultiFetching();
     void checkCorbaField2DNTMultiFetchingMT();