ret->setCoords(getCoords());
MEDCoupling1SGTUMesh *retC=dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh*)ret);
if(retC)
- retC->setNodalConnectivity(convertNodalConnectivityToStaticGeoTypeMesh());
+ {
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> c=convertNodalConnectivityToStaticGeoTypeMesh();
+ retC->setNodalConnectivity(c);
+ }
else
{
MEDCoupling1DGTUMesh *retD=dynamic_cast<MEDCoupling1DGTUMesh *>((MEDCoupling1GTUMesh*)ret);
c->alloc(lgth-nbCells,1); ci->alloc(nbCells+1,1);
int *cp(c->getPointer()),*cip(ci->getPointer());
const int *incp(_nodal_connec->begin()),*incip(_nodal_connec_index->begin());
+ cip[0]=0;
for(int i=0;i<nbCells;i++,cip++,incip++)
{
int strt(incip[0]+1),stop(incip[1]);//+1 to skip geo type
self.assertTrue(f.getArray().isEqual(DataArrayDouble(6*[(0,0,-1)]),1e-12))
mcpy.changeSpaceDimension(2)
self.assertEqual(1,mcpy.getCellContainingPoint([1.5,0.5],1e-12))
+ ##
+ self.assertTrue(mcpy.fillCellIdsToKeepFromNodeIds(DataArrayInt([6,7]),False).isEqual(DataArrayInt([0,1,5])))
+ ##
+ mcpy2=mcpy.deepCpy()
+ self.assertEqual([None,None],mcpy.checkGeoEquivalWith(mcpy2,1,1e-12))#fast equal
+ mcpy.checkFastEquivalWith(mcpy2,1e-12)
+ mcpy2.renumberCells([0,2,4,3,1,5])
+ mcpy.checkFastEquivalWith(mcpy2,1e-12)
+ self.assertEqual([None,None],mcpy.checkGeoEquivalWith(mcpy2,1,1e-12))#fast equal
+ mcpy2.renumberCells([0,2,4,3,1,5])
+ mcpy2.renumberCells([1,3,5,0,2,4])
+ self.assertRaises(InterpKernelException,mcpy.checkFastEquivalWith,mcpy2,1e-12)
+ self.assertRaises(InterpKernelException,mcpy.checkGeoEquivalWith,mcpy2,1,1e-12)#fast equal
pass
def setUp(self):
%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;