-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
%{
#include "MEDCouplingMemArray.hxx"
#include "MEDCouplingUMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingCMesh.hxx"
#include "MEDCouplingIMesh.hxx"
#include "MEDCouplingCurveLinearMesh.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingField.hxx"
#include "MEDCouplingFieldDouble.hxx"
+#include "MEDCouplingFieldInt.hxx"
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingGaussLocalization.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
#include "MEDCouplingMultiFields.hxx"
#include "MEDCouplingFieldOverTime.hxx"
#include "MEDCouplingDefinitionTime.hxx"
%newobject MEDCoupling::MEDCouplingFieldDouble::getEndArray;
%newobject MEDCoupling::MEDCouplingFieldDouble::MergeFields;
%newobject MEDCoupling::MEDCouplingFieldDouble::MeldFields;
+%newobject MEDCoupling::MEDCouplingFieldDouble::convertToIntField;
%newobject MEDCoupling::MEDCouplingFieldDouble::doublyContractedProduct;
%newobject MEDCoupling::MEDCouplingFieldDouble::determinant;
%newobject MEDCoupling::MEDCouplingFieldDouble::eigenValues;
%newobject MEDCoupling::MEDCouplingFieldDouble::DivideFields;
%newobject MEDCoupling::MEDCouplingFieldDouble::min;
%newobject MEDCoupling::MEDCouplingFieldDouble::negate;
-%newobject MEDCoupling::MEDCouplingFieldDouble::getIdsInRange;
+%newobject MEDCoupling::MEDCouplingFieldDouble::findIdsInRange;
%newobject MEDCoupling::MEDCouplingFieldDouble::buildSubPart;
%newobject MEDCoupling::MEDCouplingFieldDouble::buildSubPartRange;
+%newobject MEDCoupling::MEDCouplingFieldDouble::voronoize;
+%newobject MEDCoupling::MEDCouplingFieldDouble::convertQuadraticCellsToLinear;
%newobject MEDCoupling::MEDCouplingFieldDouble::__getitem__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__neg__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__add__;
%newobject MEDCoupling::MEDCouplingFieldDouble::__rdiv__;
%newobject MEDCoupling::MEDCouplingFieldDouble::clone;
%newobject MEDCoupling::MEDCouplingFieldDouble::cloneWithMesh;
-%newobject MEDCoupling::MEDCouplingFieldDouble::deepCpy;
+%newobject MEDCoupling::MEDCouplingFieldDouble::deepCopy;
%newobject MEDCoupling::MEDCouplingFieldDouble::buildNewTimeReprFromThis;
%newobject MEDCoupling::MEDCouplingFieldDouble::nodeToCellDiscretization;
%newobject MEDCoupling::MEDCouplingFieldDouble::cellToNodeDiscretization;
%newobject MEDCoupling::MEDCouplingFieldDouble::getValueOnMulti;
+%newobject MEDCoupling::MEDCouplingFieldDouble::computeVectorFieldCyl;
+%newobject MEDCoupling::MEDCouplingFieldInt::New;
+%newobject MEDCoupling::MEDCouplingFieldInt::convertToDblField;
+%newobject MEDCoupling::MEDCouplingFieldInt::getArray;
+%newobject MEDCoupling::MEDCouplingFieldInt::deepCopy;
+%newobject MEDCoupling::MEDCouplingFieldInt::clone;
+%newobject MEDCoupling::MEDCouplingFieldInt::cloneWithMesh;
%newobject MEDCoupling::MEDCouplingFieldTemplate::New;
-%newobject MEDCoupling::MEDCouplingMesh::deepCpy;
+%newobject MEDCoupling::MEDCouplingMesh::deepCopy;
%newobject MEDCoupling::MEDCouplingMesh::clone;
%newobject MEDCoupling::MEDCouplingMesh::checkDeepEquivalOnSameNodesWith;
%newobject MEDCoupling::MEDCouplingMesh::checkTypeConsistencyAndContig;
%newobject MEDCoupling::MEDCouplingMesh::buildPartRange;
%newobject MEDCoupling::MEDCouplingMesh::giveCellsWithType;
%newobject MEDCoupling::MEDCouplingMesh::getCoordinatesAndOwner;
-%newobject MEDCoupling::MEDCouplingMesh::getBarycenterAndOwner;
+%newobject MEDCoupling::MEDCouplingMesh::computeCellCenterOfMass;
%newobject MEDCoupling::MEDCouplingMesh::computeIsoBarycenterOfNodesPerCell;
%newobject MEDCoupling::MEDCouplingMesh::buildOrthogonalField;
%newobject MEDCoupling::MEDCouplingMesh::getCellIdsFullyIncludedInNodeIds;
%newobject MEDCoupling::MEDCouplingMesh::mergeMyselfWith;
%newobject MEDCoupling::MEDCouplingMesh::fillFromAnalytic;
-%newobject MEDCoupling::MEDCouplingMesh::fillFromAnalytic2;
-%newobject MEDCoupling::MEDCouplingMesh::fillFromAnalytic3;
+%newobject MEDCoupling::MEDCouplingMesh::fillFromAnalyticCompo;
+%newobject MEDCoupling::MEDCouplingMesh::fillFromAnalyticNamedCompo;
%newobject MEDCoupling::MEDCouplingMesh::getMeasureField;
%newobject MEDCoupling::MEDCouplingMesh::simplexize;
%newobject MEDCoupling::MEDCouplingMesh::buildUnstructured;
%newobject MEDCoupling::MEDCouplingMesh::MergeMeshes;
+%newobject MEDCoupling::MEDCouplingMesh::getDirectAccessOfCoordsArrIfInStructure;
%newobject MEDCoupling::MEDCouplingPointSet::zipCoordsTraducer;
%newobject MEDCoupling::MEDCouplingPointSet::getCellsInBoundingBox;
%newobject MEDCoupling::MEDCouplingPointSet::findBoundaryNodes;
%newobject MEDCoupling::MEDCouplingPointSet::buildBoundaryMesh;
%newobject MEDCoupling::MEDCouplingPointSet::MergeNodesArray;
-%newobject MEDCoupling::MEDCouplingPointSet::buildPartOfMySelf2;
+%newobject MEDCoupling::MEDCouplingPointSet::buildPartOfMySelfSlice;
%newobject MEDCoupling::MEDCouplingPointSet::BuildInstanceFromMeshType;
%newobject MEDCoupling::MEDCouplingPointSet::zipConnectivityTraducer;
%newobject MEDCoupling::MEDCouplingPointSet::mergeMyselfWithOnSameCoords;
%newobject MEDCoupling::MEDCouplingPointSet::fillCellIdsToKeepFromNodeIds;
%newobject MEDCoupling::MEDCouplingPointSet::getCellIdsLyingOnNodes;
-%newobject MEDCoupling::MEDCouplingPointSet::deepCpyConnectivityOnly;
+%newobject MEDCoupling::MEDCouplingPointSet::deepCopyConnectivityOnly;
%newobject MEDCoupling::MEDCouplingPointSet::getBoundingBoxForBBTree;
%newobject MEDCoupling::MEDCouplingPointSet::computeFetchedNodeIds;
%newobject MEDCoupling::MEDCouplingPointSet::ComputeNbOfInteractionsWithSrcCells;
%newobject MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity;
%newobject MEDCoupling::MEDCouplingUMesh::buildDescendingConnectivity2;
%newobject MEDCoupling::MEDCouplingUMesh::explode3DMeshTo1D;
+%newobject MEDCoupling::MEDCouplingUMesh::explodeMeshIntoMicroEdges;
%newobject MEDCoupling::MEDCouplingUMesh::buildExtrudedMesh;
%newobject MEDCoupling::MEDCouplingUMesh::buildSpreadZonesWithPoly;
%newobject MEDCoupling::MEDCouplingUMesh::MergeUMeshes;
%newobject MEDCoupling::MEDCouplingUMesh::ComputeSpreadZoneGraduallyFromSeed;
%newobject MEDCoupling::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt;
%newobject MEDCoupling::MEDCouplingUMesh::conformize2D;
+%newobject MEDCoupling::MEDCouplingUMesh::conformize3D;
%newobject MEDCoupling::MEDCouplingUMesh::colinearize2D;
%newobject MEDCoupling::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes;
%newobject MEDCoupling::MEDCouplingUMesh::sortCellsInMEDFileFrmt;
%newobject MEDCoupling::MEDCouplingUMesh::buildPartOrthogonalField;
%newobject MEDCoupling::MEDCouplingUMesh::keepCellIdsByType;
%newobject MEDCoupling::MEDCouplingUMesh::Build0DMeshFromCoords;
+%newobject MEDCoupling::MEDCouplingUMesh::Build1DMeshFromCoords;
%newobject MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DExtrudedCells;
%newobject MEDCoupling::MEDCouplingUMesh::findAndCorrectBadOriented3DCells;
%newobject MEDCoupling::MEDCouplingUMesh::convertIntoSingleGeoTypeMesh;
%newobject MEDCoupling::MEDCouplingUMesh::buildUnionOf3DMesh;
%newobject MEDCoupling::MEDCouplingUMesh::generateGraph;
%newobject MEDCoupling::MEDCouplingUMesh::orderConsecutiveCells1D;
+%newobject MEDCoupling::MEDCouplingUMesh::clipSingle3DCellByPlane;
%newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTreeFast;
%newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic;
%newobject MEDCoupling::MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic;
%newobject MEDCoupling::MEDCoupling1DGTUMesh::buildSetInstanceFromThis;
%newobject MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshes;
%newobject MEDCoupling::MEDCoupling1DGTUMesh::Merge1DGTUMeshesOnSameCoords;
-%newobject MEDCoupling::MEDCouplingExtrudedMesh::New;
-%newobject MEDCoupling::MEDCouplingExtrudedMesh::build3DUnstructuredMesh;
+%newobject MEDCoupling::MEDCouplingMappedExtrudedMesh::New;
+%newobject MEDCoupling::MEDCouplingMappedExtrudedMesh::build3DUnstructuredMesh;
%newobject MEDCoupling::MEDCouplingStructuredMesh::buildStructuredSubPart;
%newobject MEDCoupling::MEDCouplingStructuredMesh::build1SGTUnstructured;
%newobject MEDCoupling::MEDCouplingStructuredMesh::build1SGTSubLevelMesh;
%newobject MEDCoupling::MEDCouplingCurveLinearMesh::New;
%newobject MEDCoupling::MEDCouplingCurveLinearMesh::getCoords;
%newobject MEDCoupling::MEDCouplingMultiFields::New;
-%newobject MEDCoupling::MEDCouplingMultiFields::deepCpy;
+%newobject MEDCoupling::MEDCouplingMultiFields::deepCopy;
%newobject MEDCoupling::MEDCouplingFieldOverTime::New;
%newobject MEDCoupling::MEDCouplingCartesianAMRPatchGen::getMesh;
%newobject MEDCoupling::MEDCouplingCartesianAMRPatchGen::__getitem__;
-%newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::deepCpy;
+%newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::deepCopy;
%newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildUnstructured;
%newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::extractGhostFrom;
%newobject MEDCoupling::MEDCouplingCartesianAMRMeshGen::buildMeshFromPatchEnvelop;
%newobject MEDCoupling::MEDCouplingCartesianAMRMesh::New;
%newobject MEDCoupling::MEDCouplingDataForGodFather::getMyGodFather;
%newobject MEDCoupling::MEDCouplingAMRAttribute::New;
-%newobject MEDCoupling::MEDCouplingAMRAttribute::deepCpy;
+%newobject MEDCoupling::MEDCouplingAMRAttribute::deepCopy;
%newobject MEDCoupling::MEDCouplingAMRAttribute::deepCpyWithoutGodFather;
%newobject MEDCoupling::MEDCouplingAMRAttribute::getFieldOn;
%newobject MEDCoupling::MEDCouplingAMRAttribute::projectTo;
%newobject MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithGhost;
%newobject MEDCoupling::MEDCouplingAMRAttribute::buildCellFieldOnWithoutGhost;
%newobject MEDCoupling::DenseMatrix::New;
-%newobject MEDCoupling::DenseMatrix::deepCpy;
+%newobject MEDCoupling::DenseMatrix::deepCopy;
%newobject MEDCoupling::DenseMatrix::shallowCpy;
%newobject MEDCoupling::DenseMatrix::getData;
%newobject MEDCoupling::DenseMatrix::matVecMult;
%newobject MEDCoupling::DenseMatrix::__add__;
%newobject MEDCoupling::DenseMatrix::__sub__;
%newobject MEDCoupling::DenseMatrix::__mul__;
-%newobject MEDCoupling::PartDefinition::New;
-%newobject MEDCoupling::PartDefinition::toDAI;
-%newobject MEDCoupling::PartDefinition::__add__;
-%newobject MEDCoupling::PartDefinition::composeWith;
-%newobject MEDCoupling::PartDefinition::tryToSimplify;
-%newobject MEDCoupling::DataArrayPartDefinition::New;
-%newobject MEDCoupling::SlicePartDefinition::New;
+%newobject MEDCoupling::MEDCouplingGaussLocalization::localizePtsInRefCooForEachCell;
+%newobject MEDCoupling::MEDCouplingGaussLocalization::buildRefCell;
+%newobject MEDCoupling::MEDCouplingSkyLineArray::BuildFromPolyhedronConn;
%feature("unref") MEDCouplingPointSet "$this->decrRef();"
%feature("unref") MEDCouplingMesh "$this->decrRef();"
%feature("unref") MEDCoupling1GTUMesh "$this->decrRef();"
%feature("unref") MEDCoupling1SGTUMesh "$this->decrRef();"
%feature("unref") MEDCoupling1DGTUMesh "$this->decrRef();"
-%feature("unref") MEDCouplingExtrudedMesh "$this->decrRef();"
+%feature("unref") MEDCouplingMappedExtrudedMesh "$this->decrRef();"
%feature("unref") MEDCouplingCMesh "$this->decrRef();"
%feature("unref") MEDCouplingIMesh "$this->decrRef();"
%feature("unref") MEDCouplingCurveLinearMesh "$this->decrRef();"
%feature("unref") MEDCouplingDataForGodFather "$this->decrRef();"
%feature("unref") MEDCouplingAMRAttribute "$this->decrRef();"
%feature("unref") DenseMatrix "$this->decrRef();"
-%feature("unref") PartDefinition "$this->decrRef();"
-%feature("unref") DataArrayPartDefinition "$this->decrRef();"
-%feature("unref") SlicePartDefinition "$this->decrRef();"
+%feature("unref") MEDCouplingSkyLineArray "$this->decrRef();"
%rename(assign) *::operator=;
%ignore MEDCoupling::MEDCouplingGaussLocalization::pushTinySerializationIntInfo;
class DataArrayInt;
class DataArrayDouble;
class MEDCouplingUMesh;
+ class MEDCouplingCMesh;
class MEDCouplingFieldDouble;
%extend RefCountObject
std::string getTimeUnit() const;
virtual MEDCouplingMeshType getType() const throw(INTERP_KERNEL::Exception);
bool isStructured() const throw(INTERP_KERNEL::Exception);
- virtual MEDCouplingMesh *deepCpy() const throw(INTERP_KERNEL::Exception);
+ virtual MEDCouplingMesh *deepCopy() 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);
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 void checkCoherency1(double eps=1e-12) const throw(INTERP_KERNEL::Exception);
+ virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
+ virtual void checkConsistency(double eps=1e-12) const throw(INTERP_KERNEL::Exception);
virtual int getNumberOfCells() const throw(INTERP_KERNEL::Exception);
virtual int getNumberOfNodes() const throw(INTERP_KERNEL::Exception);
virtual int getSpaceDimension() const throw(INTERP_KERNEL::Exception);
virtual int getMeshDimension() const throw(INTERP_KERNEL::Exception);
virtual DataArrayDouble *getCoordinatesAndOwner() const throw(INTERP_KERNEL::Exception);
- virtual DataArrayDouble *getBarycenterAndOwner() const throw(INTERP_KERNEL::Exception);
+ virtual DataArrayDouble *computeCellCenterOfMass() 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 MEDCouplingFieldDouble *getMeasureField(bool isAbs) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingFieldDouble *fillFromAnalytic(TypeOfField t, int nbOfComp, const std::string& func) const throw(INTERP_KERNEL::Exception);
- virtual MEDCouplingFieldDouble *fillFromAnalytic2(TypeOfField t, int nbOfComp, const std::string& func) const throw(INTERP_KERNEL::Exception);
- virtual MEDCouplingFieldDouble *fillFromAnalytic3(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) const throw(INTERP_KERNEL::Exception);
+ virtual MEDCouplingFieldDouble *fillFromAnalyticCompo(TypeOfField t, int nbOfComp, const std::string& func) const throw(INTERP_KERNEL::Exception);
+ virtual MEDCouplingFieldDouble *fillFromAnalyticNamedCompo(TypeOfField t, int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingFieldDouble *buildOrthogonalField() const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception);
virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception);
PyList_SetItem(res,2,SWIG_From_int(tmp2));
return res;
}
+
+ DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const throw(INTERP_KERNEL::Exception)
+ {
+ const DataArrayDouble *ret(self->getDirectAccessOfCoordsArrIfInStructure());
+ DataArrayDouble *ret2(const_cast<DataArrayDouble *>(ret));
+ if(ret2)
+ ret2->incrRef();
+ return ret2;
+ }
int getCellContainingPoint(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
{
int spaceDim=self->getSpaceDimension();
const char msg[]="Python wrap of MEDCouplingMesh::getCellsContainingPoint : ";
const double *pos=convertObjToPossibleCpp5_Safe(p,sw,val,a,aa,bb,msg,nbOfPoints,spaceDim,true);
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> elts,eltsIndex;
+ MCAuto<DataArrayInt> elts,eltsIndex;
self->getCellsContainingPoints(pos,nbOfPoints,eps,elts,eltsIndex);
PyObject *ret=PyTuple_New(2);
PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(elts.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
PyObject *getCellsContainingPoints(PyObject *p, double eps) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> elts,eltsIndex;
+ MCAuto<DataArrayInt> elts,eltsIndex;
int spaceDim=self->getSpaceDimension();
void *da=0;
int res1=SWIG_ConvertPtr(p,&da,SWIGTYPE_p_MEDCoupling__DataArrayDouble, 0 | 0 );
virtual PyObject *getReverseNodalConnectivity() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<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_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
int getDimension() const throw(INTERP_KERNEL::Exception);
int getNumberOfPtsInRefCell() const throw(INTERP_KERNEL::Exception);
std::string getStringRepr() const throw(INTERP_KERNEL::Exception);
- void checkCoherency() const throw(INTERP_KERNEL::Exception);
+ void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
bool isEqual(const MEDCouplingGaussLocalization& other, double eps) const throw(INTERP_KERNEL::Exception);
//
const std::vector<double>& getRefCoords() const throw(INTERP_KERNEL::Exception);
void setWeights(const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
//
static bool AreAlmostEqual(const std::vector<double>& v1, const std::vector<double>& v2, double eps);
+ //
+ %extend
+ {
+ DataArrayDouble *localizePtsInRefCooForEachCell(const DataArrayDouble *ptsInRefCoo, const MEDCouplingUMesh *mesh) const throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<DataArrayDouble> ret(self->localizePtsInRefCooForEachCell(ptsInRefCoo,mesh));
+ return ret.retn();
+ }
+
+ MEDCouplingUMesh *buildRefCell() const throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<MEDCouplingUMesh> ret(self->buildRefCell());
+ return ret.retn();
+ }
+ }
};
class MEDCouplingSkyLineArray
{
- public:
- MEDCouplingSkyLineArray();
- MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray &myArray );
- MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value );
- MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value );
+ public:
+ static MEDCouplingSkyLineArray *BuildFromPolyhedronConn( const DataArrayInt* c, const DataArrayInt* cI ) throw(INTERP_KERNEL::Exception);
void set( DataArrayInt* index, DataArrayInt* value );
+ void set3( DataArrayInt* superIndex, DataArrayInt* index, DataArrayInt* value );
+
+ int getSuperNumberOf() const;
int getNumberOf() const;
int getLength() const;
+
+ DataArrayInt* getSuperIndexArray() const;
DataArrayInt* getIndexArray() const;
- DataArrayInt* getValueArray() const;
- %extend
+ DataArrayInt* getValuesArray() const;
+
+ void deletePack(const int i, const int j) throw(INTERP_KERNEL::Exception);
+
+ %extend
+ {
+ MEDCouplingSkyLineArray() throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCouplingSkyLineArray::New();
+ }
+
+ MEDCouplingSkyLineArray( const std::vector<int>& index, const std::vector<int>& value) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCouplingSkyLineArray::New(index, value);
+ }
+
+ MEDCouplingSkyLineArray( DataArrayInt* index, DataArrayInt* value ) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCouplingSkyLineArray::New(index, value);
+ }
+
+ MEDCouplingSkyLineArray( const MEDCouplingSkyLineArray & other ) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCouplingSkyLineArray::New(other);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+
+ PyObject *getSimplePackSafe(int absolutePackId) const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> ret;
+ self->getSimplePackSafe(absolutePackId,ret);
+ return convertIntArrToPyList2(ret);
+ }
+
+ PyObject *findPackIds(PyObject *superPackIndices, PyObject *pack) const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> vpack, vspIdx, out;
+
+ convertPyToNewIntArr3(superPackIndices,vspIdx);
+ convertPyToNewIntArr3(pack,vpack);
+
+ self->findPackIds(vspIdx, vpack.data(), vpack.data()+vpack.size(), out);
+ return convertIntArrToPyList2(out);
+ }
+
+ void pushBackPack(const int i, PyObject *pack) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> vpack;
+ convertPyToNewIntArr3(pack,vpack);
+ self->pushBackPack(i,vpack.data(), vpack.data()+vpack.size());
+ }
+
+ void replaceSimplePack(const int idx, PyObject *pack) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> vpack;
+ convertPyToNewIntArr3(pack,vpack);
+ self->replaceSimplePack(idx, vpack.data(), vpack.data()+vpack.size());
+ }
+
+ void replacePack(const int superIdx, const int idx, PyObject *pack) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<int> vpack;
+ convertPyToNewIntArr3(pack,vpack);
+ self->replacePack(superIdx, idx, vpack.data(), vpack.data()+vpack.size());
+ }
+
+ PyObject *convertToPolyhedronConn() const throw(INTERP_KERNEL::Exception)
{
- std::string __str__() const throw(INTERP_KERNEL::Exception)
- {
- return self->simpleRepr();
- }
- }
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<DataArrayInt> d1=DataArrayInt::New();
+ self->convertToPolyhedronConn(d0,d1);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+ }
};
}
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 MEDCouplingPointSet *buildPartOfMySelfSlice(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 *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);
+ virtual MEDCouplingPointSet *deepCopyConnectivityOnly() const throw(INTERP_KERNEL::Exception);
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);
return convertMesh(ret, SWIG_POINTER_OWN | 0 );
}
- virtual PyObject *buildPartOfMySelfKeepCoords2(int start, int end, int step) const throw(INTERP_KERNEL::Exception)
+ virtual PyObject *buildPartOfMySelfKeepCoordsSlice(int start, int end, int step) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoords2(start,end,step);
+ MEDCouplingPointSet *ret=self->buildPartOfMySelfKeepCoordsSlice(start,end,step);
return convertMesh(ret, SWIG_POINTER_OWN | 0 );
}
self->renumberNodes(tmp,newNbOfNodes);
}
- void renumberNodes2(PyObject *li, int newNbOfNodes) throw(INTERP_KERNEL::Exception)
+ void renumberNodesCenter(PyObject *li, int newNbOfNodes) throw(INTERP_KERNEL::Exception)
{
int szArr,sw,iTypppArr;
std::vector<int> stdvecTyyppArr;
const int *tmp=convertObjToPossibleCpp1_Safe(li,sw,szArr,iTypppArr,stdvecTyyppArr);
- self->renumberNodes2(tmp,newNbOfNodes);
+ self->renumberNodesCenter(tmp,newNbOfNodes);
}
PyObject *findNodesOnLine(PyObject *pt, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
return res;
}
- virtual PyObject *mergeNodes2(double precision) throw(INTERP_KERNEL::Exception)
+ virtual PyObject *mergeNodesCenter(double precision) throw(INTERP_KERNEL::Exception)
{
bool ret1;
int ret2;
- DataArrayInt *ret0=self->mergeNodes2(precision,ret1,ret2);
+ DataArrayInt *ret0=self->mergeNodesCenter(precision,ret1,ret2);
PyObject *res = PyList_New(3);
PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
PyList_SetItem(res,1,SWIG_From_bool(ret1));
}
case 3:
{
- return self->buildPartOfMySelf2(slic.first,slic.second.first,slic.second.second,true);
+ return self->buildPartOfMySelfSlice(slic.first,slic.second.first,slic.second.second,true);
}
case 4:
{
int sz;
INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
- MEDCoupling::MEDCouplingPointSet::Rotate2DAlg(c,angle,nbNodes,coo);
+ MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,coo);
for(int i=0;i<sz;i++)
PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
}
"Rotate2DAlg",2,true,nbNodes);
if(sw!=2 && sw!=3)
throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate2DAlg : try another overload method !");
- MEDCoupling::MEDCouplingPointSet::Rotate2DAlg(c,angle,nbNodes,const_cast<double *>(coo));
+ MEDCoupling::DataArrayDouble::Rotate2DAlg(c,angle,nbNodes,coo,const_cast<double *>(coo));
}
static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
INTERP_KERNEL::AutoCPtr<double> c=convertPyToNewDblArr2(center,&sz);
INTERP_KERNEL::AutoCPtr<double> coo=convertPyToNewDblArr2(coords,&sz);
INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
- MEDCoupling::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,coo);
+ MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,coo);
for(int i=0;i<sz;i++)
PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
}
if(sw!=2 && sw!=3)
throw INTERP_KERNEL::Exception("Invalid call to MEDCouplingPointSet::Rotate3DAlg : try another overload method !");
INTERP_KERNEL::AutoCPtr<double> v=convertPyToNewDblArr2(vect,&sz2);
- MEDCoupling::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,const_cast<double *>(coo));
+ MEDCoupling::DataArrayDouble::Rotate3DAlg(c,v,angle,nbNodes,coo,const_cast<double *>(coo));
}
}
};
public:
static MEDCouplingUMesh *New() throw(INTERP_KERNEL::Exception);
static MEDCouplingUMesh *New(const char *meshName, int meshDim) throw(INTERP_KERNEL::Exception);
- void checkCoherency() const throw(INTERP_KERNEL::Exception);
+ void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
void setMeshDimension(int meshDim) throw(INTERP_KERNEL::Exception);
void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
void finishInsertingCells() throw(INTERP_KERNEL::Exception);
MEDCouplingUMeshCellByTypeEntry *cellsByType() throw(INTERP_KERNEL::Exception);
void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true) throw(INTERP_KERNEL::Exception);
INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const throw(INTERP_KERNEL::Exception);
- void setPartOfMySelf2(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception);
- int getMeshLength() const throw(INTERP_KERNEL::Exception);
+ void setPartOfMySelfSlice(int start, int end, int step, const MEDCouplingUMesh& otherOnSameCoordsThanThis) throw(INTERP_KERNEL::Exception);
+ int getNodalConnectivityArrayLen() const throw(INTERP_KERNEL::Exception);
void computeTypes() throw(INTERP_KERNEL::Exception);
std::string reprConnectivityOfThis() const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception);
//tools
DataArrayInt *conformize2D(double eps) throw(INTERP_KERNEL::Exception);
+ DataArrayInt *conformize3D(double eps) throw(INTERP_KERNEL::Exception);
DataArrayInt *colinearize2D(double eps) throw(INTERP_KERNEL::Exception);
void shiftNodeNumbersInConn(int delta) throw(INTERP_KERNEL::Exception);
std::vector<bool> getQuadraticStatus() const 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);
+ MEDCouplingUMesh *explodeMeshIntoMicroEdges(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const throw(INTERP_KERNEL::Exception);
void orientCorrectlyPolyhedrons() throw(INTERP_KERNEL::Exception);
bool isPresenceOfQuadratic() const throw(INTERP_KERNEL::Exception);
bool isFullyQuadratic() const throw(INTERP_KERNEL::Exception);
DataArrayInt *findAndCorrectBadOriented3DExtrudedCells() throw(INTERP_KERNEL::Exception);
DataArrayInt *findAndCorrectBadOriented3DCells() throw(INTERP_KERNEL::Exception);
MEDCoupling::MEDCoupling1GTUMesh *convertIntoSingleGeoTypeMesh() const throw(INTERP_KERNEL::Exception);
+ MEDCouplingSkyLineArray *generateGraph() const throw(INTERP_KERNEL::Exception);
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);
return self->cellIterator();
}
+ static MEDCouplingUMesh *Build1DMeshFromCoords(DataArrayDouble *da) throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<MEDCouplingUMesh> ret(MEDCouplingUMesh::Build1DMeshFromCoords(da));
+ return ret.retn();
+ }
+
PyObject *getAllGeoTypesSorted() const throw(INTERP_KERNEL::Exception)
{
std::vector<INTERP_KERNEL::NormalizedCellType> result=self->getAllGeoTypesSorted();
}
case 3:
{
- self->setPartOfMySelf2(slic.first,slic.second.first,slic.second.second,otherOnSameCoordsThanThis);
+ self->setPartOfMySelfSlice(slic.first,slic.second.first,slic.second.second,otherOnSameCoordsThanThis);
break;
}
case 4:
return ret;
}
+ static PyObject *PartitionBySpreadZone(const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<DataArrayInt *> retCpp(MEDCouplingUMesh::PartitionBySpreadZone(arrIn,arrIndxIn));
+ int sz=retCpp.size();
+ PyObject *ret=PyList_New(sz);
+ for(int i=0;i<sz;i++)
+ PyList_SetItem(ret,i,SWIG_NewPointerObj(SWIG_as_voidptr(retCpp[i]),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
PyObject *keepSpecifiedCells(INTERP_KERNEL::NormalizedCellType type, PyObject *ids) const throw(INTERP_KERNEL::Exception)
{
int size;
return ret;
}
- static PyObject *ExtractFromIndexedArrays2(int strt, int stp, int step, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
+ static PyObject *ExtractFromIndexedArraysSlice(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);
+ MEDCouplingUMesh::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
PyObject *ret=PyTuple_New(2);
PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return ret;
}
- static PyObject *ExtractFromIndexedArrays2(PyObject *slic, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn) throw(INTERP_KERNEL::Exception)
+ static PyObject *ExtractFromIndexedArraysSlice(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 !");
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (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 !");
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (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 !");
- GetIndicesOfSlice(sliC,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArrays2 (wrap) : Invalid slice regarding nb of elements !");
+ throw INTERP_KERNEL::Exception("ExtractFromIndexedArraysSlice (wrap) : number of components of last argument must be equal to one !");
+ GetIndicesOfSlice(sliC,arrIndxIn->getNumberOfTuples(),&strt,&stp,&step,"ExtractFromIndexedArraysSlice (wrap) : Invalid slice regarding nb of elements !");
DataArrayInt *arrOut=0,*arrIndexOut=0;
- MEDCouplingUMesh::ExtractFromIndexedArrays2(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
+ MEDCouplingUMesh::ExtractFromIndexedArraysSlice(strt,stp,step,arrIn,arrIndxIn,arrOut,arrIndexOut);
PyObject *ret=PyTuple_New(2);
PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(arrOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(arrIndexOut),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return ret;
}
- PyObject *areCellsIncludedIn2(const MEDCouplingUMesh *other) const throw(INTERP_KERNEL::Exception)
+ PyObject *areCellsIncludedInPolicy7(const MEDCouplingUMesh *other) const throw(INTERP_KERNEL::Exception)
{
DataArrayInt *ret1;
- bool ret0=self->areCellsIncludedIn2(other,ret1);
+ bool ret0=self->areCellsIncludedInPolicy7(other,ret1);
PyObject *ret=PyTuple_New(2);
PyObject *ret0Py=ret0?Py_True:Py_False;
Py_XINCREF(ret0Py);
PyObject *explode3DMeshTo1D() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d2=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d3=DataArrayInt::New();
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<DataArrayInt> d1=DataArrayInt::New();
+ MCAuto<DataArrayInt> d2=DataArrayInt::New();
+ MCAuto<DataArrayInt> d3=DataArrayInt::New();
MEDCouplingUMesh *m=self->explode3DMeshTo1D(d0,d1,d2,d3);
PyObject *ret=PyTuple_New(5);
PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
return ret;
}
+ PyObject *explodeMeshIntoMicroEdges() const throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<DataArrayInt> d1=DataArrayInt::New();
+ MCAuto<DataArrayInt> d2=DataArrayInt::New();
+ MCAuto<DataArrayInt> d3=DataArrayInt::New();
+ MEDCouplingUMesh *m=self->explodeMeshIntoMicroEdges(d0,d1,d2,d3);
+ PyObject *ret=PyTuple_New(5);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(d0.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,2,SWIG_NewPointerObj(SWIG_as_voidptr(d1.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(d2.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,4,SWIG_NewPointerObj(SWIG_as_voidptr(d3.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
PyObject *buildDescendingConnectivity() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d2=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d3=DataArrayInt::New();
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<DataArrayInt> d1=DataArrayInt::New();
+ MCAuto<DataArrayInt> d2=DataArrayInt::New();
+ MCAuto<DataArrayInt> d3=DataArrayInt::New();
MEDCouplingUMesh *m=self->buildDescendingConnectivity(d0,d1,d2,d3);
PyObject *ret=PyTuple_New(5);
PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
PyObject *buildDescendingConnectivity2() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d2=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d3=DataArrayInt::New();
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<DataArrayInt> d1=DataArrayInt::New();
+ MCAuto<DataArrayInt> d2=DataArrayInt::New();
+ MCAuto<DataArrayInt> d3=DataArrayInt::New();
MEDCouplingUMesh *m=self->buildDescendingConnectivity2(d0,d1,d2,d3);
PyObject *ret=PyTuple_New(5);
PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(m),SWIGTYPE_p_MEDCoupling__MEDCouplingUMesh, SWIG_POINTER_OWN | 0 ));
PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(neighborsIdx),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return ret;
}
-
+
+ PyObject *computeCellNeighborhoodFromNodesOne(const DataArrayInt *nodeNeigh, const DataArrayInt *nodeNeighI) const throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<DataArrayInt> cellNeigh,cellNeighIndex;
+ self->computeCellNeighborhoodFromNodesOne(nodeNeigh,nodeNeighI,cellNeigh,cellNeighIndex);
+ PyObject *ret=PyTuple_New(2);
+ PyTuple_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeigh.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ PyTuple_SetItem(ret,1,SWIG_NewPointerObj(SWIG_as_voidptr(cellNeighIndex.retn()),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
+ return ret;
+ }
+
static PyObject *ComputeNeighborsOfCellsAdv(const DataArrayInt *desc, const DataArrayInt *descI, const DataArrayInt *revDesc, const DataArrayInt *revDescI) throw(INTERP_KERNEL::Exception)
{
DataArrayInt *neighbors=0,*neighborsIdx=0;
PyObject *emulateMEDMEMBDC(const MEDCouplingUMesh *nM1LevMesh)
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d0=DataArrayInt::New();
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> d1=DataArrayInt::New();
+ MCAuto<DataArrayInt> d0=DataArrayInt::New();
+ MCAuto<DataArrayInt> d1=DataArrayInt::New();
DataArrayInt *d2,*d3,*d4,*dd5;
MEDCouplingUMesh *mOut=self->emulateMEDMEMBDC(nM1LevMesh,d0,d1,d2,d3,d4,dd5);
PyObject *ret=PyTuple_New(7);
return ret;
}
+ MEDCouplingUMesh *clipSingle3DCellByPlane(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
+ {
+ double val,val2;
+ DataArrayDouble *a,*a2;
+ DataArrayDoubleTuple *aa,*aa2;
+ std::vector<double> bb,bb2;
+ int sw;
+ const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st paramater for origin.";
+ const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd paramater for vector.";
+ const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,3,true);
+ const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,3,true);
+ MCAuto<MEDCouplingUMesh> ret(self->clipSingle3DCellByPlane(orig,vect,eps));
+ return ret.retn();
+ }
+
DataArrayInt *getCellIdsCrossingPlane(PyObject *origin, PyObject *vec, double eps) const throw(INTERP_KERNEL::Exception)
{
int spaceDim=self->getSpaceDimension();
default:
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertToPolyTypes : unexpected input array type recognized !");
}
- }
+ }
}
void convertAllToPoly();
void convertExtrudedPolyhedra() throw(INTERP_KERNEL::Exception);
//== MEDCouplingUMesh End
- //== MEDCouplingExtrudedMesh
+ //== MEDCouplingMappedExtrudedMesh
- class MEDCouplingExtrudedMesh : public MEDCoupling::MEDCouplingMesh
+ class MEDCouplingMappedExtrudedMesh : public MEDCoupling::MEDCouplingMesh
{
public:
- static MEDCouplingExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *build3DUnstructuredMesh() const throw(INTERP_KERNEL::Exception);
+ int get2DCellIdForExtrusion() const;
%extend {
- MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception)
+ MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception)
{
- return MEDCouplingExtrudedMesh::New(mesh3D,mesh2D,cell2DId);
+ return MEDCouplingMappedExtrudedMesh::New(mesh3D,mesh2D,cell2DId);
}
- MEDCouplingExtrudedMesh()
+ MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D) throw(INTERP_KERNEL::Exception)
{
- return MEDCouplingExtrudedMesh::New();
+ return MEDCouplingMappedExtrudedMesh::New(mesh3D);
+ }
+
+ MEDCouplingMappedExtrudedMesh()
+ {
+ return MEDCouplingMappedExtrudedMesh::New();
}
static PyObject *___new___(PyObject *cls, PyObject *args) throw(INTERP_KERNEL::Exception)
{
- return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingExtrudedMesh");
+ return NewMethWrapCallInitOnlyIfEmptyDictInInput(cls,args,"MEDCouplingMappedExtrudedMesh");
}
std::string __str__() const throw(INTERP_KERNEL::Exception)
}
};
- //== MEDCouplingExtrudedMesh End
+ //== MEDCouplingMappedExtrudedMesh End
class MEDCoupling1GTUMesh : public MEDCoupling::MEDCouplingPointSet
{
INTERP_KERNEL::NormalizedCellType getCellModelEnum() const throw(INTERP_KERNEL::Exception);
int getNodalConnectivityLength() const throw(INTERP_KERNEL::Exception);
virtual void allocateCells(int nbOfCells=0) throw(INTERP_KERNEL::Exception);
- virtual void checkCoherencyOfConnectivity() const throw(INTERP_KERNEL::Exception);
+ virtual void checkConsistencyOfConnectivity() const throw(INTERP_KERNEL::Exception);
%extend
{
virtual void insertNextCell(PyObject *li) throw(INTERP_KERNEL::Exception)
class MEDCouplingField : public MEDCoupling::RefCountObject, public MEDCoupling::TimeLabel
{
public:
- virtual void checkCoherency() const throw(INTERP_KERNEL::Exception);
+ virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
virtual bool areCompatibleForMerge(const MEDCouplingField *other) const throw(INTERP_KERNEL::Exception);
virtual bool isEqual(const MEDCouplingField *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
virtual bool isEqualWithoutConsideringStr(const MEDCouplingField *other, double meshPrec, double valsPrec) const throw(INTERP_KERNEL::Exception);
{
public:
static MEDCouplingFieldTemplate *New(const MEDCouplingFieldDouble& f) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldTemplate *New(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception);
static MEDCouplingFieldTemplate *New(TypeOfField type);
std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
{
return MEDCouplingFieldTemplate::New(f);
}
+
+ MEDCouplingFieldTemplate(const MEDCouplingFieldInt& f) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDCouplingFieldTemplate::New(f);
+ }
MEDCouplingFieldTemplate(TypeOfField type) throw(INTERP_KERNEL::Exception)
{
}
};
+ class MEDCouplingFieldInt;
+
class MEDCouplingFieldDouble : public MEDCoupling::MEDCouplingField
{
public:
std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
std::string writeVTK(const std::string& fileName, bool isBinary=true) const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldInt *convertToIntField() const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *clone(bool recDeepCpy) const;
MEDCouplingFieldDouble *cloneWithMesh(bool recDeepCpy) const;
- MEDCouplingFieldDouble *deepCpy() const;
- MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCpy) const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *deepCopy() const;
+ MEDCouplingFieldDouble *buildNewTimeReprFromThis(TypeOfTimeDiscretization td, bool deepCopy) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *nodeToCellDiscretization() const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *cellToNodeDiscretization() const throw(INTERP_KERNEL::Exception);
TypeOfTimeDiscretization getTimeDiscretization() 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);
- bool mergeNodes2(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
+ bool mergeNodesCenter(double eps, double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
bool zipCoords(double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
bool zipConnectivity(int compType,double epsOnVals=1e-15) throw(INTERP_KERNEL::Exception);
bool simplexize(int policy) throw(INTERP_KERNEL::Exception);
void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble &operator=(double value) throw(INTERP_KERNEL::Exception);
void fillFromAnalytic(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
- void fillFromAnalytic2(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
- void fillFromAnalytic3(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) throw(INTERP_KERNEL::Exception);
+ void fillFromAnalyticCompo(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
+ void fillFromAnalyticNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) throw(INTERP_KERNEL::Exception);
void applyFunc(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
- void applyFunc2(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
- void applyFunc3(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) throw(INTERP_KERNEL::Exception);
+ void applyFuncCompo(int nbOfComp, const std::string& func) throw(INTERP_KERNEL::Exception);
+ void applyFuncNamedCompo(int nbOfComp, const std::vector<std::string>& varsOrder, const std::string& func) throw(INTERP_KERNEL::Exception);
void applyFunc(int nbOfComp, double val) throw(INTERP_KERNEL::Exception);
void applyFunc(const std::string& func) throw(INTERP_KERNEL::Exception);
void applyFuncFast32(const std::string& func) throw(INTERP_KERNEL::Exception);
double integral(int compId, bool isWAbs) const throw(INTERP_KERNEL::Exception);
double normL1(int compId) const throw(INTERP_KERNEL::Exception);
double normL2(int compId) const throw(INTERP_KERNEL::Exception);
- DataArrayInt *getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
+ DataArrayInt *findIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *buildSubPartRange(int begin, int end, int step) const throw(INTERP_KERNEL::Exception);
static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
self->reprQuickOverview(oss);
return oss.str();
}
+
+ MEDCouplingFieldDouble *voronoize(double eps) const throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<MEDCouplingFieldDouble> ret(self->voronoize(eps));
+ return ret.retn();
+ }
+
+ MEDCouplingFieldDouble *convertQuadraticCellsToLinear() const throw(INTERP_KERNEL::Exception)
+ {
+ MCAuto<MEDCouplingFieldDouble> ret(self->convertQuadraticCellsToLinear());
+ return ret.retn();
+ }
+
+ MEDCouplingFieldDouble *computeVectorFieldCyl(PyObject *center, PyObject *vector) const
+ {
+ const char msg[]="Python wrap of MEDCouplingFieldDouble::computeVectorFieldCyl : ";
+ double val,val2;
+ DataArrayDouble *a,*a2;
+ DataArrayDoubleTuple *aa,*aa2;
+ std::vector<double> bb,bb2;
+ int sw;
+ const double *centerPtr=convertObjToPossibleCpp5_Safe(center,sw,val,a,aa,bb,msg,1,3,true);
+ const double *vectorPtr=convertObjToPossibleCpp5_Safe(vector,sw,val2,a2,aa2,bb2,msg,1,3,true);
+ return self->computeVectorFieldCyl(centerPtr,vectorPtr);
+ }
DataArrayDouble *getArray() throw(INTERP_KERNEL::Exception)
{
MEDCoupling_DataArrayDouble_setValues__SWIG_0(self->getArray(),li,nbOfTuples,nbOfComp);
else
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr=DataArrayDouble::New();
+ MCAuto<DataArrayDouble> arr=DataArrayDouble::New();
MEDCoupling_DataArrayDouble_setValues__SWIG_0(arr,li,nbOfTuples,nbOfComp);
self->setArray(arr);
}
{ convertObjToPossibleCpp2(elt1,self->getArray()->getNumberOfComponents(),sw,singleVal,multiVal,slic,daIntTyypp); }
catch(INTERP_KERNEL::Exception& e)
{ std::ostringstream oss; oss << "MEDCouplingFieldDouble::__getitem__ : invalid type in 2nd parameter (compo) !" << e.what(); throw INTERP_KERNEL::Exception(oss.str().c_str()); }
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret0=MEDCoupling_MEDCouplingFieldDouble_buildSubPart(self,elt0);
+ MCAuto<MEDCouplingFieldDouble> ret0=MEDCoupling_MEDCouplingFieldDouble_buildSubPart(self,elt0);
DataArrayDouble *ret0Arr=ret0->getArray();
if(!ret0Arr)
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::__getitem__ : no array exists to apply restriction on component on it !");
case 1:
{
std::vector<int> v2(1,singleVal);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(v2));
+ MCAuto<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(v2));
ret0->setArray(aarr);
return ret0.retn();
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(multiVal));
+ MCAuto<DataArrayDouble> aarr(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));
+ MCAuto<DataArrayDouble> aarr(ret0Arr->keepSelectedComponents(v2));
ret0->setArray(aarr);
return ret0.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->getArray()->deepCpy();
+ MCAuto<DataArrayDouble> ret=self->getArray()->deepCopy();
ret->applyLin(1.,-val);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),a);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),a);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Substract(self->getArray(),aaa);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble.__div__ : trying to divide by zero !");
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->getArray()->deepCpy();
+ MCAuto<DataArrayDouble> ret=self->getArray()->deepCopy();
ret->applyLin(1./val,0);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),a);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),a);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Divide(self->getArray(),aaa);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=self->getArray()->deepCpy();
+ MCAuto<DataArrayDouble> ret=self->getArray()->deepCopy();
ret->applyPow(val);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),a);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),a);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> ret=DataArrayDouble::Pow(self->getArray(),aaa);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(ret);
return ret2.retn();
}
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(a);
*self+=*ret2;
Py_XINCREF(trueSelf);
}
case 3:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(aaa);
*self+=*ret2;
Py_XINCREF(trueSelf);
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
self->getArray()->addEqual(aaa);
Py_XINCREF(trueSelf);
return trueSelf;
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(a);
*self-=*ret2;
Py_XINCREF(trueSelf);
}
case 3:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(aaa);
*self-=*ret2;
Py_XINCREF(trueSelf);
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
self->getArray()->substractEqual(aaa);
Py_XINCREF(trueSelf);
return trueSelf;
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(a);
*self*=*ret2;
Py_XINCREF(trueSelf);
}
case 3:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(aaa);
*self*=*ret2;
Py_XINCREF(trueSelf);
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
self->getArray()->multiplyEqual(aaa);
Py_XINCREF(trueSelf);
return trueSelf;
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(a);
*self/=*ret2;
Py_XINCREF(trueSelf);
}
case 3:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(aaa);
*self/=*ret2;
Py_XINCREF(trueSelf);
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
self->getArray()->divideEqual(aaa);
Py_XINCREF(trueSelf);
return trueSelf;
}
case 2:
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(a);
*self^=*ret2;
Py_XINCREF(trueSelf);
}
case 3:
{
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret2=self->clone(false);
+ MCAuto<DataArrayDouble> aaa=aa->buildDADouble(1,self->getNumberOfComponents());
+ MCAuto<MEDCouplingFieldDouble> ret2=self->clone(false);
ret2->setArray(aaa);
*self^=*ret2;
Py_XINCREF(trueSelf);
{
if(!self->getArray())
throw INTERP_KERNEL::Exception(msg2);
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
+ MCAuto<DataArrayDouble> aaa=DataArrayDouble::New(); aaa->useArray(&bb[0],false,CPP_DEALLOC,1,(int)bb.size());
self->getArray()->powEqual(aaa);
Py_XINCREF(trueSelf);
return trueSelf;
PyObject *__getnewargs__() throw(INTERP_KERNEL::Exception)
{// put an empty dict in input to say to __new__ to call __init__...
- self->checkCoherency();
+ self->checkConsistencyLight();
PyObject *ret(PyTuple_New(1));
PyObject *ret0(PyDict_New());
{
PyObject *__getstate__() const throw(INTERP_KERNEL::Exception)
{
- self->checkCoherency();
+ self->checkConsistencyLight();
PyObject *ret0(MEDCoupling_MEDCouplingFieldDouble_getTinySerializationInformation(self));
PyObject *ret1(MEDCoupling_MEDCouplingFieldDouble_serialize(self));
const MEDCouplingMesh *mesh(self->getMesh());
{
public:
int getNumberOfFields() const;
- MEDCouplingMultiFields *deepCpy() const;
+ MEDCouplingMultiFields *deepCopy() const;
virtual std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
virtual std::string advancedRepr() const throw(INTERP_KERNEL::Exception);
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);
+ virtual void checkConsistencyLight() const throw(INTERP_KERNEL::Exception);
%extend
{
std::string __str__() const throw(INTERP_KERNEL::Exception)
}
}
};
+
+ class MEDCouplingFieldInt : public MEDCouplingField
+ {
+ public:
+ static MEDCouplingFieldInt *New(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME);
+ static MEDCouplingFieldInt *New(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME);
+ void setTimeUnit(const std::string& unit) throw(INTERP_KERNEL::Exception);
+ std::string getTimeUnit() const throw(INTERP_KERNEL::Exception);
+ void setTime(double val, int iteration, int order) throw(INTERP_KERNEL::Exception);
+ void setArray(DataArrayInt *array) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldInt *deepCopy() const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldInt *clone(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldInt *cloneWithMesh(bool recDeepCpy) const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *convertToDblField() const throw(INTERP_KERNEL::Exception);
+ %extend {
+ MEDCouplingFieldInt(TypeOfField type, TypeOfTimeDiscretization td=ONE_TIME)
+ {
+ return MEDCouplingFieldInt::New(type,td);
+ }
+
+ MEDCouplingFieldInt(const MEDCouplingFieldTemplate& ft, TypeOfTimeDiscretization td=ONE_TIME)
+ {
+ return MEDCouplingFieldInt::New(ft,td);
+ }
+
+ 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 *getArray() throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret=self->getArray();
+ if(ret)
+ ret->incrRef();
+ return ret;
+ }
+
+ PyObject *getTime() throw(INTERP_KERNEL::Exception)
+ {
+ int tmp1,tmp2;
+ double tmp0=self->getTime(tmp1,tmp2);
+ PyObject *res = PyList_New(3);
+ PyList_SetItem(res,0,SWIG_From_double(tmp0));
+ PyList_SetItem(res,1,SWIG_From_int(tmp1));
+ PyList_SetItem(res,2,SWIG_From_int(tmp2));
+ return res;
+ }
+ }
+ };
class MEDCouplingDefinitionTime
{
}
// agy : don't know why typemap fails here ??? let it in the extend section
- PyObject *deepCpy(MEDCouplingCartesianAMRMeshGen *father) const throw(INTERP_KERNEL::Exception)
+ PyObject *deepCopy(MEDCouplingCartesianAMRMeshGen *father) const throw(INTERP_KERNEL::Exception)
{
- return convertCartesianAMRMesh(self->deepCpy(father), SWIG_POINTER_OWN | 0 );
+ return convertCartesianAMRMesh(self->deepCopy(father), SWIG_POINTER_OWN | 0 );
}
MEDCouplingCartesianAMRPatch *getPatchAtPosition(const std::vector<int>& pos) const throw(INTERP_KERNEL::Exception)
{
public:
int getNumberOfLevels() const throw(INTERP_KERNEL::Exception);
- MEDCouplingAMRAttribute *deepCpy() const throw(INTERP_KERNEL::Exception);
+ MEDCouplingAMRAttribute *deepCopy() const throw(INTERP_KERNEL::Exception);
MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *buildCellFieldOnWithGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
public:
static DenseMatrix *New(int nbRows, int nbCols) throw(INTERP_KERNEL::Exception);
static DenseMatrix *New(DataArrayDouble *array, int nbRows, int nbCols) throw(INTERP_KERNEL::Exception);
- DenseMatrix *deepCpy() const throw(INTERP_KERNEL::Exception);
+ DenseMatrix *deepCopy() const throw(INTERP_KERNEL::Exception);
DenseMatrix *shallowCpy() const throw(INTERP_KERNEL::Exception);
//
int getNumberOfRows() const throw(INTERP_KERNEL::Exception);
#endif
}
};
-
- class PartDefinition : public RefCountObject, public TimeLabel
- {
- public:
- static PartDefinition *New(int start, int stop, int step) throw(INTERP_KERNEL::Exception);
- static PartDefinition *New(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception);
- virtual DataArrayInt *toDAI() const throw(INTERP_KERNEL::Exception);
- virtual int getNumberOfElems() const throw(INTERP_KERNEL::Exception);
- virtual std::string getRepr() const throw(INTERP_KERNEL::Exception);
- virtual PartDefinition *composeWith(const PartDefinition *other) const throw(INTERP_KERNEL::Exception);
- virtual void checkCoherency() const throw(INTERP_KERNEL::Exception);
- virtual PartDefinition *tryToSimplify() const throw(INTERP_KERNEL::Exception);
- %extend
- {
- virtual PartDefinition *__add__(const PartDefinition& other) const throw(INTERP_KERNEL::Exception)
- {
- return (*self)+other;
- }
-
- virtual PyObject *isEqual(const PartDefinition *other) const throw(INTERP_KERNEL::Exception)
- {
- std::string ret1;
- bool ret0(self->isEqual(other,ret1));
- PyObject *ret=PyTuple_New(2);
- PyObject *ret0Py=ret0?Py_True:Py_False;
- Py_XINCREF(ret0Py);
- PyTuple_SetItem(ret,0,ret0Py);
- PyTuple_SetItem(ret,1,PyString_FromString(ret1.c_str()));
- return ret;
- }
-
- virtual PyObject *deepCpy() const throw(INTERP_KERNEL::Exception)
- {
- return convertPartDefinition(self->deepCpy(),SWIG_POINTER_OWN | 0);
- }
- }
- protected:
- virtual ~PartDefinition();
- };
-
- class DataArrayPartDefinition : public PartDefinition
- {
- public:
- static DataArrayPartDefinition *New(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception);
- %extend
- {
- DataArrayPartDefinition(DataArrayInt *listOfIds) throw(INTERP_KERNEL::Exception)
- {
- return DataArrayPartDefinition::New(listOfIds);
- }
-
- std::string __str__() const throw(INTERP_KERNEL::Exception)
- {
- return self->getRepr();
- }
-
- std::string __repr__() const throw(INTERP_KERNEL::Exception)
- {
- std::ostringstream oss; oss << "DataArrayPartDefinition C++ instance at " << self << "." << std::endl;
- oss << self->getRepr();
- return oss.str();
- }
- }
- protected:
- virtual ~DataArrayPartDefinition();
- };
-
- class SlicePartDefinition : public PartDefinition
- {
- public:
- static SlicePartDefinition *New(int start, int stop, int step) throw(INTERP_KERNEL::Exception);
- int getEffectiveStop() const throw(INTERP_KERNEL::Exception);
- %extend
- {
- SlicePartDefinition(int start, int stop, int step) throw(INTERP_KERNEL::Exception)
- {
- return SlicePartDefinition::New(start,stop,step);
- }
-
- PyObject *getSlice() const throw(INTERP_KERNEL::Exception)
- {
- int a,b,c;
- self->getSlice(a,b,c);
- return PySlice_New(PyInt_FromLong(a),PyInt_FromLong(b),PyInt_FromLong(c));
- }
-
- std::string __str__() const throw(INTERP_KERNEL::Exception)
- {
- return self->getRepr();
- }
-
- std::string __repr__() const throw(INTERP_KERNEL::Exception)
- {
- std::ostringstream oss; oss << "SlicePartDefinition C++ instance at " << self << "." << std::endl;
- oss << self->getRepr();
- return oss.str();
- }
- }
- protected:
- virtual ~SlicePartDefinition();
- };
}
%pythoncode %{