Salome HOME
Merge branch 'V8_0_BR'
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingMemArray.i
index cbf759e945755fe6064eab5c4539f43502cd33de..77e88536ee817939f4af0e561b141651407f00cb 100644 (file)
 %newobject ParaMEDMEM::DataArrayDouble::fromPolarToCart;
 %newobject ParaMEDMEM::DataArrayDouble::fromCylToCart;
 %newobject ParaMEDMEM::DataArrayDouble::fromSpherToCart;
+%newobject ParaMEDMEM::DataArrayDouble::cartesianize;
 %newobject ParaMEDMEM::DataArrayDouble::getDifferentValues;
 %newobject ParaMEDMEM::DataArrayDouble::findClosestTupleId;
 %newobject ParaMEDMEM::DataArrayDouble::computeNbOfInteractionsWith;
 
 namespace ParaMEDMEM
 {
+  typedef enum
+    {
+      AX_CART = 3,
+      AX_CYL = 4,
+      AX_SPHER = 5
+    } MEDCouplingAxisType;
+
   class DataArray : public RefCountObject, public TimeLabel
   {
   public:
@@ -245,6 +253,7 @@ namespace ParaMEDMEM
     static std::string GetVarNameFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
     static std::string GetUnitFromInfo(const std::string& info) throw(INTERP_KERNEL::Exception);
     static std::string BuildInfoFromVarAndUnit(const std::string& var, const std::string& unit) throw(INTERP_KERNEL::Exception);
+    static std::string GetAxTypeRepr(MEDCouplingAxisType at) throw(INTERP_KERNEL::Exception);
     void updateTime() const;
     %extend
     {
@@ -540,6 +549,7 @@ namespace ParaMEDMEM
     bool isMonotonic(bool increasing, double eps) const throw(INTERP_KERNEL::Exception);
     std::string repr() const throw(INTERP_KERNEL::Exception);
     std::string reprZip() const throw(INTERP_KERNEL::Exception);
+    std::string reprNotTooLong() const throw(INTERP_KERNEL::Exception);
     bool isEqual(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception);
     bool isEqualWithoutConsideringStr(const DataArrayDouble& other, double prec) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *convertToIntArr() const throw(INTERP_KERNEL::Exception);
@@ -579,6 +589,7 @@ namespace ParaMEDMEM
     DataArrayDouble *fromPolarToCart() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *fromCylToCart() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *fromSpherToCart() const throw(INTERP_KERNEL::Exception);
+    DataArrayDouble *cartesianize(MEDCouplingAxisType atOfThis) const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *doublyContractedProduct() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *determinant() const throw(INTERP_KERNEL::Exception);
     DataArrayDouble *eigenValues() const throw(INTERP_KERNEL::Exception);
@@ -752,7 +763,7 @@ namespace ParaMEDMEM
 
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
-        return self->repr();
+        return self->reprNotTooLong();
       }
 
       double __float__() const throw(INTERP_KERNEL::Exception)
@@ -2600,6 +2611,7 @@ namespace ParaMEDMEM
     void replaceOneValByInThis(int valToBeReplaced, int replacedBy) throw(INTERP_KERNEL::Exception);
     std::string repr() const throw(INTERP_KERNEL::Exception);
     std::string reprZip() const throw(INTERP_KERNEL::Exception);
+    std::string reprNotTooLong() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *invertArrayO2N2N2O(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *invertArrayN2O2O2N(int oldNbOfElem) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *invertArrayO2N2N2OBis(int newNbOfElem) const throw(INTERP_KERNEL::Exception);
@@ -2610,6 +2622,7 @@ namespace ParaMEDMEM
     DataArrayInt *checkAndPreparePermutation() const throw(INTERP_KERNEL::Exception);
     DataArrayInt *buildPermArrPerLevel() const throw(INTERP_KERNEL::Exception);
     bool isIdentity() const throw(INTERP_KERNEL::Exception);
+    bool isIdentity2(int sizeExpected) const throw(INTERP_KERNEL::Exception);
     bool isUniform(int val) const throw(INTERP_KERNEL::Exception);
     DataArrayInt *substr(int tupleIdBg, int tupleIdEnd=-1) const throw(INTERP_KERNEL::Exception);
     void transpose() throw(INTERP_KERNEL::Exception);
@@ -2806,7 +2819,7 @@ namespace ParaMEDMEM
 
       std::string __str__() const throw(INTERP_KERNEL::Exception)
       {
-        return self->repr();
+        return self->reprNotTooLong();
       }
 
       int __len__() const throw(INTERP_KERNEL::Exception)