Salome HOME
Now deal with Cylindric, Spheric coordinates for UMesh, CLMesh, And only Cylindric...
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
index 6926805aebff562030f0e6c9adf97c161ae4e017..6a6f64d0ea51c7fbb14e413c8bfbe848c2007e46 100644 (file)
 
 %module MEDCoupling
 
+#ifdef WITH_DOCSTRINGS
+%include MEDCoupling_doc.i
+#endif
+
 %include std_vector.i
 %include std_string.i
 
@@ -44,6 +48,7 @@
 #include "MEDCouplingAMRAttribute.hxx"
 #include "MEDCouplingMatrix.hxx"
 #include "MEDCouplingPartDefinition.hxx"
+#include "MEDCouplingSkyLineArray.hxx"
 #include "MEDCouplingTypemaps.i"
 
 #include "InterpKernelAutoPtr.hxx"
@@ -225,6 +230,7 @@ using namespace INTERP_KERNEL;
 %newobject ParaMEDMEM::MEDCouplingFieldDouble::getValueOnMulti;
 %newobject ParaMEDMEM::MEDCouplingFieldTemplate::New;
 %newobject ParaMEDMEM::MEDCouplingMesh::deepCpy;
+%newobject ParaMEDMEM::MEDCouplingMesh::clone;
 %newobject ParaMEDMEM::MEDCouplingMesh::checkDeepEquivalOnSameNodesWith;
 %newobject ParaMEDMEM::MEDCouplingMesh::checkTypeConsistencyAndContig;
 %newobject ParaMEDMEM::MEDCouplingMesh::computeNbOfNodesPerCell;
@@ -260,11 +266,11 @@ using namespace INTERP_KERNEL;
 %newobject ParaMEDMEM::MEDCouplingPointSet::getBoundingBoxForBBTree;
 %newobject ParaMEDMEM::MEDCouplingPointSet::computeFetchedNodeIds;
 %newobject ParaMEDMEM::MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells;
+%newobject ParaMEDMEM::MEDCouplingPointSet::computeDiameterField;
 %newobject ParaMEDMEM::MEDCouplingPointSet::__getitem__;
 %newobject ParaMEDMEM::MEDCouplingUMesh::New;
 %newobject ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivity;
 %newobject ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivityIndex;
-%newobject ParaMEDMEM::MEDCouplingUMesh::clone;
 %newobject ParaMEDMEM::MEDCouplingUMesh::__iter__;
 %newobject ParaMEDMEM::MEDCouplingUMesh::cellsByType;
 %newobject ParaMEDMEM::MEDCouplingUMesh::buildDescendingConnectivity;
@@ -308,6 +314,7 @@ using namespace INTERP_KERNEL;
 %newobject ParaMEDMEM::MEDCouplingUMesh::ComputeRangesFromTypeDistribution;
 %newobject ParaMEDMEM::MEDCouplingUMesh::buildUnionOf2DMesh;
 %newobject ParaMEDMEM::MEDCouplingUMesh::buildUnionOf3DMesh;
+%newobject ParaMEDMEM::MEDCouplingUMesh::generateGraph;
 %newobject ParaMEDMEM::MEDCouplingUMesh::orderConsecutiveCells1D;
 %newobject ParaMEDMEM::MEDCouplingUMesh::getBoundingBoxForBBTreeFast;
 %newobject ParaMEDMEM::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic;
@@ -340,14 +347,13 @@ using namespace INTERP_KERNEL;
 %newobject ParaMEDMEM::MEDCouplingStructuredMesh::Build1GTNodalConnectivityOfSubLevelMesh;
 %newobject ParaMEDMEM::MEDCouplingStructuredMesh::ComputeCornersGhost;
 %newobject ParaMEDMEM::MEDCouplingCMesh::New;
-%newobject ParaMEDMEM::MEDCouplingCMesh::clone;
 %newobject ParaMEDMEM::MEDCouplingCMesh::getCoordsAt;
+%newobject ParaMEDMEM::MEDCouplingCMesh::buildCurveLinear;
 %newobject ParaMEDMEM::MEDCouplingIMesh::New;
 %newobject ParaMEDMEM::MEDCouplingIMesh::asSingleCell;
 %newobject ParaMEDMEM::MEDCouplingIMesh::buildWithGhost;
 %newobject ParaMEDMEM::MEDCouplingIMesh::convertToCartesian;
 %newobject ParaMEDMEM::MEDCouplingCurveLinearMesh::New;
-%newobject ParaMEDMEM::MEDCouplingCurveLinearMesh::clone;
 %newobject ParaMEDMEM::MEDCouplingCurveLinearMesh::getCoords;
 %newobject ParaMEDMEM::MEDCouplingMultiFields::New;
 %newobject ParaMEDMEM::MEDCouplingMultiFields::deepCpy;
