From: eap Date: Wed, 31 Mar 2010 12:10:15 +0000 (+0000) Subject: untabify X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=79e1f4f3a0d4cee8d63891631e966e978d9b66d2;p=tools%2Fmedcoupling.git untabify --- diff --git a/doc/MEDMEM/MESHconnectivities.cxx b/doc/MEDMEM/MESHconnectivities.cxx index e1f57b05d..d27f05f70 100644 --- a/doc/MEDMEM/MESHconnectivities.cxx +++ b/doc/MEDMEM/MESHconnectivities.cxx @@ -50,13 +50,13 @@ int main (int argc, char ** argv) { int NomberOfNodesPerCell = Types[i]%100 ; const int * Connectivity = myMesh.getConnectivity(MED_FULL_INTERLACE, - MED_NODAL, - MED_CELL, - myType); + MED_NODAL, + MED_CELL, + myType); for (int j=0; j::iterator it; + typename std::map::iterator it; for (it=matrix[i].begin(); it != matrix[i].end(); it++) _auxiliary_matrix[i].push_back(*it);//MN: pq push_back plutot que simple affectation? } @@ -195,9 +195,9 @@ namespace INTERP_KERNEL /*! Matrix multiplies vector \a input and stores the result in vector \a output. - input and output are supposed to represent the same field - discretised on two different on meshes. - nb_comp is the number of components of the fields input and output + input and output are supposed to represent the same field + discretised on two different on meshes. + nb_comp is the number of components of the fields input and output The vector pointed by \a input must be dimensioned to the number of columns times nb_comp while the vector pointed by output must be dimensioned to the number of rows times nb_comp. @@ -212,15 +212,15 @@ namespace INTERP_KERNEL output[i]=0; for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { int icol = _cols[j]; - for(int comp = 0; comp < nb_comp; comp++) - output[i*nb_comp+comp]+=input[icol*nb_comp+comp]*_coeffs[j]; + for(int comp = 0; comp < nb_comp; comp++) + output[i*nb_comp+comp]+=input[icol*nb_comp+comp]*_coeffs[j]; } } } - /*! + /*! Transpose-multiplies vector \a input and stores the result in vector \a output. - nb_cols is the number of columns of the matrix, (it is not an attribute of the class) + nb_cols is the number of columns of the matrix, (it is not an attribute of the class) The vector pointed by \a input must be dimensioned to the number of lines _nb_rows while the vector pointed by output must be dimensioned to the number of columns nb_cols. @@ -230,23 +230,23 @@ namespace INTERP_KERNEL if (!_is_configured) configure(); - for (int icol=0; icol< nb_cols; icol++) - output[icol]=0.; + for (int icol=0; icol< nb_cols; icol++) + output[icol]=0.; for (int i=0; i< _nb_rows; i++) { - for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { + for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { int icol = _cols[j]; output[icol]+=input[i]*_coeffs[j]; } } } - /*! + /*! Transpose-multiplies vector \a input and stores the result in vector \a output. - input and output are supposed to represent the same field - discretised on two different on meshes. - nb_comp is the number of components of the fields input and output - nb_cols is the number of columns of the matrix, (it is not an attribute of the class) + input and output are supposed to represent the same field + discretised on two different on meshes. + nb_comp is the number of components of the fields input and output + nb_cols is the number of columns of the matrix, (it is not an attribute of the class) The vector pointed by \a input must be dimensioned to _nb_rows*nb_comp while the vector pointed by output must be dimensioned to nb_cols*nb_comp. @@ -256,57 +256,57 @@ namespace INTERP_KERNEL if (!_is_configured) configure(); - for (int icol=0; icol< nb_cols; icol++) - output[icol]=0.; + for (int icol=0; icol< nb_cols; icol++) + output[icol]=0.; for (int i=0; i< _nb_rows; i++) { - for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { + for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { int icol = _cols[j]; - for(int comp = 0; comp < nb_comp; comp++) - output[icol*nb_comp+comp]+=input[i*nb_comp+comp]*_coeffs[j]; + for(int comp = 0; comp < nb_comp; comp++) + output[icol*nb_comp+comp]+=input[i*nb_comp+comp]*_coeffs[j]; } } } - + /* - Sums the coefficients of each column of the matrix - nb_cols is the number of columns of the matrix, (it is not an attribute of the class) - The vector output must be dimensioned to nb_cols - */ - void colSum(std::vector< T >& output, int nb_cols) - { - if (!_is_configured) + Sums the coefficients of each column of the matrix + nb_cols is the number of columns of the matrix, (it is not an attribute of the class) + The vector output must be dimensioned to nb_cols + */ + void colSum(std::vector< T >& output, int nb_cols) + { + if (!_is_configured) configure(); - - for (int icol=0; icol< nb_cols; icol++) - output[icol]=0.; + + for (int icol=0; icol< nb_cols; icol++) + output[icol]=0.; for (int i=0; i< _nb_rows; i++) { - for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { + for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) { int icol = _cols[j]; output[icol]+=_coeffs[j]; } } - } + } - /* - Sums the coefficients of each row of the matrix - The vector output must be dimensioned to _nb_rows - */ - void rowSum(std::vector< T >& output) - { - if (!_is_configured) + /* + Sums the coefficients of each row of the matrix + The vector output must be dimensioned to _nb_rows + */ + void rowSum(std::vector< T >& output) + { + if (!_is_configured) configure(); - - for (int i=0; i< _nb_rows; i++) + + for (int i=0; i< _nb_rows; i++) { output[i]=0; for (unsigned int j=_ncols_offset[i]; j< _ncols_offset[i+1]; j++) output[i]+=_coeffs[j]; - } - } + } + } - /*! This operation freezes the profile of the matrix + /*! This operation freezes the profile of the matrix and puts it under a CSR form so that it becomes efficient both in terms of memory occupation and in terms of multiplication */ @@ -342,10 +342,10 @@ namespace INTERP_KERNEL return _auxiliary_matrix[irow]; } - int getNbRows() - { - return _nb_rows; - } + int getNbRows() + { + return _nb_rows; + } }; diff --git a/src/MEDCoupling/MEDCouplingPointSet.cxx b/src/MEDCoupling/MEDCouplingPointSet.cxx index 3a2876ae7..e8dc92f42 100644 --- a/src/MEDCoupling/MEDCouplingPointSet.cxx +++ b/src/MEDCoupling/MEDCouplingPointSet.cxx @@ -256,10 +256,10 @@ bool MEDCouplingPointSet::intersectsBoundingBox(const double* bb1, const double* bool intersects = (bbtemp[idim*2]setMeshDimension(3); targetMesh->allocateCells(12); diff --git a/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx b/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx index da1c1d01a..453ad73f6 100644 --- a/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx +++ b/src/ParaMEDMEM/MEDLoader/MEDLoader.cxx @@ -201,12 +201,12 @@ namespace MEDLoader char *attdes=new char[MED_TAILLE_DESC*natt+1]; char *gro=new char[MED_TAILLE_LNOM*ngro+1]; MEDfamInfo(fid,(char *)meshName,i+1,nomfam,&numfam,attide,attval,attdes,&natt,gro,&ngro); - for(int j=0;j::const_iterator iter=conn.begin();iter!=conn.end();iter++) { - unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); - if(ret::iterator iter=conn.begin();iter!=conn.end();) { - unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); - if(curDim!=meshDim) - { - (*iter).releaseArray(); - iter=conn.erase(iter); - } - else - iter++; + unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension(); + if(curDim!=meshDim) + { + (*iter).releaseArray(); + iter=conn.erase(iter); + } + else + iter++; } } @@ -719,35 +719,35 @@ namespace MEDLoader }; void tradMEDFileCoreFrmt2MEDCouplingUMesh(const std::list& medConnFrmt, - DataArrayInt* &conn, - DataArrayInt* &connIndex, - const std::vector& familiesToKeep) + DataArrayInt* &conn, + DataArrayInt* &connIndex, + const std::vector& familiesToKeep) { bool keepAll=familiesToKeep.empty(); if(medConnFrmt.empty()) { - conn=0; - connIndex=0; - return ; + conn=0; + connIndex=0; + return ; } std::list::const_iterator iter=medConnFrmt.begin(); int totalNbOfCells=0; int totalNbOfMedConn=0; for(;iter!=medConnFrmt.end();iter++) { - const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()); - if(keepAll) + const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()); + if(keepAll) totalNbOfCells+=(*iter).getLength(); - else - for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) + else + for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) totalNbOfCells+=std::count((*iter).getFam(),(*iter).getFam()+(*iter).getLength(),*iter2); - if(!cellMod.isDynamic()) - if(keepAll) - totalNbOfMedConn+=(*iter).getLength()*cellMod.getNumberOfNodes(); - else - for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) - totalNbOfMedConn+=std::count((*iter).getFam(),(*iter).getFam()+(*iter).getLength(),*iter2)*cellMod.getNumberOfNodes(); - else + if(!cellMod.isDynamic()) + if(keepAll) + totalNbOfMedConn+=(*iter).getLength()*cellMod.getNumberOfNodes(); + else + for(std::vector::const_iterator iter2=familiesToKeep.begin();iter2!=familiesToKeep.end();iter2++) + totalNbOfMedConn+=std::count((*iter).getFam(),(*iter).getFam()+(*iter).getLength(),*iter2)*cellMod.getNumberOfNodes(); + else if(keepAll) totalNbOfMedConn+=(*iter).getConnLength(); else @@ -766,12 +766,12 @@ namespace MEDLoader int *connPtr=conn->getPointer(); for(iter=medConnFrmt.begin();iter!=medConnFrmt.end();iter++) { - INTERP_KERNEL::NormalizedCellType type=(*iter).getType(); - const int *sourceConn=(*iter).getArray(); + INTERP_KERNEL::NormalizedCellType type=(*iter).getType(); + const int *sourceConn=(*iter).getArray(); const int *sourceIndex=(*iter).getIndex(); - const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type); - int nbOfCellsInCurType; - int nbOfNodesIn1Cell=cellMod.getNumberOfNodes(); + const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type); + int nbOfCellsInCurType; + int nbOfNodesIn1Cell=cellMod.getNumberOfNodes(); nbOfCellsInCurType=(*iter).getLength(); bool isDyn=cellMod.isDynamic(); int *tmpConnPtr; @@ -835,14 +835,14 @@ namespace MEDLoader const int *connIdxPtr=connIndex->getPointer(); for(int i=0;i(),1)); return ret; @@ -858,14 +858,14 @@ namespace MEDLoader for(int i=0;i(),1)); return ret; diff --git a/src/ParaMEDMEM/Test/ParaMEDMEMTest_ICocoTrio.cxx b/src/ParaMEDMEM/Test/ParaMEDMEMTest_ICocoTrio.cxx index bb377556d..4d2f5de25 100644 --- a/src/ParaMEDMEM/Test/ParaMEDMEMTest_ICocoTrio.cxx +++ b/src/ParaMEDMEM/Test/ParaMEDMEMTest_ICocoTrio.cxx @@ -20,7 +20,7 @@ void synchronize_bool(bool& stop, synctype s) { int my_stop; int my_stop_temp = stop?1:0; - + if (s==sync_and) MPI_Allreduce(&my_stop_temp,&my_stop,1,MPI_INTEGER,MPI_MIN,MPI_COMM_WORLD); else if (s==sync_or) @@ -65,7 +65,7 @@ void remplit_coord(double* coords) for (int i=4;i<8;i++) { for (int d=0;d<3;d++) - coords[i*3+d]=coords[(i-4)*3+d]; + coords[i*3+d]=coords[(i-4)*3+d]; coords[i*3+1]+=1e-5; } @@ -187,7 +187,7 @@ void ParaMEDMEMTest::testICocoTrio1() { champ_emetteur._field=new double[champ_emetteur._nb_elems]; for (int ele=0;elegetNumberOfCells(); double *value=parafield->getField()->getArray()->getPointer(); for(int ielem=0; ielem