From: ageay Date: Tue, 27 Sep 2011 10:59:14 +0000 (+0000) Subject: Doc X-Git-Tag: V6_main_FINAL~951 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d2330f018736baa73d7e5474c6633842872db699;p=tools%2Fmedcoupling.git Doc --- diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index fad3ec215..f19def6b4 100644 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -858,6 +858,8 @@ void MEDCouplingPointSet::Rotate2DAlg(const double *center, double angle, int nb } } +/// @cond INTERNAL + class DummyClsMCPS { public: @@ -867,6 +869,8 @@ public: static const INTERP_KERNEL::NumberingPolicy My_numPol=INTERP_KERNEL::ALL_C_MODE; }; +/// @endcond + /*! * res should be an empty vector before calling this method. * This method returns all the node coordinates included in _coords which ids are in [startConn;endConn) and put it into 'res' vector. diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index 5f733d7a7..49a744e45 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -265,12 +265,19 @@ void MEDCouplingUMesh::finishInsertingCells() /*! * Entry point for iteration over cells of this. Warning the returned cell iterator should be deallocated. + * Useful for python users. */ MEDCouplingUMeshCellIterator *MEDCouplingUMesh::cellIterator() { return new MEDCouplingUMeshCellIterator(this); } +/*! + * Entry point for iteration over cells groups geo types per geotypes. Warning the returned cell iterator should be deallocated. + * If 'this' is not so that that cells are grouped by geo types this method will throw an exception. + * In this case MEDCouplingUMesh::sortCellsInMEDFileFrmt or MEDCouplingUMesh::rearrange2ConsecutiveCellTypes methods for example can be called before invoking this method. + * Useful for python users. + */ MEDCouplingUMeshCellByTypeEntry *MEDCouplingUMesh::cellsByType() throw(INTERP_KERNEL::Exception) { if(!checkConsecutiveCellTypes()) @@ -2342,6 +2349,8 @@ void MEDCouplingUMesh::getCellsContainingPoint(const double *pos, double eps, st getCellsContainingPoints(pos,1,eps,elts,eltsIndex); } +/// @cond INTERNAL + namespace ParaMEDMEM { template @@ -2362,6 +2371,8 @@ namespace ParaMEDMEM }; } +/// @endcond + template void MEDCouplingUMesh::getCellsContainingPointsAlg(const double *coords, const double *pos, int nbOfPoints, double eps, std::vector& elts, std::vector& eltsIndex) const @@ -3458,6 +3469,8 @@ void MEDCouplingUMesh::getBoundingBoxForBBTree(std::vector& bbox) const } } +/// @cond INTERNAL + namespace ParaMEDMEMImpl { class ConnReader @@ -3481,6 +3494,8 @@ namespace ParaMEDMEMImpl }; } +/// @endcond + /*! * This method expects that 'this' is sorted by types. If not an exception will be thrown. * This method returns in the same format as code (see MEDCouplingUMesh::checkTypeConsistencyAndContig or MEDCouplingUMesh::splitProfilePerType) how @@ -3825,8 +3840,10 @@ DataArrayInt *MEDCouplingUMesh::getRenumArrForConsecutiveCellTypesSpec(const INT /*! * This method reorganize the cells of 'this' so that the cells with same geometric types are put together. - * If checkConsecutiveCellTypes() returns true, this method do not change anything of this. * The number of cells remains unchanged after the call of this method. + * This method tries to minimizes the number of needed permutations. So, this method behaves not exactly as + * MEDCouplingUMesh::sortCellsInMEDFileFrmt. + * * @return the array giving the correspondance old to new. */ DataArrayInt *MEDCouplingUMesh::rearrange2ConsecutiveCellTypes() diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx index 47a1771ce..02a8ddffe 100644 --- a/src/MEDLoader/MEDLoader.cxx +++ b/src/MEDLoader/MEDLoader.cxx @@ -133,6 +133,8 @@ int MEDLoader::_TOO_LONG_STR=0; using namespace ParaMEDMEM; +/// @cond INTERNAL + namespace MEDLoaderNS { class FieldPerTypeCopier @@ -201,6 +203,8 @@ namespace MEDLoaderNS void writeFieldTryingToFitExistingMesh(const char *fileName, const ParaMEDMEM::MEDCouplingFieldDouble *f); } +/// @endcond + /*! * This method sets the epsilon value used for node comparison when trying to buid a profile for a field on node/cell on an already written mesh. */ @@ -270,6 +274,8 @@ void MEDLoader::MEDFieldDoublePerCellType::releaseArray() delete [] _values; } +/// @cond INTERNAL + std::vector MEDLoaderNS::getMeshNamesFid(med_idt fid) { med_mesh_type type_maillage; @@ -327,6 +333,8 @@ void MEDLoaderNS::fillGaussDataOnField(const char *fileName, const std::list @@ -1927,6 +1937,8 @@ ParaMEDMEM::MEDCouplingFieldDouble *MEDLoaderNS::readFieldDoubleLev1(const char return ret; } +/// @endcond + MEDCouplingUMesh *MEDLoader::ReadUMeshFromFile(const char *fileName, const char *meshName, int meshDimRelToMax) throw(INTERP_KERNEL::Exception) { CheckFileForRead(fileName); diff --git a/src/MEDLoader/MEDLoader.hxx b/src/MEDLoader/MEDLoader.hxx index d8fdd6f40..46a867355 100644 --- a/src/MEDLoader/MEDLoader.hxx +++ b/src/MEDLoader/MEDLoader.hxx @@ -38,6 +38,7 @@ namespace ParaMEDMEM class MEDLOADER_EXPORT MEDLoader { public: +/// @cond INTERNAL class MEDConnOfOneElemType { public: @@ -81,7 +82,7 @@ class MEDLOADER_EXPORT MEDLoader std::vector _cell_id_per_type; INTERP_KERNEL::NormalizedCellType _type; }; - // +/// @endcond static void setEpsilonForNodeComp(double val) throw(INTERP_KERNEL::Exception); static void setCompPolicyForCell(int val) throw(INTERP_KERNEL::Exception); static void setTooLongStrPolicy(int val) throw(INTERP_KERNEL::Exception); diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx b/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx index 4296943d7..a9d616c03 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx +++ b/src/ParaMEDMEMTest/ParaMEDMEMTest.hxx @@ -71,6 +71,7 @@ class ParaMEDMEMTest : public CppUnit::TestFixture CPPUNIT_TEST(testICocoTrio1); CPPUNIT_TEST(testGauthier1); CPPUNIT_TEST(testGauthier2); + CPPUNIT_TEST(testGauthier3); CPPUNIT_TEST(testFabienAPI1); CPPUNIT_TEST(testFabienAPI2); CPPUNIT_TEST(testMEDLoaderRead1); @@ -126,6 +127,7 @@ public: void testICocoTrio1(); void testGauthier1(); void testGauthier2(); + void testGauthier3(); void testFabienAPI1(); void testFabienAPI2(); // @@ -181,6 +183,6 @@ void ParaMEDMEMTest_DumpArray (std::ostream & stream, const T* array, const int } } stream << "}" << std::endl; -}; +} #endif diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx index 3ed69cc42..92940b73a 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx +++ b/src/ParaMEDMEMTest/ParaMEDMEMTest_Gauthier1.cxx @@ -432,3 +432,156 @@ void ParaMEDMEMTest::testGauthier2() } } } + +/*! + * Non regression test testing copy constructor of InterpKernelDEC. + */ +void ParaMEDMEMTest::testGauthier3() +{ + int num_cas=0; + int rank, size; + MPI_Comm_rank(MPI_COMM_WORLD,&rank); + MPI_Comm_size(MPI_COMM_WORLD,&size); + + int is_master=0; + + CommInterface comm; + set emetteur_ids; + set recepteur_ids; + emetteur_ids.insert(0); + if(size!=4) + return; + recepteur_ids.insert(1); + if (size >2) + recepteur_ids.insert(2); + if (size >2) + emetteur_ids.insert(3); + if ((rank==0)||(rank==1)) + is_master=1; + + MPIProcessorGroup recepteur_group(comm,recepteur_ids); + MPIProcessorGroup emetteur_group(comm,emetteur_ids); + + + string cas; + if (recepteur_group.containsMyRank()) + { + cas="recepteur"; + //freopen("recpeteur.out","w",stdout); + //freopen("recepteur.err","w",stderr); + + } + else + { + cas="emetteur"; + // freopen("emetteur.out","w",stdout); + //freopen("emetteur.err","w",stderr); + } + double expected[8][4]={ + {1.,1.,1.,1.}, + {40., 40., 1., 1.}, + {1.,1.,1e200,1e200}, + {40.,1.,1e200,1e200}, + {1.,1.,1.,1.}, + {40.,1.,1.,1.}, + {1.,1.,1e200,1e200}, + {20.5,1.,1e200,1e200} + }; + + int expectedLgth[8]={4,4,2,2,4,4,2,2}; + + for (int send=0;send<2;send++) + for (int rec=0;rec<2;rec++) + { + + std::vector decu(1); + decu[0]=InterpKernelDEC(emetteur_group, recepteur_group); + InterpKernelDEC& dec_emetteur=decu[0]; + + //InterpKernelDEC dec_emetteur(emetteur_group, recepteur_group); + dec_emetteur.setOrientation(2); + TrioField champ_emetteur, champ_recepteur; + + if (send==0) + init_quadGauthier1(champ_emetteur,is_master); + else + init_triangleGauthier1(champ_emetteur,is_master); + if (rec==0) + init_triangleGauthier1(champ_recepteur,is_master); + else + init_quadGauthier1(champ_recepteur,is_master); + + if (cas=="emetteur") + { + champ_emetteur._field=new double[champ_emetteur._nb_elems]; + for (int ele=0;ele