@@ -547,7 +553,8 @@ namespace ParaMEDMEM
     std::string getTimeUnit() const;
     virtual MEDCouplingMeshType getType() const throw(INTERP_KERNEL::Exception);
     bool isStructured() const throw(INTERP_KERNEL::Exception);
-    virtual MEDCouplingMesh *deepCpy() const;
+    virtual MEDCouplingMesh *deepCpy() const throw(INTERP_KERNEL::Exception);
+    virtual MEDCouplingMesh *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
     virtual bool isEqual(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception);
     virtual bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception);
     virtual void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const throw(INTERP_KERNEL::Exception);
@@ -1135,6 +1142,28 @@ namespace ParaMEDMEM
     //
     static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
   };
+
+  class MEDCouplingSkyLineArray
+  {
+  public:
+    MEDCouplingSkyLineArray();
+    MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray &myArray );
+    MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value );
+    MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value );
+  
+    void set( DataArrayInt* index, DataArrayInt* value );
+    int getNumberOf() const;
+    int getLength() const;
+    DataArrayInt* getIndexArray() const;
+    DataArrayInt* getValueArray() const;
+      %extend 
+         {
+           std::string __str__() const throw(INTERP_KERNEL::Exception)
+           {
+             return self->simpleRepr();
+           }
+         }
+  };
 }
 
 %include "MEDCouplingFieldDiscretization.i"
@@ -1174,6 +1203,7 @@ namespace ParaMEDMEM
       virtual DataArrayDouble *getBoundingBoxForBBTree(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
       virtual void renumberNodesWithOffsetInConn(int offset) throw(INTERP_KERNEL::Exception);
       virtual bool areAllNodesFetched() const throw(INTERP_KERNEL::Exception);
+      virtual MEDCouplingFieldDouble *computeDiameterField() const throw(INTERP_KERNEL::Exception);
       %extend 
          {
            std::string __str__() const throw(INTERP_KERNEL::Exception)
@@ -1728,7 +1758,6 @@ namespace ParaMEDMEM
   public:
     static MEDCouplingUMesh *New() throw(INTERP_KERNEL::Exception);
     static MEDCouplingUMesh *New(const char *meshName, int meshDim) throw(INTERP_KERNEL::Exception);
-    MEDCouplingUMesh *clone(bool recDeepCpy) const;
     void checkCoherency() const throw(INTERP_KERNEL::Exception);
     void setMeshDimension(int meshDim) throw(INTERP_KERNEL::Exception);
     void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
@@ -1781,6 +1810,7 @@ namespace ParaMEDMEM
     DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *buildUnionOf2DMesh() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *buildUnionOf3DMesh() const throw(INTERP_KERNEL::Exception);
+    MEDCouplingSkyLineArray *generateGraph() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *orderConsecutiveCells1D() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *getBoundingBoxForBBTreeFast() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *getBoundingBoxForBBTree2DQuadratic(double arcDetEps=1e-12) const throw(INTERP_KERNEL::Exception);
@@ -3289,6 +3319,8 @@ namespace ParaMEDMEM
     }
   };
 
+  class MEDCouplingCurveLinearMesh;
+
   //== MEDCouplingCMesh
   
   class MEDCouplingCMesh : public ParaMEDMEM::MEDCouplingStructuredMesh
@@ -3296,11 +3328,11 @@ namespace ParaMEDMEM
   public:
     static MEDCouplingCMesh *New() throw(INTERP_KERNEL::Exception);
     static MEDCouplingCMesh *New(const std::string& meshName) throw(INTERP_KERNEL::Exception);
-    MEDCouplingCMesh *clone(bool recDeepCpy) const;
     void setCoords(const DataArrayDouble *coordsX,
                    const DataArrayDouble *coordsY=0,
                    const DataArrayDouble *coordsZ=0) throw(INTERP_KERNEL::Exception);
     void setCoordsAt(int i, const DataArrayDouble *arr) throw(INTERP_KERNEL::Exception);
+    MEDCouplingCurveLinearMesh *buildCurveLinear() const throw(INTERP_KERNEL::Exception);
     %extend {
       MEDCouplingCMesh() throw(INTERP_KERNEL::Exception)
       {
@@ -3344,7 +3376,6 @@ namespace ParaMEDMEM
   public:
     static MEDCouplingCurveLinearMesh *New() throw(INTERP_KERNEL::Exception);
     static MEDCouplingCurveLinearMesh *New(const std::string& meshName) throw(INTERP_KERNEL::Exception);
-    MEDCouplingCurveLinearMesh *clone(bool recDeepCpy) const;
     void setCoords(const DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
     %extend {
       MEDCouplingCurveLinearMesh() throw(INTERP_KERNEL::Exception)