From: ageay Date: Wed, 15 Dec 2010 15:07:42 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: RELIQUAT_6x_15112010~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aed2c74e8386bcec173553ada0bae9d1cf1f4185;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx index dc58eb215..d386e340e 100644 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx +++ b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx @@ -323,7 +323,7 @@ void MEDCouplingExtrudedMesh::renumberCells(const int *old2NewBg, bool check) th MEDCouplingUMesh *MEDCouplingExtrudedMesh::build3DUnstructuredMesh() const { - MEDCouplingUMesh *ret=_mesh2D->buildExtrudedMeshFromThis(_mesh1D,0); + MEDCouplingUMesh *ret=_mesh2D->buildExtrudedMesh(_mesh1D,0); const int *renum=_mesh3D_ids->getConstPointer(); ret->renumberCells(renum,false); ret->setName(getName()); diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index 6af9408e1..02a5a5871 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -2095,18 +2095,18 @@ void MEDCouplingUMesh::checkButterflyCells(std::vector& cells) const * \b 1 for translation and rotation around point of 'mesh1D'. * @return an unstructured mesh with meshDim==3 and spaceDim==3. The returned mesh has the same coords than 'this'. */ -MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMeshFromThis(const MEDCouplingUMesh *mesh1D, int policy) +MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy) { checkFullyDefined(); mesh1D->checkFullyDefined(); if(!mesh1D->isContiguous1D()) - throw INTERP_KERNEL::Exception("buildExtrudedMeshFromThis : 1D mesh passed in parameter is not contiguous !"); + throw INTERP_KERNEL::Exception("buildExtrudedMesh : 1D mesh passed in parameter is not contiguous !"); if(getSpaceDimension()!=mesh1D->getSpaceDimension()) - throw INTERP_KERNEL::Exception("Invalid call to buildExtrudedMeshFromThis this and mesh1D must have same dimension !"); + throw INTERP_KERNEL::Exception("Invalid call to buildExtrudedMesh this and mesh1D must have same dimension !"); if((getMeshDimension()!=2 || getSpaceDimension()!=3) && (getMeshDimension()!=1 || getSpaceDimension()!=2)) - throw INTERP_KERNEL::Exception("Invalid 'this' for buildExtrudedMeshFromThis method : must be (meshDim==2 and spaceDim==3) or (meshDim==1 and spaceDim==2) !"); + throw INTERP_KERNEL::Exception("Invalid 'this' for buildExtrudedMesh method : must be (meshDim==2 and spaceDim==3) or (meshDim==1 and spaceDim==2) !"); if(mesh1D->getMeshDimension()!=1) - throw INTERP_KERNEL::Exception("Invalid 'mesh1D' for buildExtrudedMeshFromThis method : must be meshDim==1 !"); + throw INTERP_KERNEL::Exception("Invalid 'mesh1D' for buildExtrudedMesh method : must be meshDim==1 !"); bool isQuad=false; if(isPresenceOfQuadratic()) { @@ -2141,7 +2141,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMeshFromThis(const MEDCouplingU } /*! - * This method incarnates the policy 0 for MEDCouplingUMesh::buildExtrudedMeshFromThis method. + * This method incarnates the policy 0 for MEDCouplingUMesh::buildExtrudedMesh method. * @param mesh1D is the input 1D mesh used for translation computation. * @return newCoords new coords filled by this method. */ @@ -2187,7 +2187,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslation(const MEDCoupli } /*! - * This method incarnates the policy 1 for MEDCouplingUMesh::buildExtrudedMeshFromThis method. + * This method incarnates the policy 1 for MEDCouplingUMesh::buildExtrudedMesh method. * @param mesh1D is the input 1D mesh used for translation and automatic rotation computation. * @return newCoords new coords filled by this method. */ @@ -2201,7 +2201,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation(const } /*! - * This method incarnates the policy 1 for MEDCouplingUMesh::buildExtrudedMeshFromThis method. + * This method incarnates the policy 1 for MEDCouplingUMesh::buildExtrudedMesh method. * @param mesh1D is the input 1D mesh used for translation and automatic rotation computation. * @return newCoords new coords filled by this method. */ @@ -2247,7 +2247,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation2D(con } /*! - * This method incarnates the policy 1 for MEDCouplingUMesh::buildExtrudedMeshFromThis method. + * This method incarnates the policy 1 for MEDCouplingUMesh::buildExtrudedMesh method. * @param mesh1D is the input 1D mesh used for translation and automatic rotation computation. * @return newCoords new coords filled by this method. */ @@ -2317,7 +2317,7 @@ DataArrayDouble *MEDCouplingUMesh::fillExtCoordsUsingTranslAndAutoRotation3D(con /*! * This method is private because not easy to use for end user. This method is const contrary to - * MEDCouplingUMesh::buildExtrudedMeshFromThis method because this->_coords are expected to contain + * MEDCouplingUMesh::buildExtrudedMesh method because this->_coords are expected to contain * the coords sorted slice by slice. * @param isQuad specifies presence of quadratic cells. */ diff --git a/src/MEDCoupling/MEDCouplingUMesh.hxx b/src/MEDCoupling/MEDCouplingUMesh.hxx index 0bc87d2dc..3594338ea 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.hxx +++ b/src/MEDCoupling/MEDCouplingUMesh.hxx @@ -110,7 +110,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, std::vector& elts, std::vector& eltsIndex) const; MEDCOUPLING_EXPORT void checkButterflyCells(std::vector& cells) const; MEDCOUPLING_EXPORT void getBoundingBoxForBBTree(std::vector& bbox) const; - MEDCOUPLING_EXPORT MEDCouplingUMesh *buildExtrudedMeshFromThis(const MEDCouplingUMesh *mesh1D, int policy); + MEDCOUPLING_EXPORT MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy); MEDCOUPLING_EXPORT bool isFullyQuadratic() const; MEDCOUPLING_EXPORT bool isPresenceOfQuadratic() const; MEDCOUPLING_EXPORT void convertQuadraticCellsToLinear() throw(INTERP_KERNEL::Exception); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx index 5dd1c85d7..a334e8069 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx @@ -1060,7 +1060,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh3() double center[3]={0.,0.,0.}; double vector[3]={0,1,0}; m2->rotate(center,vector,-M_PI/2.); - MEDCouplingUMesh *m3=m1->buildExtrudedMeshFromThis(m2,0); + MEDCouplingUMesh *m3=m1->buildExtrudedMesh(m2,0); // MEDCouplingExtrudedMesh *m4=MEDCouplingExtrudedMesh::New(m3,m1,0); CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells()); @@ -1085,7 +1085,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh3() //play with polygons and polyedrons std::vector cells(2); cells[0]=2; cells[1]=3; m1->convertToPolyTypes(cells); - m3=m1->buildExtrudedMeshFromThis(m2,0); + m3=m1->buildExtrudedMesh(m2,0); CPPUNIT_ASSERT_EQUAL((int)INTERP_KERNEL::NORM_HEXA8,(int)m3->getTypeOfCell(0)); CPPUNIT_ASSERT_EQUAL((int)INTERP_KERNEL::NORM_PENTA6,(int)m3->getTypeOfCell(1)); CPPUNIT_ASSERT_EQUAL((int)INTERP_KERNEL::NORM_POLYHED,(int)m3->getTypeOfCell(2)); @@ -1107,7 +1107,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh3() } /*! - * This test check MEDCouplingUMesh::buildExtrudedMeshFromThis method, but also, MEDCouplingExtrudedMesh following methods : + * This test check MEDCouplingUMesh::buildExtrudedMesh method, but also, MEDCouplingExtrudedMesh following methods : * getCellContainingPoint getMeasureField getNodeIdsOfCell getCoordinateOfNode getTypeOfCell build3DUnstructuredMesh. */ void MEDCouplingBasicsTest::testExtrudedMesh4() @@ -1121,7 +1121,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh4() double center[3]={0.,0.,0.}; double vector[3]={0.,1.,0.}; m2->rotate(center,vector,-M_PI/2.); - MEDCouplingUMesh *m3=m1->buildExtrudedMeshFromThis(m2,0); + MEDCouplingUMesh *m3=m1->buildExtrudedMesh(m2,0); const int expected1[15]= {1,3,2,0,6,5,7,10,11,8,12,9,14,13,4}; const int rexpected1[15]={3, 0, 2, 1, 14, 5, 4, 6, 9, 11, 7, 8, 10, 13, 12}; m3->renumberCells(expected1,false); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index 7b2b12146..1b25714ac 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -215,7 +215,7 @@ void MEDCouplingBasicsTest::testCellOrientation2() double center[3]={0.,0.,0.}; double vector[3]={0.,1.,0.}; m4->rotate(center,vector,-M_PI/2.); - MEDCouplingUMesh *m5=m3->buildExtrudedMeshFromThis(m4,0); + MEDCouplingUMesh *m5=m3->buildExtrudedMesh(m4,0); res1.clear(); m5->arePolyhedronsNotCorrectlyOriented(res1); CPPUNIT_ASSERT_EQUAL(15,(int)res1.size()); @@ -3376,7 +3376,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh5() DataArrayDouble *g=f->getCoords()->applyFunc(2,"3.5*IVec+x/6*3.14159265359*JVec"); DataArrayDouble *h=g->fromPolarToCart(); f->setCoords(h); - MEDCouplingUMesh *i=c->buildExtrudedMeshFromThis(f,1); + MEDCouplingUMesh *i=c->buildExtrudedMesh(f,1); CPPUNIT_ASSERT_EQUAL(52,i->getNumberOfNodes()); bool tmp2; int tmp3; @@ -3440,7 +3440,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh6() // const double center[2]={0.,0.}; f->rotate(center,0,M_PI/3); - MEDCouplingUMesh *g=c->buildExtrudedMeshFromThis(f,0); + MEDCouplingUMesh *g=c->buildExtrudedMesh(f,0); g->checkCoherency(); const double expected1[]={ 0.4330127018922193, 0.4330127018922193, 0.649519052838329, 1.2990381056766578, 1.299038105676658, 1.948557158514987, 2.1650635094610955, 2.1650635094610964, 3.2475952641916446, 3.031088913245533, 3.0310889132455352, 4.546633369868303 }; MEDCouplingFieldDouble *f1=g->getMeasureField(true); @@ -3488,7 +3488,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh7() DataArrayDouble *g=f->getCoords()->applyFunc(2,"3.5*IVec+x/6*3.14159265359*JVec"); DataArrayDouble *h=g->fromPolarToCart(); f->setCoords(h); - MEDCouplingUMesh *i=c->buildExtrudedMeshFromThis(f,1); + MEDCouplingUMesh *i=c->buildExtrudedMesh(f,1); CPPUNIT_ASSERT_EQUAL(52,i->getNumberOfNodes()); bool tmp2; int tmp3; @@ -3502,7 +3502,7 @@ void MEDCouplingBasicsTest::testExtrudedMesh7() DataArrayDouble *g2=h->applyFunc(3,"13.5/3.5*x*IVec+0*JVec+13.5/3.5*y*KVec"); f->setCoords(g2); i->changeSpaceDimension(3); - MEDCouplingUMesh *i3=i->buildExtrudedMeshFromThis(f,1); + MEDCouplingUMesh *i3=i->buildExtrudedMesh(f,1); MEDCouplingFieldDouble *f2=i3->getMeasureField(true); tmp=i->mergeNodes(1e-9,tmp2,tmp3); CPPUNIT_ASSERT(tmp2); diff --git a/src/MEDCoupling_Swig/MEDCoupling.i b/src/MEDCoupling_Swig/MEDCoupling.i index 94c2613d4..bd30c4516 100644 --- a/src/MEDCoupling_Swig/MEDCoupling.i +++ b/src/MEDCoupling_Swig/MEDCoupling.i @@ -176,7 +176,7 @@ using namespace INTERP_KERNEL; %newobject ParaMEDMEM::MEDCouplingUMesh::clone; %newobject ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer; %newobject ParaMEDMEM::MEDCouplingUMesh::buildDescendingConnectivity; -%newobject ParaMEDMEM::MEDCouplingUMesh::buildExtrudedMeshFromThis; +%newobject ParaMEDMEM::MEDCouplingUMesh::buildExtrudedMesh; %newobject ParaMEDMEM::MEDCouplingUMesh::mergeUMeshes; %newobject ParaMEDMEM::MEDCouplingUMesh::mergeUMeshesOnSameCoords; %newobject ParaMEDMEM::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt; @@ -881,7 +881,7 @@ namespace ParaMEDMEM } void convertToPolyTypes(const std::vector& cellIdsToConvert) throw(INTERP_KERNEL::Exception); void unPolyze() throw(INTERP_KERNEL::Exception); - MEDCouplingUMesh *buildExtrudedMeshFromThis(const MEDCouplingUMesh *mesh1D, int policy) throw(INTERP_KERNEL::Exception); + MEDCouplingUMesh *buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy) throw(INTERP_KERNEL::Exception); }; class MEDCouplingExtrudedMesh : public ParaMEDMEM::MEDCouplingMesh diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index 363930ec9..6af81a202 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -693,7 +693,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): center=[0.,0.,0.] vector=[0.,1.,0.] m2.rotate(center,vector,-pi/2.); - m3=m1.buildExtrudedMeshFromThis(m2,0); + m3=m1.buildExtrudedMesh(m2,0); # m4=MEDCouplingExtrudedMesh.New(m3,m1,0); self.assertEqual(15,m4.getNumberOfCells()); @@ -713,7 +713,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): #play with polygons and polyedrons cells=[2,3] m1.convertToPolyTypes(cells); - m3=m1.buildExtrudedMeshFromThis(m2,0); + m3=m1.buildExtrudedMesh(m2,0); self.assertEqual(NORM_HEXA8,m3.getTypeOfCell(0)); self.assertEqual(NORM_PENTA6,m3.getTypeOfCell(1)); self.assertEqual(NORM_POLYHED,m3.getTypeOfCell(2)); @@ -738,7 +738,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): center=[0.,0.,0.] vector=[0.,1.,0.] m2.rotate(center,vector,-pi/2.); - m3=m1.buildExtrudedMeshFromThis(m2,0); + m3=m1.buildExtrudedMesh(m2,0); expected1=[1,3,2,0,6,5,7,10,11,8,12,9,14,13,4] rexpected1=[3, 0, 2, 1, 14, 5, 4, 6, 9, 11, 7, 8, 10, 13, 12] m3.renumberCells(expected1,False); @@ -1889,7 +1889,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): center=[0.,0.,0.] vector=[0.,1.,0.] m4.rotate(center,vector,-pi/2.); - m5=m3.buildExtrudedMeshFromThis(m4,0); + m5=m3.buildExtrudedMesh(m4,0); res1=m5.arePolyhedronsNotCorrectlyOriented(); self.assertEqual(15,len(res1)); m5.orientCorrectlyPolyhedrons(); @@ -4991,7 +4991,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): g=f.getCoords().applyFunc(2,"3.5*IVec+x/6*3.14159265359*JVec"); h=g.fromPolarToCart(); f.setCoords(h); - i=c.buildExtrudedMeshFromThis(f,1); + i=c.buildExtrudedMesh(f,1); self.assertEqual(52,i.getNumberOfNodes()); tmp,tmp2,tmp3=i.mergeNodes(1e-9); self.assertTrue(tmp2); @@ -5039,7 +5039,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): # center=[0.,0.] f.rotate(center,[],pi/3); - g=c.buildExtrudedMeshFromThis(f,0); + g=c.buildExtrudedMesh(f,0); g.checkCoherency(); expected1=[ 0.4330127018922193, 0.4330127018922193, 0.649519052838329, 1.2990381056766578, 1.299038105676658, 1.948557158514987, 2.1650635094610955, 2.1650635094610964, 3.2475952641916446, 3.031088913245533, 3.0310889132455352, 4.546633369868303 ] f1=g.getMeasureField(True); @@ -5072,7 +5072,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): g=f.getCoords().applyFunc(2,"3.5*IVec+x/6*3.14159265359*JVec"); h=g.fromPolarToCart(); f.setCoords(h); - i=c.buildExtrudedMeshFromThis(f,1); + i=c.buildExtrudedMesh(f,1); self.assertEqual(52,i.getNumberOfNodes()); tmp,tmp2,tmp3=i.mergeNodes(1e-9); self.assertTrue(tmp2); @@ -5083,7 +5083,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): g2=h.applyFunc(3,"13.5/3.5*x*IVec+0*JVec+13.5/3.5*y*KVec"); f.setCoords(g2); i.changeSpaceDimension(3); - i3=i.buildExtrudedMeshFromThis(f,1); + i3=i.buildExtrudedMesh(f,1); f2=i3.getMeasureField(True); tmp,tmp2,tmp3=i.mergeNodes(1e-9); self.assertTrue(tmp2);