X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling_Swig%2FMEDCouplingCommon.i;h=6a6f64d0ea51c7fbb14e413c8bfbe848c2007e46;hb=865eac01b8bdd7a4494afd632f23ac6a1fcc0c88;hp=22cd189214186fed689ec7b61c0878d2204cebb8;hpb=72d5c4506ad964d238997c07b3dc9c31317b27c9;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 22cd18921..6a6f64d0e 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -20,6 +20,10 @@ %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; @@ -265,7 +271,6 @@ using namespace INTERP_KERNEL; %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; @@ -309,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; @@ -341,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; @@ -548,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); @@ -1136,6 +1142,28 @@ namespace ParaMEDMEM // static bool AreAlmostEqual(const std::vector& v1, const std::vector& v2, double eps); }; + + class MEDCouplingSkyLineArray + { + public: + MEDCouplingSkyLineArray(); + MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray &myArray ); + MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value ); + MEDCouplingSkyLineArray( const std::vector& index, const std::vector& 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" @@ -1730,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); @@ -1783,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); @@ -3291,6 +3319,8 @@ namespace ParaMEDMEM } }; + class MEDCouplingCurveLinearMesh; + //== MEDCouplingCMesh class MEDCouplingCMesh : public ParaMEDMEM::MEDCouplingStructuredMesh @@ -3298,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) { @@ -3346,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)