#include "MEDCouplingExtrudedMesh.hxx"
#include "MEDCouplingCMesh.hxx"
#include "MEDCouplingCurveLinearMesh.hxx"
+#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingField.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldTemplate.hxx"
%template(dvec) std::vector<double>;
%template(svec) std::vector<std::string>;
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingMesh*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCouplingMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingPointSet*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCouplingPointSet*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+
+////////////////////
+%typemap(out) ParaMEDMEM::MEDCoupling1GTUMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+
+%typemap(out) MEDCoupling1GTUMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingStructuredMesh*
{
$result=convertMesh($1,$owner);
}
+%typemap(out) MEDCouplingStructuredMesh*
+{
+ $result=convertMesh($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingFieldDiscretization*
{
$result=convertFieldDiscretization($1,$owner);
}
+%typemap(out) MEDCouplingFieldDiscretization*
+{
+ $result=convertFieldDiscretization($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::MEDCouplingMultiFields*
{
$result=convertMultiFields($1,$owner);
}
+%typemap(out) MEDCouplingMultiFields*
+{
+ $result=convertMultiFields($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
+%typemap(out) ParaMEDMEM::DataArray*
+{
+ $result=convertDataArray($1,$owner);
+}
+
+%typemap(out) DataArray*
+{
+ $result=convertDataArray($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
+////////////////////
%typemap(out) ParaMEDMEM::DataArrayChar*
{
$result=convertDataArrayChar($1,$owner);
}
+%typemap(out) DataArrayChar*
+{
+ $result=convertDataArrayChar($1,$owner);
+}
+//$$$$$$$$$$$$$$$$$$
+
#ifdef WITH_NUMPY
%init %{ import_array(); %}
#endif
%feature("autodoc", "1");
%feature("docstring");
+%newobject ParaMEDMEM::MEDCouplingFieldDiscretization::New;
%newobject ParaMEDMEM::MEDCouplingFieldDiscretization::getOffsetArr;
%newobject ParaMEDMEM::MEDCouplingFieldDiscretization::deepCpy;
%newobject ParaMEDMEM::MEDCouplingFieldDiscretization::clone;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::buildNewTimeReprFromThis;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::getValueOnMulti;
%newobject ParaMEDMEM::MEDCouplingFieldTemplate::New;
+%newobject ParaMEDMEM::DataArray::selectByTupleRanges;
%newobject ParaMEDMEM::DataArrayInt::New;
%newobject ParaMEDMEM::DataArrayInt::__iter__;
%newobject ParaMEDMEM::DataArrayInt::convertToDblArr;
%newobject ParaMEDMEM::DataArrayInt::performCpy;
%newobject ParaMEDMEM::DataArrayInt::substr;
%newobject ParaMEDMEM::DataArrayInt::changeNbOfComponents;
-%newobject ParaMEDMEM::DataArrayInt::keepSelectedComponents;
+%newobject ParaMEDMEM::DataArrayInt::accumulatePerChunck;
%newobject ParaMEDMEM::DataArrayInt::selectByTupleId;
%newobject ParaMEDMEM::DataArrayInt::selectByTupleIdSafe;
%newobject ParaMEDMEM::DataArrayInt::selectByTupleId2;
-%newobject ParaMEDMEM::DataArrayInt::selectByTupleRanges;
%newobject ParaMEDMEM::DataArrayInt::checkAndPreparePermutation;
%newobject ParaMEDMEM::DataArrayInt::transformWithIndArrR;
%newobject ParaMEDMEM::DataArrayInt::renumber;
%newobject ParaMEDMEM::DataArrayInt::negate;
%newobject ParaMEDMEM::DataArrayInt::getIdsInRange;
%newobject ParaMEDMEM::DataArrayInt::Aggregate;
+%newobject ParaMEDMEM::DataArrayInt::AggregateIndexes;
%newobject ParaMEDMEM::DataArrayInt::Meld;
%newobject ParaMEDMEM::DataArrayInt::Add;
%newobject ParaMEDMEM::DataArrayInt::Substract;
%newobject ParaMEDMEM::DataArrayInt::__pow__;
%newobject ParaMEDMEM::DataArrayInt::__rpow__;
%newobject ParaMEDMEM::DataArrayIntTuple::buildDAInt;
+%newobject ParaMEDMEM::DataArrayChar::deepCpy;
%newobject ParaMEDMEM::DataArrayChar::convertToIntArr;
%newobject ParaMEDMEM::DataArrayChar::renumber;
%newobject ParaMEDMEM::DataArrayChar::renumberR;
%newobject ParaMEDMEM::DataArrayChar::selectByTupleIdSafe;
%newobject ParaMEDMEM::DataArrayChar::selectByTupleId2;
%newobject ParaMEDMEM::DataArrayChar::changeNbOfComponents;
-%newobject ParaMEDMEM::DataArrayChar::keepSelectedComponents;
%newobject ParaMEDMEM::DataArrayChar::getIdsEqual;
%newobject ParaMEDMEM::DataArrayChar::getIdsNotEqual;
%newobject ParaMEDMEM::DataArrayChar::Aggregate;
%newobject ParaMEDMEM::DataArrayChar::Meld;
%newobject ParaMEDMEM::DataArrayByte::New;
%newobject ParaMEDMEM::DataArrayByte::__iter__;
-%newobject ParaMEDMEM::DataArrayByte::deepCpy;
%newobject ParaMEDMEM::DataArrayByte::performCpy;
%newobject ParaMEDMEM::DataArrayByteTuple::buildDAByte;
%newobject ParaMEDMEM::DataArrayChar::substr;
%newobject ParaMEDMEM::DataArrayAsciiChar::New;
%newobject ParaMEDMEM::DataArrayAsciiChar::__iter__;
-%newobject ParaMEDMEM::DataArrayAsciiChar::deepCpy;
%newobject ParaMEDMEM::DataArrayAsciiChar::performCpy;
%newobject ParaMEDMEM::DataArrayAsciiCharTuple::buildDAAsciiChar;
%newobject ParaMEDMEM::DataArrayDouble::New;
%newobject ParaMEDMEM::DataArrayDouble::Pow;
%newobject ParaMEDMEM::DataArrayDouble::substr;
%newobject ParaMEDMEM::DataArrayDouble::changeNbOfComponents;
-%newobject ParaMEDMEM::DataArrayDouble::keepSelectedComponents;
+%newobject ParaMEDMEM::DataArrayDouble::accumulatePerChunck;
%newobject ParaMEDMEM::DataArrayDouble::getIdsInRange;
%newobject ParaMEDMEM::DataArrayDouble::selectByTupleId;
%newobject ParaMEDMEM::DataArrayDouble::selectByTupleIdSafe;
%newobject ParaMEDMEM::DataArrayDouble::selectByTupleId2;
-%newobject ParaMEDMEM::DataArrayDouble::selectByTupleRanges;
%newobject ParaMEDMEM::DataArrayDouble::negate;
%newobject ParaMEDMEM::DataArrayDouble::applyFunc;
%newobject ParaMEDMEM::DataArrayDouble::applyFunc2;
%newobject ParaMEDMEM::MEDCouplingMesh::checkDeepEquivalOnSameNodesWith;
%newobject ParaMEDMEM::MEDCouplingMesh::checkTypeConsistencyAndContig;
%newobject ParaMEDMEM::MEDCouplingMesh::computeNbOfNodesPerCell;
+%newobject ParaMEDMEM::MEDCouplingMesh::computeNbOfFacesPerCell;
%newobject ParaMEDMEM::MEDCouplingMesh::buildPartRange;
%newobject ParaMEDMEM::MEDCouplingMesh::giveCellsWithType;
%newobject ParaMEDMEM::MEDCouplingMesh::getCoordinatesAndOwner;
%newobject ParaMEDMEM::MEDCouplingPointSet::MergeNodesArray;
%newobject ParaMEDMEM::MEDCouplingPointSet::buildPartOfMySelf2;
%newobject ParaMEDMEM::MEDCouplingPointSet::BuildInstanceFromMeshType;
+%newobject ParaMEDMEM::MEDCouplingPointSet::zipConnectivityTraducer;
+%newobject ParaMEDMEM::MEDCouplingPointSet::mergeMyselfWithOnSameCoords;
+%newobject ParaMEDMEM::MEDCouplingPointSet::fillCellIdsToKeepFromNodeIds;
+%newobject ParaMEDMEM::MEDCouplingPointSet::getCellIdsLyingOnNodes;
+%newobject ParaMEDMEM::MEDCouplingPointSet::deepCpyConnectivityOnly;
+%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::__getitem__;
%newobject ParaMEDMEM::MEDCouplingUMesh::cellsByType;
-%newobject ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildDescendingConnectivity;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildDescendingConnectivity2;
%newobject ParaMEDMEM::MEDCouplingUMesh::explode3DMeshTo1D;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt;
%newobject ParaMEDMEM::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes;
%newobject ParaMEDMEM::MEDCouplingUMesh::sortCellsInMEDFileFrmt;
+%newobject ParaMEDMEM::MEDCouplingUMesh::getRenumArrForMEDFileFrmt;
%newobject ParaMEDMEM::MEDCouplingUMesh::convertCellArrayPerGeoType;
%newobject ParaMEDMEM::MEDCouplingUMesh::computeFetchedNodeIds;
%newobject ParaMEDMEM::MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec;
%newobject ParaMEDMEM::MEDCouplingUMesh::Build0DMeshFromCoords;
%newobject ParaMEDMEM::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells;
%newobject ParaMEDMEM::MEDCouplingUMesh::findAndCorrectBadOriented3DCells;
+%newobject ParaMEDMEM::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh;
+%newobject ParaMEDMEM::MEDCouplingUMesh::convertNodalConnectivityToStaticGeoTypeMesh;
%newobject ParaMEDMEM::MEDCouplingUMesh::findCellIdsOnBoundary;
%newobject ParaMEDMEM::MEDCouplingUMesh::computeSkin;
-%newobject ParaMEDMEM::MEDCouplingUMesh::getCellIdsLyingOnNodes;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildSetInstanceFromThis;
%newobject ParaMEDMEM::MEDCouplingUMesh::getCellIdsCrossingPlane;
%newobject ParaMEDMEM::MEDCouplingUMesh::convexEnvelop2D;
%newobject ParaMEDMEM::MEDCouplingUMesh::ComputeRangesFromTypeDistribution;
%newobject ParaMEDMEM::MEDCouplingUMeshCellByTypeEntry::__iter__;
%newobject ParaMEDMEM::MEDCouplingUMeshCellEntry::__iter__;
+%newobject ParaMEDMEM::MEDCoupling1GTUMesh::New;
+%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::New;
+%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::getNodalConnectivity;
+%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::buildSetInstanceFromThis;
+%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::Merge1SGTUMeshes;
+%newobject ParaMEDMEM::MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords;
+%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::New;
+%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::getNodalConnectivity;
+%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::getNodalConnectivityIndex;
+%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::buildSetInstanceFromThis;
+%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::Merge1DGTUMeshes;
+%newobject ParaMEDMEM::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords;
%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::New;
%newobject ParaMEDMEM::MEDCouplingExtrudedMesh::build3DUnstructuredMesh;
%newobject ParaMEDMEM::MEDCouplingCMesh::New;
%feature("unref") MEDCouplingPointSet "$this->decrRef();"
%feature("unref") MEDCouplingMesh "$this->decrRef();"
%feature("unref") MEDCouplingUMesh "$this->decrRef();"
+%feature("unref") MEDCoupling1GTUMesh "$this->decrRef();"
+%feature("unref") MEDCoupling1SGTUMesh "$this->decrRef();"
+%feature("unref") MEDCoupling1DGTUMesh "$this->decrRef();"
%feature("unref") MEDCouplingExtrudedMesh "$this->decrRef();"
%feature("unref") MEDCouplingCMesh "$this->decrRef();"
%feature("unref") DataArrayInt "$this->decrRef();"
+%feature("unref") DataArrayChar "$this->decrRef();"
%feature("unref") DataArrayAsciiChar "$this->decrRef();"
%feature("unref") DataArrayByte "$this->decrRef();"
%feature("unref") MEDCouplingField "$this->decrRef();"
%feature("unref") MEDCouplingMultiFields "$this->decrRef();"
%rename(assign) *::operator=;
-%ignore ParaMEDMEM::MEDCouplingVersionMajMinRel;
%ignore ParaMEDMEM::RefCountObject::decrRef;
%ignore ParaMEDMEM::MEDCouplingGaussLocalization::pushTinySerializationIntInfo;
%ignore ParaMEDMEM::MEDCouplingGaussLocalization::pushTinySerializationDblInfo;
};
}
-%include "MEDCouplingTimeLabel.hxx"
+namespace ParaMEDMEM
+{
+ class TimeLabel
+ {
+ public:
+ void declareAsNew() const;
+ virtual void updateTime() const;
+ unsigned int getTimeOfThis() const;
+ protected:
+ ~TimeLabel();
+ };
+}
namespace ParaMEDMEM
{
const char *MEDCouplingVersionStr();
int MEDCouplingVersion();
int MEDCouplingSizeOfVoidStar();
- PyObject *MEDCouplingVersionMajMinRel()
- {
- int tmp0=0,tmp1=0,tmp2=0;
- MEDCouplingVersionMajMinRel(tmp0,tmp1,tmp2);
- PyObject *res = PyList_New(3);
- PyList_SetItem(res,0,SWIG_From_int(tmp0));
- PyList_SetItem(res,1,SWIG_From_int(tmp1));
- PyList_SetItem(res,2,SWIG_From_int(tmp2));
- return res;
- }
class RefCountObject
{
public:
bool decrRef() const;
void incrRef() const;
+ int getRCValue() const;
virtual std::size_t getHeapMemorySize() const;
};
}
%inline
{
- bool MEDCouplingHasNumpyBindings()
+ PyObject *MEDCouplingVersionMajMinRel()
+ {
+ int tmp0=0,tmp1=0,tmp2=0;
+ MEDCouplingVersionMajMinRel(tmp0,tmp1,tmp2);
+ PyObject *res = PyList_New(3);
+ PyList_SetItem(res,0,SWIG_From_int(tmp0));
+ PyList_SetItem(res,1,SWIG_From_int(tmp1));
+ PyList_SetItem(res,2,SWIG_From_int(tmp2));
+ return res;
+ }
+
+ bool MEDCouplingHasNumPyBindings()
{
#ifdef WITH_NUMPY
return true;
return false;
#endif
}
+
+ std::string MEDCouplingCompletionScript() throw(INTERP_KERNEL::Exception)
+ {
+ static const char script[]="import rlcompleter,readline\nreadline.parse_and_bind('tab:complete')";
+ std::ostringstream oss; oss << "MEDCouplingCompletionScript : error when trying to activate completion ! readline not present ?\nScript is :\n" << script;
+ if(PyRun_SimpleString(script)!=0)
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ return std::string(script);
+ }
}
%include "MEDCouplingMemArray.i"
}
}
+ //== MEDCouplingMesh
+
class MEDCouplingMesh : public RefCountObject, public TimeLabel
{
public:
virtual MEDCouplingMesh *deepCpy() const;
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);
virtual void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
virtual void copyTinyInfoFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception);
virtual void checkCoherency() const throw(INTERP_KERNEL::Exception);
virtual DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *computeNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
+ virtual DataArrayInt *computeNbOfFacesPerCell() const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingMesh *buildPartRange(int beginCellIds, int endCellIds, int stepCellIds) const throw(INTERP_KERNEL::Exception);
virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception);
virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *simplexize(int policy) throw(INTERP_KERNEL::Exception);
static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ static bool IsStaticGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
+ static bool IsLinearGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
+ static INTERP_KERNEL::NormalizedCellType GetCorrespondingPolyType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
+ static int GetNumberOfNodesOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
static int GetDimensionOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
static const char *GetReprOfGeometricType(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
%extend
if (!SWIG_IsOK(res1))
{
int size;
- INTERP_KERNEL::AutoPtr<double> tmp=convertPyToNewDblArr2(p,&size);
+ INTERP_KERNEL::AutoCPtr<double> tmp=convertPyToNewDblArr2(p,&size);
int nbOfPoints=size/spaceDim;
if(size%spaceDim!=0)
{
PyObject *getDistributionOfTypes() const throw(INTERP_KERNEL::Exception)
{
std::vector<int> vals=self->getDistributionOfTypes();
+ if(vals.size()%3!=0)
+ throw INTERP_KERNEL::Exception("Internal Error detected in wrap python ! code returned by MEDCouplingMesh::getDistributionOfTypes is not so that %3==0 !");
PyObject *ret=PyList_New((int)vals.size()/3);
for(int j=0;j<(int)vals.size()/3;j++)
{
std::vector<DataArrayInt *> idsPerType;
self->splitProfilePerType(profile,code,idsInPflPerType,idsPerType);
PyObject *ret=PyTuple_New(3);
- PyTuple_SetItem(ret,0,convertIntArrToPyList2(code));
+ //
+ if(code.size()%3!=0)
+ throw INTERP_KERNEL::Exception("Internal Error detected in wrap python ! code returned by MEDCouplingMesh::splitProfilePerType is not so that %3==0 !");
+ PyObject *ret0=PyList_New((int)code.size()/3);
+ for(int j=0;j<(int)code.size()/3;j++)
+ {
+ PyObject *ret00=PyList_New(3);
+ PyList_SetItem(ret00,0,SWIG_From_int(code[3*j]));
+ PyList_SetItem(ret00,1,SWIG_From_int(code[3*j+1]));
+ PyList_SetItem(ret00,2,SWIG_From_int(code[3*j+2]));
+ PyList_SetItem(ret0,j,ret00);
+ }
+ PyTuple_SetItem(ret,0,ret0);
+ //
PyObject *ret1=PyList_New(idsInPflPerType.size());
for(std::size_t j=0;j<idsInPflPerType.size();j++)
PyList_SetItem(ret1,j,SWIG_NewPointerObj(SWIG_as_voidptr(idsInPflPerType[j]),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
void rotate(PyObject *center, PyObject *vector, double alpha) throw(INTERP_KERNEL::Exception)
{
const char msg[]="Python wrap of MEDCouplingPointSet::rotate : ";
- double val;
- DataArrayDouble *a;
- DataArrayDoubleTuple *aa;
- std::vector<double> bb;
+ double val,val2;
+ DataArrayDouble *a,*a2;
+ DataArrayDoubleTuple *aa,*aa2;
+ std::vector<double> bb,bb2;
int sw;
int spaceDim=self->getSpaceDimension();
const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,spaceDim,true);
- const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val,a,aa,bb,msg,1,spaceDim,false);
+ const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,spaceDim,false);//vectorPtr can be null in case of space dim 2
self->rotate(centerPtr,vectorPtr,alpha);
}
};
}
+//== MEDCouplingMesh End
+
%include "NormalizedUnstructuredMesh.hxx"
%include "MEDCouplingNatureOfField.hxx"
%include "MEDCouplingTimeDiscretization.hxx"
%ignore ParaMEDMEM::MEDCouplingFieldDiscretization::buildSubMeshDataRange;
%ignore ParaMEDMEM::MEDCouplingFieldDiscretizationPerCell::getArrayOfDiscIds;
+//== MEDCouplingPointSet
+
namespace ParaMEDMEM
{
class MEDCouplingPointSet : public ParaMEDMEM::MEDCouplingMesh
{
public:
- void updateTime() const;
void setCoords(const DataArrayDouble *coords) throw(INTERP_KERNEL::Exception);
DataArrayDouble *getCoordinatesAndOwner() const throw(INTERP_KERNEL::Exception);
bool areCoordsEqual(const MEDCouplingPointSet& other, double prec) const throw(INTERP_KERNEL::Exception);
void recenterForMaxPrecision(double eps) throw(INTERP_KERNEL::Exception);
void changeSpaceDimension(int newSpaceDim, double dftVal=0.) throw(INTERP_KERNEL::Exception);
void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
+ virtual void shallowCopyConnectivityFrom(const MEDCouplingPointSet *other) throw(INTERP_KERNEL::Exception);
virtual MEDCouplingPointSet *buildPartOfMySelf2(int start, int end, int step) const throw(INTERP_KERNEL::Exception);
virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type) throw(INTERP_KERNEL::Exception);
virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const throw(INTERP_KERNEL::Exception);
- virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *getCellsInBoundingBox(const INTERP_KERNEL::DirectedBoundingBox& bbox, double eps) throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *zipCoordsTraducer() throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *findBoundaryNodes() const;
+ virtual DataArrayInt *zipConnectivityTraducer(int compType, int startCellId=0) throw(INTERP_KERNEL::Exception);
+ virtual MEDCouplingPointSet *mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const throw(INTERP_KERNEL::Exception);
+ virtual void checkFullyDefined() const throw(INTERP_KERNEL::Exception);
+ virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception);
+ virtual MEDCouplingPointSet *deepCpyConnectivityOnly() const throw(INTERP_KERNEL::Exception);
%extend
{
std::string __str__() const throw(INTERP_KERNEL::Exception)
return convertMesh(ret, SWIG_POINTER_OWN | 0 );
}
+ virtual PyObject *buildPartOfMySelfKeepCoords(PyObject *li) const throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoords(tmp,tmp+szArr);
+ if(sw==3)//DataArrayInt
+ {
+ void *argp; SWIG_ConvertPtr(li,&argp,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,0|0);
+ DataArrayInt *argpt=reinterpret_cast< ParaMEDMEM::DataArrayInt * >(argp);
+ std::string name=argpt->getName();
+ if(!name.empty())
+ ret->setName(name.c_str());
+ }
+ return convertMesh(ret, SWIG_POINTER_OWN | 0 );
+ }
+
+ virtual PyObject *buildPartOfMySelfKeepCoords2(int start, int end, int step) const throw(INTERP_KERNEL::Exception)
+ {
+ MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoords2(start,end,step);
+ return convertMesh(ret, SWIG_POINTER_OWN | 0 );
+ }
+
PyObject *buildFacePartOfMySelfNode(PyObject *li, bool fullyIn) const throw(INTERP_KERNEL::Exception)
{
int szArr,sw,iTypppArr;
}
}
+ virtual PyObject *getReverseNodalConnectivity() const throw(INTERP_KERNEL::Exception)
+ {
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
+ self->getReverseNodalConnectivity(d0,d1);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
+ virtual PyObject *findCommonCells(int compType, int startCellId=0) const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *v0=0,*v1=0;
+ self->findCommonCells(compType,startCellId,v0,v1);
+ PyObject *res = PyList_New(2);
+ PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return res;
+ }
+
+
+ virtual void renumberNodesInConn(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ void *da=0;
+ int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
+ if (!SWIG_IsOK(res1))
+ {
+ int size;
+ INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+ self->renumberNodesInConn(tmp);
+ }
+ else
+ {
+ DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+ if(!da2)
+ throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+ da2->checkAllocated();
+ self->renumberNodesInConn(da2->getConstPointer());
+ }
+ }
+
+ virtual PyObject *getNodeIdsInUse() const throw(INTERP_KERNEL::Exception)
+ {
+ int ret1=-1;
+ DataArrayInt *ret0=self->getNodeIdsInUse(ret1);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
+ return ret;
+ }
+
+ virtual DataArrayInt *fillCellIdsToKeepFromNodeIds(PyObject *li, bool fullyIn) const
+ {
+ DataArrayInt *ret=0;
+ //
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->fillCellIdsToKeepFromNodeIds(tmp,tmp+szArr,fullyIn,ret);
+ return ret;
+ }
+
+ virtual PyObject *mergeNodes(double precision) throw(INTERP_KERNEL::Exception)
+ {
+ bool ret1;
+ int ret2;
+ DataArrayInt *ret0=self->mergeNodes(precision,ret1,ret2);
+ PyObject *res = PyList_New(3);
+ PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyList_SetItem(res,1,SWIG_From_bool(ret1));
+ PyList_SetItem(res,2,SWIG_From_int(ret2));
+ return res;
+ }
+
+ virtual PyObject *mergeNodes2(double precision) throw(INTERP_KERNEL::Exception)
+ {
+ bool ret1;
+ int ret2;
+ DataArrayInt *ret0=self->mergeNodes2(precision,ret1,ret2);
+ PyObject *res = PyList_New(3);
+ PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyList_SetItem(res,1,SWIG_From_bool(ret1));
+ PyList_SetItem(res,2,SWIG_From_int(ret2));
+ return res;
+ }
+
+ DataArrayInt *getCellIdsLyingOnNodes(PyObject *li, bool fullyIn) const throw(INTERP_KERNEL::Exception)
+ {
+ void *da=0;
+ int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
+ if (!SWIG_IsOK(res1))
+ {
+ int size;
+ INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
+ return self->getCellIdsLyingOnNodes(tmp,((const int *)tmp)+size,fullyIn);
+ }
+ else
+ {
+ DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+ if(!da2)
+ throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
+ da2->checkAllocated();
+ return self->getCellIdsLyingOnNodes(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),fullyIn);
+ }
+ }
+
+ MEDCouplingPointSet *__getitem__(PyObject *listOrDataArrI) throw(INTERP_KERNEL::Exception)
+ {
+ int sw;
+ int singleVal;
+ std::vector<int> multiVal;
+ std::pair<int, std::pair<int,int> > slic;
+ ParaMEDMEM::DataArrayInt *daIntTyypp=0;
+ int nbc=self->getNumberOfCells();
+ convertObjToPossibleCpp2(listOrDataArrI,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
+ switch(sw)
+ {
+ case 1:
+ {
+ if(singleVal>=nbc)
+ {
+ std::ostringstream oss;
+ oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ if(singleVal>=0)
+ return self->buildPartOfMySelf(&singleVal,&singleVal+1,true);
+ else
+ {
+ if(nbc+singleVal>0)
+ {
+ int tmp=nbc+singleVal;
+ return self->buildPartOfMySelf(&tmp,&tmp+1,true);
+ }
+ else
+ {
+ std::ostringstream oss;
+ oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ }
+ }
+ case 2:
+ {
+ return static_cast<MEDCouplingPointSet *>(self->buildPartOfMySelf(&multiVal[0],&multiVal[0]+multiVal.size(),true));
+ }
+ case 3:
+ {
+ return self->buildPartOfMySelf2(slic.first,slic.second.first,slic.second.second,true);
+ }
+ case 4:
+ {
+ if(!daIntTyypp)
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : null instance has been given in input !");
+ daIntTyypp->checkAllocated();
+ return self->buildPartOfMySelf(daIntTyypp->begin(),daIntTyypp->end(),true);
+ }
+ default:
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
+ }
+ }
+
static void Rotate2DAlg(PyObject *center, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
{
int sz;
- INTERP_KERNEL::AutoPtr<double> c=convertPyToNewDblArr2(center,&sz);
- INTERP_KERNEL::AutoPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
+ INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
+ INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
ParaMEDMEM::MEDCouplingPointSet::Rotate2DAlg(c,angle,nbNodes,coo);
for(int i=0;i<sz;i++)
PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
static void Rotate2DAlg(PyObject *center, double angle, PyObject *coords) throw(INTERP_KERNEL::Exception)
{
int sz;
- INTERP_KERNEL::AutoPtr<double> c=convertPyToNewDblArr2(center,&sz);
+ INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
int sw,nbNodes=0;
double val0; ParaMEDMEM::DataArrayDouble *val1=0; ParaMEDMEM::DataArrayDoubleTuple *val2=0;
std::vector<double> val3;
static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
{
int sz,sz2;
- INTERP_KERNEL::AutoPtr<double> c=convertPyToNewDblArr2(center,&sz);
- INTERP_KERNEL::AutoPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
- INTERP_KERNEL::AutoPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
+ INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
+ INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
+ INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
ParaMEDMEM::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,coo);
for(int i=0;i<sz;i++)
PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, PyObject *coords) throw(INTERP_KERNEL::Exception)
{
int sz,sz2;
- INTERP_KERNEL::AutoPtr<double> c=convertPyToNewDblArr2(center,&sz);
+ INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
int sw,nbNodes=0;
double val0; ParaMEDMEM::DataArrayDouble *val1=0; ParaMEDMEM::DataArrayDoubleTuple *val2=0;
std::vector<double> val3;
"Rotate3DAlg",3,true,nbNodes);
if(sw!=2 && sw!=3)
throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate3DAlg : try another overload method !");
- INTERP_KERNEL::AutoPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
+ INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
ParaMEDMEM::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,const_cast<double *>(coo));
}
}
};
+ //== MEDCouplingPointSet End
+
class MEDCouplingUMeshCell
{
public:
}
};
+ //== MEDCouplingUMesh
+
class MEDCouplingUMesh : public ParaMEDMEM::MEDCouplingPointSet
{
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 updateTime() 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);
bool checkConsecutiveCellTypesForMEDFileFrmt() const throw(INTERP_KERNEL::Exception);
DataArrayInt *rearrange2ConsecutiveCellTypes() throw(INTERP_KERNEL::Exception);
DataArrayInt *sortCellsInMEDFileFrmt() throw(INTERP_KERNEL::Exception);
+ DataArrayInt *getRenumArrForMEDFileFrmt() const throw(INTERP_KERNEL::Exception);
DataArrayInt *convertCellArrayPerGeoType(const DataArrayInt *da) const throw(INTERP_KERNEL::Exception);
DataArrayInt *computeFetchedNodeIds() const throw(INTERP_KERNEL::Exception);
- DataArrayInt *zipConnectivityTraducer(int compType, int startCellId=0) throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildDescendingConnectivity2(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *explode3DMeshTo1D(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
std::string cppRepr() const throw(INTERP_KERNEL::Exception);
DataArrayInt *findAndCorrectBadOriented3DExtrudedCells() throw(INTERP_KERNEL::Exception);
DataArrayInt *findAndCorrectBadOriented3DCells() throw(INTERP_KERNEL::Exception);
+ ParaMEDMEM::MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
+ DataArrayInt *convertNodalConnectivityToStaticGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *Build0DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
{
return self->cellIterator();
}
-
- MEDCouplingPointSet *__getitem__(PyObject *listOrDataArrI) throw(INTERP_KERNEL::Exception)
- {
- int sw;
- int singleVal;
- std::vector<int> multiVal;
- std::pair<int, std::pair<int,int> > slic;
- ParaMEDMEM::DataArrayInt *daIntTyypp=0;
- int nbc=self->getNumberOfCells();
- convertObjToPossibleCpp2(listOrDataArrI,nbc,sw,singleVal,multiVal,slic,daIntTyypp);
- switch(sw)
- {
- case 1:
- {
- if(singleVal>=nbc)
- {
- std::ostringstream oss;
- oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
- }
- if(singleVal>=0)
- return self->buildPartOfMySelf(&singleVal,&singleVal+1,true);
- else
- {
- if(nbc+singleVal>0)
- {
- int tmp=nbc+singleVal;
- return self->buildPartOfMySelf(&tmp,&tmp+1,true);
- }
- else
- {
- std::ostringstream oss;
- oss << "Requesting for cell id " << singleVal << " having only " << nbc << " cells !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
- }
- }
- }
- case 2:
- {
- return static_cast<MEDCouplingUMesh *>(self->buildPartOfMySelf(&multiVal[0],&multiVal[0]+multiVal.size(),true));
- }
- case 3:
- {
- return self->buildPartOfMySelf2(slic.first,slic.second.first,slic.second.second,true);
- }
- case 4:
- {
- if(!daIntTyypp)
- throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : null instance has been given in input !");
- daIntTyypp->checkAllocated();
- return self->buildPartOfMySelf(daIntTyypp->begin(),daIntTyypp->end(),true);
- }
- default:
- throw INTERP_KERNEL::Exception("MEDCouplingUMesh::__getitem__ : unrecognized type in input ! Possibilities are : int, list or tuple of int DataArrayInt instance !");
- }
- }
void setPartOfMySelf(PyObject *li, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception)
{
return res;
}
- PyObject *findCommonCells(int compType, int startCellId=0) const throw(INTERP_KERNEL::Exception)
- {
- DataArrayInt *v0=0,*v1=0;
- self->findCommonCells(compType,startCellId,v0,v1);
- PyObject *res = PyList_New(2);
- PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- PyList_SetItem(res,1,SWIG_NewPointerObj(SWIG_as_voidptr(v1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- return res;
- }
-
static PyObject *FindCommonCellsAlg(int compType, int startCellId, const DataArrayInt *nodal, const DataArrayInt *nodalI, const DataArrayInt *revNodal, const DataArrayInt *revNodalI) throw(INTERP_KERNEL::Exception)
{
DataArrayInt *v0=0,*v1=0;
int nbOfCompo=self->getSpaceDimension();
const double *pt=convertObjToPossibleCpp5_Safe(point,sw,val,a,aa,bb,"Python wrap of MEDCouplingUMesh::distanceToPoint",1,nbOfCompo,true);
//
- int cellId=-1,nodeId=-1;
- double ret0=self->distanceToPoint(pt,pt+nbOfCompo,cellId,nodeId);
- PyObject *ret=PyTuple_New(3);
+ int cellId=-1;
+ double ret0=self->distanceToPoint(pt,pt+nbOfCompo,cellId);
+ PyObject *ret=PyTuple_New(2);
PyTuple_SetItem(ret,0,PyFloat_FromDouble(ret0));
PyTuple_SetItem(ret,1,PyInt_FromLong(cellId));
- PyTuple_SetItem(ret,2,PyInt_FromLong(nodeId));
return ret;
}
- PyObject *mergeNodes(double precision) throw(INTERP_KERNEL::Exception)
+ PyObject *distanceToPoints(const DataArrayDouble *pts) const throw(INTERP_KERNEL::Exception)
{
- bool ret1;
- int ret2;
- DataArrayInt *ret0=self->mergeNodes(precision,ret1,ret2);
- PyObject *res = PyList_New(3);
- PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- PyList_SetItem(res,1,SWIG_From_bool(ret1));
- PyList_SetItem(res,2,SWIG_From_int(ret2));
- return res;
- }
- PyObject *mergeNodes2(double precision) throw(INTERP_KERNEL::Exception)
- {
- bool ret1;
- int ret2;
- DataArrayInt *ret0=self->mergeNodes2(precision,ret1,ret2);
- PyObject *res = PyList_New(3);
- PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- PyList_SetItem(res,1,SWIG_From_bool(ret1));
- PyList_SetItem(res,2,SWIG_From_int(ret2));
- return res;
+ DataArrayInt *ret1=0;
+ DataArrayDouble *ret0=self->distanceToPoints(pts,ret1);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayDouble, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
}
+
PyObject *checkButterflyCells(double eps=1e-12) throw(INTERP_KERNEL::Exception)
{
std::vector<int> cells;
}
}
- void renumberNodesInConn(PyObject *li) throw(INTERP_KERNEL::Exception)
- {
- void *da=0;
- int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
- if (!SWIG_IsOK(res1))
- {
- int size;
- INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
- self->renumberNodesInConn(tmp);
- }
- else
- {
- DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
- if(!da2)
- throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
- da2->checkAllocated();
- self->renumberNodesInConn(da2->getConstPointer());
- }
- }
-
PyObject *getLevArrPerCellTypes(PyObject *li) const throw(INTERP_KERNEL::Exception)
{
int sz;
return ret;
}
+ PyObject *convertNodalConnectivityToDynamicGeoTypeMesh() const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret0=0,*ret1=0;
+ self->convertNodalConnectivityToDynamicGeoTypeMesh(ret0,ret1);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
static PyObject *AggregateSortedByTypeMeshesOnSameCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
{
std::vector<const ParaMEDMEM::MEDCouplingUMesh *> meshes;
return ret;
}
+ static PyObject *ExtractFromIndexedArrays2(int strt, int stp, int step, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *arrOut=0,*arrIndexOut=0;
+ MEDCouplingUMesh::ExtractFromIndexedArrays2(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
+ static PyObject *ExtractFromIndexedArrays2(PyObject *slic, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
+ {
+ if(!PySlice_Check(slic))
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArrays2 (wrap) : the first param is not a pyslice !");
+ Py_ssize_t strt=2,stp=2,step=2;
+ PySliceObject *sliC=reinterpret_cast<PySliceObject *>(slic);
+ if(!arrIndxIn)
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArrays2 (wrap) : last array is null !");
+ arrIndxIn->checkAllocated();
+ if(arrIndxIn->getNumberOfComponents()!=1)
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArrays2 (wrap) : number of components of last argument must be equal to one !");
+ if(PySlice_GetIndices(sliC,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step)!=0)
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArrays2 (wrap) : Invalid slice regarding nb of elements !");
+ DataArrayInt *arrOut=0,*arrIndexOut=0;
+ MEDCouplingUMesh::ExtractFromIndexedArrays2(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
static PyObject *SetPartOfIndexedArrays(PyObject *li,
const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn,
const DataArrayInt *srcArr, const DataArrayInt *srcArrIndex) throw(INTERP_KERNEL::Exception)
return ret;
}
- PyObject *getReverseNodalConnectivity() const throw(INTERP_KERNEL::Exception)
- {
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
- self->getReverseNodalConnectivity(d0,d1);
- PyObject *ret=PyTuple_New(2);
- PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- return ret;
- }
-
DataArrayDouble *getPartBarycenterAndOwner(DataArrayInt *da) const throw(INTERP_KERNEL::Exception)
{
if(!da)
return ret;
}
- DataArrayInt *getCellIdsLyingOnNodes(PyObject *li, bool fullyIn) const throw(INTERP_KERNEL::Exception)
- {
- void *da=0;
- int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_ParaMEDMEM__DataArrayInt, 0 | 0 );
- if (!SWIG_IsOK(res1))
- {
- int size;
- INTERP_KERNEL::AutoPtr<int> tmp=convertPyToNewIntArr2(li,&size);
- return self->getCellIdsLyingOnNodes(tmp,((const int *)tmp)+size,fullyIn);
- }
- else
- {
- DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
- if(!da2)
- throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
- da2->checkAllocated();
- return self->getCellIdsLyingOnNodes(da2->getConstPointer(),da2->getConstPointer()+da2->getNbOfElems(),fullyIn);
- }
- }
-
- PyObject *getNodeIdsInUse() const throw(INTERP_KERNEL::Exception)
- {
- int ret1=-1;
- DataArrayInt *ret0=self->getNodeIdsInUse(ret1);
- PyObject *ret=PyTuple_New(2);
- PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
- PyTuple_SetItem(ret,1,PyInt_FromLong(ret1));
- return ret;
- }
-
static PyObject *Intersect2DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps) throw(INTERP_KERNEL::Exception)
{
DataArrayInt *cellNb1=0,*cellNb2=0;
MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy) throw(INTERP_KERNEL::Exception);
};
+ //== MEDCouplingUMesh End
+
+ //== MEDCouplingExtrudedMesh
+
class MEDCouplingExtrudedMesh : public ParaMEDMEM::MEDCouplingMesh
{
public:
static MEDCouplingExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *build3DUnstructuredMesh() const throw(INTERP_KERNEL::Exception);
- void updateTime() const throw(INTERP_KERNEL::Exception);
%extend {
MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception)
{
}
};
+ //== MEDCouplingExtrudedMesh End
+
+ class MEDCoupling1GTUMesh : public ParaMEDMEM::MEDCouplingPointSet
+ {
+ public:
+ static MEDCoupling1GTUMesh *New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
+ INTERP_KERNEL::NormalizedCellType getCellModelEnum() const throw(INTERP_KERNEL::Exception);
+ virtual void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ virtual void insertNextCell(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ int szArr,sw,iTypppArr;
+ std::vector<int> stdvecTyyppArr;
+ const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
+ self->insertNextCell(tmp,tmp+szArr);
+ }
+ }
+ };
+
+ //== MEDCoupling1SGTUMesh
+
+ class MEDCoupling1SGTUMesh : public ParaMEDMEM::MEDCoupling1GTUMesh
+ {
+ public:
+ static MEDCoupling1GTUMesh *New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
+ void setNodalConnectivity(DataArrayInt *nodalConn) throw(INTERP_KERNEL::Exception);
+ int getNodalConnectivityLength() const throw(INTERP_KERNEL::Exception);
+ int getNumberOfNodesPerCell() const throw(INTERP_KERNEL::Exception);
+ static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(const MEDCoupling1SGTUMesh *mesh1, const MEDCoupling1SGTUMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ MEDCoupling1SGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ MEDCoupling1SGTUMesh(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCoupling1SGTUMesh::New(name,type);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+
+ std::string __repr__() const throw(INTERP_KERNEL::Exception)
+ {
+ std::ostringstream oss;
+ self->reprQuickOverview(oss);
+ return oss.str();
+ }
+
+ DataArrayInt *getNodalConnectivity() const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret=self->getNodalConnectivity();
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ static MEDCoupling1SGTUMesh *Merge1SGTUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<const ParaMEDMEM::MEDCoupling1SGTUMesh *> tmp;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCoupling1SGTUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1SGTUMesh,"MEDCoupling1SGTUMesh",tmp);
+ return MEDCoupling1SGTUMesh::Merge1SGTUMeshes(tmp);
+ }
+
+ static MEDCoupling1SGTUMesh *Merge1SGTUMeshesOnSameCoords(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<const ParaMEDMEM::MEDCoupling1SGTUMesh *> tmp;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCoupling1SGTUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1SGTUMesh,"MEDCoupling1SGTUMesh",tmp);
+ return MEDCoupling1SGTUMesh::Merge1SGTUMeshesOnSameCoords(tmp);
+ }
+ }
+ };
+
+ //== MEDCoupling1SGTUMesh End
+
+ //== MEDCoupling1DGTUMesh
+
+ class MEDCoupling1DGTUMesh : public ParaMEDMEM::MEDCoupling1GTUMesh
+ {
+ public:
+ static MEDCoupling1DGTUMesh *New(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception);
+ void setNodalConnectivity(DataArrayInt *nodalConn, DataArrayInt *nodalConnIndex) throw(INTERP_KERNEL::Exception);
+ MEDCoupling1DGTUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
+ bool isPacked() const throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ MEDCoupling1DGTUMesh(const char *name, INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCoupling1DGTUMesh::New(name,type);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+
+ std::string __repr__() const throw(INTERP_KERNEL::Exception)
+ {
+ std::ostringstream oss;
+ self->reprQuickOverview(oss);
+ return oss.str();
+ }
+
+ DataArrayInt *getNodalConnectivity() const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret=self->getNodalConnectivity();
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ DataArrayInt *getNodalConnectivityIndex() const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret=self->getNodalConnectivityIndex();
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ PyObject *retrievePackedNodalConnectivity() const throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret1=0,*ret2=0;
+ bool ret0=self->retrievePackedNodalConnectivity(ret1,ret2);
+ PyObject *ret0Py=ret0?Py_True:Py_False;
+ Py_XINCREF(ret0Py);
+ PyObject *ret=PyTuple_New(3);
+ PyTuple_SetItem(ret,0,ret0Py);
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(ret1),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(ret2),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
+ PyObject *copyWithNodalConnectivityPacked() const throw(INTERP_KERNEL::Exception)
+ {
+ bool ret1;
+ MEDCoupling1DGTUMesh *ret0=self->copyWithNodalConnectivityPacked(ret1);
+ PyObject *ret=PyTuple_New(2);
+ PyObject *ret1Py=ret1?Py_True:Py_False; Py_XINCREF(ret1Py);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__MEDCoupling1DGTUMesh, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,ret1Py);
+ return ret;
+ }
+
+ static MEDCoupling1DGTUMesh *Merge1DGTUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<const ParaMEDMEM::MEDCoupling1DGTUMesh *> tmp;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCoupling1DGTUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1DGTUMesh,"MEDCoupling1DGTUMesh",tmp);
+ return MEDCoupling1DGTUMesh::Merge1DGTUMeshes(tmp);
+ }
+
+ static MEDCoupling1DGTUMesh *Merge1DGTUMeshesOnSameCoords(PyObject *li) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<const ParaMEDMEM::MEDCoupling1DGTUMesh *> tmp;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::MEDCoupling1DGTUMesh *>(li,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1DGTUMesh,"MEDCoupling1DGTUMesh",tmp);
+ return MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords(tmp);
+ }
+
+ static DataArrayInt *AggregateNodalConnAndShiftNodeIds(PyObject *li, const std::vector<int>& offsetInNodeIdsPerElt) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<const ParaMEDMEM::DataArrayInt *> tmp;
+ convertFromPyObjVectorOfObj<const ParaMEDMEM::DataArrayInt *>(li,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,"DataArrayInt",tmp);
+ return MEDCoupling1DGTUMesh::AggregateNodalConnAndShiftNodeIds(tmp,offsetInNodeIdsPerElt);
+ }
+ }
+ };
+
+ //== MEDCoupling1DGTUMeshEnd
+
class MEDCouplingStructuredMesh : public ParaMEDMEM::MEDCouplingMesh
{
public:
- void updateTime() const throw(INTERP_KERNEL::Exception);
int getCellIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
int getNodeIdFromPos(int i, int j, int k) const throw(INTERP_KERNEL::Exception);
};
+ //== MEDCouplingCMesh
+
class MEDCouplingCMesh : public ParaMEDMEM::MEDCouplingStructuredMesh
{
public:
}
};
+ //== MEDCouplingCMesh End
+
+ //== MEDCouplingCurveLinearMesh
+
class MEDCouplingCurveLinearMesh : public ParaMEDMEM::MEDCouplingStructuredMesh
{
public:
}
}
};
-
+
+ //== MEDCouplingCurveLinearMesh End
}
%extend ParaMEDMEM::MEDCouplingFieldDiscretization
static MEDCouplingFieldTemplate *New(TypeOfField type);
std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
- void updateTime() const;
%extend
{
MEDCouplingFieldTemplate(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception)
void setEndOrder(int order) throw(INTERP_KERNEL::Exception);
void setTimeValue(double val) throw(INTERP_KERNEL::Exception);
void setEndTimeValue(double val) throw(INTERP_KERNEL::Exception);
- void updateTime() const throw(INTERP_KERNEL::Exception);
void changeUnderlyingMesh(const MEDCouplingMesh *other, int levOfCheck, double precOnMesh, double eps=1e-15) throw(INTERP_KERNEL::Exception);
void substractInPlaceDM(const MEDCouplingFieldDouble *f, int levOfCheck, double precOnMesh, double eps=1e-15) throw(INTERP_KERNEL::Exception);
bool mergeNodes(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
if (!SWIG_IsOK(res1))
{
int size;
- INTERP_KERNEL::AutoPtr<double> tmp=convertPyToNewDblArr2(li,&size);
+ INTERP_KERNEL::AutoCPtr<double> tmp=convertPyToNewDblArr2(li,&size);
const MEDCouplingMesh *mesh=self->getMesh();
if(!mesh)
throw INTERP_KERNEL::Exception("Python wrap MEDCouplingFieldDouble::getValueOnMulti : lying on a null mesh !");
return convertDblArrToPyList(res,sz);
}
- void setValues(PyObject *li) throw(INTERP_KERNEL::Exception)
+ void setValues(PyObject *li, PyObject *nbOfTuples=0, PyObject *nbOfComp=0) throw(INTERP_KERNEL::Exception)
{
if(self->getArray()!=0)
+ ParaMEDMEM_DataArrayDouble_setValues__SWIG_0(self->getArray(),li,nbOfTuples,nbOfComp);
+ else
{
- int sz;
- double *tmp=convertPyToNewDblArr2(li,&sz);
- int nbTuples=self->getArray()->getNumberOfTuples();
- int nbOfCompo=self->getArray()->getNumberOfComponents();
- self->getArray()->useArray(tmp,true,CPP_DEALLOC,nbTuples,nbOfCompo);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::New();
+ ParaMEDMEM_DataArrayDouble_setValues__SWIG_0(arr,li,nbOfTuples,nbOfComp);
+ self->setArray(arr);
}
- else
- throw INTERP_KERNEL::Exception("setValuesCpy : field must contain an array behind");
}
PyObject *getTime() throw(INTERP_KERNEL::Exception)
case 1:
{
std::vector<int> v2(1,singleVal);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr=ret0Arr->keepSelectedComponents(v2);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr=static_cast<DataArrayDouble *>(ret0Arr->keepSelectedComponents(v2));
ret0->setArray(aarr);
return ret0.retn();
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr=ret0Arr->keepSelectedComponents(multiVal);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr=static_cast<DataArrayDouble *>(ret0Arr->keepSelectedComponents(multiVal));
ret0->setArray(aarr);
return ret0.retn();
}
std::vector<int> v2(nbOfComp);
for(int i=0;i<nbOfComp;i++)
v2[i]=slic.first+i*slic.second.second;
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr=ret0Arr->keepSelectedComponents(v2);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr=static_cast<DataArrayDouble *>(ret0Arr->keepSelectedComponents(v2));
ret0->setArray(aarr);
return ret0.retn();
}
virtual bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
virtual bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
virtual void checkCoherency() const throw(INTERP_KERNEL::Exception);
- void updateTime() const throw(INTERP_KERNEL::Exception);
%extend
{
std::string __str__() const throw(INTERP_KERNEL::Exception)