From: vbd Date: Wed, 20 Jul 2011 17:35:46 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: MEDPartitioner_first_compilable_version~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=97f976ff973ac12c0235dce6e6872bbf73f23ca3;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/MEDPartitioner/MEDPARTITIONER_Graph.cxx b/src/MEDPartitioner/MEDPARTITIONER_Graph.cxx index 607aef3be..66fd5497d 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_Graph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_Graph.cxx @@ -21,7 +21,7 @@ using namespace MEDPARTITIONER; -Graph::Graph(MEDPARTITIONER::MEDSKYLINEARRAY* array, int* edgeweight):m_graph(array),m_partition(0),m_edgeweight(edgeweight),m_cellweight(0) +Graph::Graph(MEDPARTITIONER::MEDSKYLINEARRAY* array, int* edgeweight):_graph(array),_partition(0),_edgeweight(edgeweight),_cellweight(0) { } @@ -33,15 +33,15 @@ Graph::Graph(MEDPARTITIONER::MEDSKYLINEARRAY* array, int* edgeweight):m_graph(ar Graph::~Graph() { - if (m_partition) + if (_partition) { - delete m_partition; - m_partition=0; + delete _partition; + _partition=0; } - if (m_graph) + if (_graph) { - delete m_graph; - m_graph=0; + delete _graph; + _graph=0; } } diff --git a/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx b/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx index 3764063bd..a1967a176 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx +++ b/src/MEDPartitioner/MEDPARTITIONER_Graph.hxx @@ -38,29 +38,29 @@ class MEDPARTITIONER_EXPORT Graph virtual ~Graph(); - void setEdgesWeights(int* edgeweight){m_edgeweight=edgeweight;} - void setVerticesWeights(int* cellweight){m_cellweight=cellweight;} + void setEdgesWeights(int* edgeweight){_edgeweight=edgeweight;} + void setVerticesWeights(int* cellweight){_cellweight=cellweight;} //computes partitioning of the graph virtual void partGraph(int ndomain, const std::string&, ParaDomainSelector* sel=0)=0; //! returns the partitioning - const int* getPart() const {return m_partition->getValue();} + const int* getPart() const {return _partition->getValue();} //! returns the number of graph vertices (which can correspond to the cells in the mesh!) - int nbVertices() const {return m_graph->getNumberOf();} + int nbVertices() const {return _graph->getNumberOf();} - const MEDPARTITIONER::MEDSKYLINEARRAY* getGraph() const {return m_graph;} + const MEDPARTITIONER::MEDSKYLINEARRAY* getGraph() const {return _graph;} protected: - MEDPARTITIONER::MEDSKYLINEARRAY* m_graph; + MEDPARTITIONER::MEDSKYLINEARRAY* _graph; - MEDPARTITIONER::MEDSKYLINEARRAY* m_partition; + MEDPARTITIONER::MEDSKYLINEARRAY* _partition; - int* m_edgeweight; + int* _edgeweight; - int* m_cellweight; + int* _cellweight; }; } diff --git a/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx b/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx new file mode 100644 index 000000000..8a6ab8b78 --- /dev/null +++ b/src/MEDPartitioner/MEDPARTITIONER_JointFinder.cxx @@ -0,0 +1,122 @@ +#include "MEDPARTITIONER_JointFinder.hxx" +#include "MEDPARTITIONER_MESHCollection.hxx" +#include "MEDPARTITIONER_Topology.hxx" +#include "MEDPARTITIONER_ParaDomainSelector.hxx" +#include "MEDCouplingUMesh.hxx" +#include "BBTree.txx" + + +/*! Method contributing to the distant cell graph + */ +using namespace MEDPARTITIONER; + +JointFinder::JointFinder(const MESHCollection& mc):_mesh_collection(mc), _topology(mc.getTopology()),_domain_selector(mc.getParaDomainSelector()) +{ +} + +void JointFinder::findCommonDistantNodes() +{ + int nbdomain=_topology->nbDomain(); + _distant_node_cell.resize(nbdomain); + _node_node.resize(nbdomain); + for (int i=0; inbProcs(); + std::vector* > bbtree(nbdomain); + std::vector rev(nbdomain); + std::vectorrevIndx(nbdomain); + int meshDim; + int spaceDim; + + for (int mydomain=0;mydomainisMyDomain(mydomain)) continue; + const ParaMEDMEM::MEDCouplingUMesh* myMesh=_mesh_collection.getMesh(mydomain); + + meshDim=myMesh->getMeshDimension(); + spaceDim= myMesh->getSpaceDimension(); + rev[mydomain] = ParaMEDMEM::DataArrayInt::New(); + revIndx[mydomain] = ParaMEDMEM::DataArrayInt::New(); + myMesh->getReverseNodalConnectivity(rev[mydomain],revIndx[mydomain]); + double* bbx=new double[2*spaceDim*myMesh->getNumberOfNodes()]; + for (int i=0; igetNumberOfNodes()*spaceDim;i++) + { + const double* coords=myMesh->getCoords()->getConstPointer(); + bbx[2*i]=(coords[i])-1e-12; + bbx[2*i+1]=bbx[2*i]+2e-12; + } + bbtree[mydomain]=new BBTree<3> (bbx,0,0,myMesh->getNumberOfNodes(),-1e-12); + } + + for (int isource=0;isourceisMyDomain(isource)&&_domain_selector->isMyDomain(itarget)) continue; + if (_domain_selector->isMyDomain(isource)) + { + //preparing data for treatment on target proc + int targetProc = _domain_selector->getProcessorID(itarget); + + std::vector vec(spaceDim*sourceMesh->getNumberOfNodes()); + std::copy(sourceMesh->getCoords()->getConstPointer(),sourceMesh->getCoords()->getConstPointer()+sourceMesh->getNumberOfNodes()*spaceDim,&vec[0]); + _domain_selector->sendDoubleVec (vec,targetProc); + + //retrieving target data for storage in commonDistantNodes array + std::vector localCorrespondency; + _domain_selector->recvIntVec(localCorrespondency, targetProc); + for (int i=0; iisMyDomain(itarget)) + { + //receiving data from source proc + int sourceProc = isource%nbproc; + std::vector recvVec; + _domain_selector->recvDoubleVec(recvVec,sourceProc); + std::map commonNodes; // (local nodes, distant nodes) list + for (int inode=0; inode<(recvVec.size()/meshDim);inode++) + { + double* bbox=new double[2*spaceDim]; + for (int i=0; i inodes; + bbtree[itarget]->getIntersectingElems(bbox,inodes); + delete[] bbox; + + if (inodes.size()>0) commonNodes.insert(std::make_pair(inodes[0],inode)); + } + std::vector nodeCellCorrespondency; + for (std::map::iterator iter=commonNodes.begin();iter!=commonNodes.end();iter++) + { + _node_node[itarget][isource].push_back(std::make_pair(iter->first, iter->second));//storing node pairs in a vector + const int*revIndxPtr=revIndx[itarget]->getConstPointer(); + const int*revPtr=rev[itarget]->getConstPointer(); + for (int icell=revIndxPtr[iter->first];icellfirst+1];icell++) + { + nodeCellCorrespondency.push_back(iter->second); + nodeCellCorrespondency.push_back(revPtr[icell]); + } + } + _domain_selector->sendIntVec(nodeCellCorrespondency, sourceProc); + } + } + +} +std::vector > > & JointFinder::getDistantNodeCell() +{ + return _distant_node_cell; +} + +std::vector > > >& JointFinder::getNodeNode() +{ + return _node_node; +} diff --git a/src/MEDPartitioner/MEDPARTITIONER_JointFinder.hxx b/src/MEDPartitioner/MEDPARTITIONER_JointFinder.hxx new file mode 100644 index 000000000..558f06b39 --- /dev/null +++ b/src/MEDPartitioner/MEDPARTITIONER_JointFinder.hxx @@ -0,0 +1,43 @@ +// Copyright (C) 2007-2010 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 +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef __MEDPARTITIONER_JOINTFINDER_HXX__ +#define __MEDPARTITIONER_JOINTFINDER_HXX__ + +#include +#include +namespace MEDPARTITIONER { + class MESHCollection; + class ParaDomainSelector; + class Topology; +class JointFinder +{ +public: + JointFinder(const MESHCollection& mc); + void findCommonDistantNodes(); + std::vector > >& getDistantNodeCell(); + std::vector > > >& getNodeNode(); +private: + const MESHCollection& _mesh_collection; + const ParaDomainSelector* _domain_selector; + const Topology* _topology; + std::vector > > _distant_node_cell; + std::vector > > > _node_node; +}; +}; +#endif diff --git a/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx index cbe393617..f0c7d100e 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_METISGraph.cxx @@ -46,15 +46,15 @@ void METISGraph::partGraph(int ndomain, ParaDomainSelector* parallelizer) { // number of graph vertices - int n = m_graph->getNumberOf(); + int n = _graph->getNumberOf(); //graph - int * xadj=const_cast(m_graph->getIndex()); - int * adjncy = const_cast(m_graph->getValue()); + int * xadj=const_cast(_graph->getIndex()); + int * adjncy = const_cast(_graph->getValue()); //constraints - int * vwgt=m_cellweight; - int * adjwgt=m_edgeweight; - int wgtflag=(m_edgeweight!=0)?1:0+(m_cellweight!=0)?2:0; + int * vwgt=_cellweight; + int * adjwgt=_edgeweight; + int wgtflag=(_edgeweight!=0)?1:0+(_cellweight!=0)?2:0; //base 0 or 1 int base=0; @@ -124,6 +124,6 @@ void METISGraph::partGraph(int ndomain, // the fifth argument true specifies that only the pointers are passed //to the object - m_partition = new MEDPARTITIONER::MEDSKYLINEARRAY(index,value); + _partition = new MEDPARTITIONER::MEDSKYLINEARRAY(index,value); } diff --git a/src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.cxx b/src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.cxx index 94ae8218a..010ef4fd3 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_ParallelTopology.cxx @@ -40,7 +40,7 @@ using namespace std; using namespace MEDPARTITIONER; //empty constructor -ParallelTopology::ParallelTopology():m_nb_domain(0),m_mesh_dimension(0) +ParallelTopology::ParallelTopology():_nb_domain(0),_mesh_dimension(0) {} //!constructing topology according to mesh collection @@ -48,48 +48,48 @@ ParallelTopology::ParallelTopology(const vector& const vector& cz, vector& cellglobal, vector& nodeglobal, - vector& faceglobal):m_nb_domain(meshes.size())/*,m_mesh_dimension(meshes[0]->getMeshDimension())*/ + vector& faceglobal):_nb_domain(meshes.size())/*,_mesh_dimension(meshes[0]->getMeshDimension())*/ { int index_global=0; int index_node_global=0; int index_face_global=0; - m_nb_cells.resize(m_nb_domain); - m_nb_nodes.resize(m_nb_domain); - // m_nb_faces.resize(m_nb_domain); + _nb_cells.resize(_nb_domain); + _nb_nodes.resize(_nb_domain); + // _nb_faces.resize(_nb_domain); - m_loc_to_glob.resize(m_nb_domain); - m_node_loc_to_glob.resize(m_nb_domain); - // m_face_loc_to_glob.resize(m_nb_domain); + _loc_to_glob.resize(_nb_domain); + _node_loc_to_glob.resize(_nb_domain); + // _face_loc_to_glob.resize(_nb_domain); //MED_EN::medEntityMesh constituent_entity; bool parallel_mode = false; - for (int idomain=0; !parallel_mode && idomaingetMeshDimension(); - //constituent_entity = (m_mesh_dimension == 3 ? MED_EN::MED_FACE : MED_EN::MED_EDGE ); + _mesh_dimension = meshes[idomain]->getMeshDimension(); + //constituent_entity = (_mesh_dimension == 3 ? MED_EN::MED_FACE : MED_EN::MED_EDGE ); //creating cell maps - m_nb_cells[idomain]=meshes[idomain]->getNumberOfCells(); - // cout << "Nb cells (domain "<getNumberOfCells(); + // cout << "Nb cells (domain "< ("<& else { MESSAGE_MED("Using former global numbering"); - for (int i=0; i ("<getNumberOfNodes()); + _nb_total_cells=index_global; + _nb_cells[0]=index_global; + _node_loc_to_glob[idomain].resize(meshes[idomain]->getNumberOfNodes()); for (int i=0; igetNumberOfNodes(); i++) { - m_node_glob_to_loc.insert(make_pair(i,make_pair(0,i))); - m_node_loc_to_glob[0][i]=i; + _node_glob_to_loc.insert(make_pair(i,make_pair(0,i))); + _node_loc_to_glob[0][i]=i; } - m_nb_total_nodes=meshes[idomain]->getNumberOfNodes(); - m_nb_nodes[0]=m_nb_total_nodes; + _nb_total_nodes=meshes[idomain]->getNumberOfNodes(); + _nb_nodes[0]=_nb_total_nodes; - MESSAGE_MED ("nb total cells "<< m_nb_total_cells); - MESSAGE_MED("nb total nodes "<< m_nb_total_nodes); + MESSAGE_MED ("nb total cells "<< _nb_total_cells); + MESSAGE_MED("nb total nodes "<< _nb_total_nodes); return; } //creating node maps - m_nb_nodes[idomain]=meshes[idomain]->getNumberOfNodes(); + _nb_nodes[idomain]=meshes[idomain]->getNumberOfNodes(); INTERP_KERNEL::HashMap > local2distant; - m_node_loc_to_glob[idomain].resize(m_nb_nodes[idomain]); + _node_loc_to_glob[idomain].resize(_nb_nodes[idomain]); for (int icz=0; iczgetLocalDomainNumber() == idomain && @@ -151,84 +151,84 @@ ParallelTopology::ParallelTopology(const vector& // setting mappings for all nodes if (nodeglobal[idomain]==0) { - for (int inode=0; inodesecond).first; int distant = (local2distant.find(inode)->second).second; - int global_number=m_loc_to_glob[ip][distant]; - m_node_glob_to_loc.insert(make_pair(global_number,make_pair(idomain,inode))); - m_node_loc_to_glob[idomain][inode]=global_number; + int global_number=_loc_to_glob[ip][distant]; + _node_glob_to_loc.insert(make_pair(global_number,make_pair(idomain,inode))); + _node_loc_to_glob[idomain][inode]=global_number; } } } //using former node numbering else { - for (int inode=0; inodenbVertices()), - m_mesh_dimension(mesh_dimension) + _nb_domain(nb_domain), + _nb_cells(graph->nbVertices()), + _mesh_dimension(mesh_dimension) { - m_nb_cells.resize(m_nb_domain); - m_nb_nodes.resize(m_nb_domain); - m_nb_faces.resize(m_nb_domain); + _nb_cells.resize(_nb_domain); + _nb_nodes.resize(_nb_domain); + _nb_faces.resize(_nb_domain); - m_loc_to_glob.resize(m_nb_domain); - m_node_loc_to_glob.resize(m_nb_domain); - m_face_loc_to_glob.resize(m_nb_domain); + _loc_to_glob.resize(_nb_domain); + _node_loc_to_glob.resize(_nb_domain); + _face_loc_to_glob.resize(_nb_domain); // used in parallel mode only - m_cell_loc_to_glob_fuse.resize(m_nb_domain); - m_face_loc_to_glob_fuse.resize(m_nb_domain); + _cell_loc_to_glob_fuse.resize(_nb_domain); + _face_loc_to_glob_fuse.resize(_nb_domain); - for (int i=0; i getPart(); - m_nb_total_cells= graph->nbVertices(); + _nb_total_cells= graph->nbVertices(); - for (int icell=0; icell local_node = m_node_glob_to_loc.find(node_list[i])->second; + pair local_node = _node_glob_to_loc.find(node_list[i])->second; ip[i]=local_node.first; local[i]=local_node.second; } @@ -263,13 +263,13 @@ void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, i * */ void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, int* local, int ip) { - if (m_node_glob_to_loc.empty()) + if (_node_glob_to_loc.empty()) throw MEDMEM::MEDEXCEPTION("convertGlobalNodeList - Node mapping has not yet been built"); for (int i=0; i< nbnode; i++) { typedef INTERP_KERNEL::HashMultiMap >::iterator mmiter; - pair range=m_node_glob_to_loc.equal_range(node_list[i]); + pair range=_node_glob_to_loc.equal_range(node_list[i]); for (mmiter it=range.first; it !=range.second; it++) { int ipfound=(it->second).first; @@ -287,13 +287,13 @@ void ParallelTopology::convertGlobalNodeList(const int* node_list, int nbnode, i * */ void ParallelTopology::convertGlobalNodeListWithTwins(const int* node_list, int nbnode, int*& local, int*& ip,int*& full_array, int& size) { - if (m_node_glob_to_loc.empty()) + if (_node_glob_to_loc.empty()) throw MEDMEM::MEDEXCEPTION("convertGlobalNodeList - Node mapping has not yet been built"); size=0; for (int i=0; i< nbnode; i++) { - int count= m_node_glob_to_loc.count(node_list[i]); + int count= _node_glob_to_loc.count(node_list[i]); // if (count > 1) // cout << "noeud " << node_list[i]<< " doublon d'ordre " << count< >::iterator mmiter; - pair range=m_node_glob_to_loc.equal_range(node_list[i]); + pair range=_node_glob_to_loc.equal_range(node_list[i]); for (mmiter it=range.first; it !=range.second; it++) { ip[index]=(it->second).first; @@ -328,9 +328,9 @@ void ParallelTopology::convertGlobalFaceListWithTwins(const int* face_list, int size=0; for (int i=0; i< nbface; i++) { - //int count = m_face_glob_to_loc.count(face_list[i]); + //int count = _face_glob_to_loc.count(face_list[i]); //if (count >1) MESSAGE_MED("face en doublon "< >::iterator mmiter; - pair range=m_face_glob_to_loc.equal_range(face_list[i]); + pair range=_face_glob_to_loc.equal_range(face_list[i]); for (mmiter it=range.first; it !=range.second; it++) { ip[index]=(it->second).first; @@ -357,7 +357,7 @@ void ParallelTopology::convertGlobalCellList(const int* cell_list, int nbcell, i { for (int i=0; i< nbcell; i++) { - INTERP_KERNEL::HashMap >::const_iterator iter = m_glob_to_loc.find(cell_list[i]); + INTERP_KERNEL::HashMap >::const_iterator iter = _glob_to_loc.find(cell_list[i]); ip[i]=(iter->second).first; local[i]=(iter->second).second; } @@ -370,8 +370,8 @@ void ParallelTopology::convertGlobalFaceList(const int* face_list, int nbface, i { for (int i=0; i< nbface; i++) { - INTERP_KERNEL::HashMap >::const_iterator iter = m_face_glob_to_loc.find(face_list[i]); - if (iter == m_face_glob_to_loc.end()) + INTERP_KERNEL::HashMap >::const_iterator iter = _face_glob_to_loc.find(face_list[i]); + if (iter == _face_glob_to_loc.end()) { throw MED_EXCEPTION("convertGlobalFaceList - Face not found"); } @@ -393,7 +393,7 @@ void ParallelTopology::convertGlobalFaceList(const int* face_list, int nbface, i for (int i=0; i< nbface; i++) { typedef INTERP_KERNEL::HashMultiMap >::iterator mmiter; - pair range=m_face_glob_to_loc.equal_range(face_list[i]); + pair range=_face_glob_to_loc.equal_range(face_list[i]); for (mmiter it=range.first; it !=range.second; it++) { int ipfound=(it->second).first; @@ -416,7 +416,7 @@ void ParallelTopology::convertToLocal2ndVersion(int* nodes, int nbnodes, int ido // cout <<" inode :"<, std::vector){throw MEDEXCEPTION("SequentialTopology - not implemented yet");} - -//!converts a list of global cell numbers -//!to a distributed array with local cell numbers -void SequentialTopology::convertGlobalNodeList(const int*, int,int*,int*){} - -//!converts a list of global node numbers -//!to a distributed array with local cell numbers -void SequentialTopology::convertGlobalCellList(const int*, int , int*, int *){} - -//number of doamins -int SequentialTopology::nbDomain() const -{ - return 0; -} - -//number of cells -int SequentialTopology::nbCells() const -{ - return 0; -} - -//number of cells on a specific domain -int SequentialTopology::nbCells(int idomain) const -{ - return 0; -} - -//!creating node mapping -void SequentialTopology::createNodeMapping(vector type_connectivity,int* present_type_numbers, int idomain){} - -//!converting node global numberings to local numberings -void SequentialTopology::convertToLocal(vector type_connectivity,int* present_type_numbers){} - -//!retrieving number of nodes -int SequentialTopology::getNodeNumber(int idomain) const -{ - return 0; -} - -//!retrieving list of nodes -void SequentialTopology::getNodeList(int idomain, int* list) const{} - -//!retrieving number of cells -int SequentialTopology::getCellNumber(int idomain) const -{ - return 0; -} - -//!retrieving list of cells -void SequentialTopology::getCellList(int idomain, int* list) const{} diff --git a/src/MEDPartitioner/MEDPARTITIONER_SequentialTopology.hxx b/src/MEDPartitioner/MEDPARTITIONER_SequentialTopology.hxx deleted file mode 100644 index 765819b73..000000000 --- a/src/MEDPartitioner/MEDPARTITIONER_SequentialTopology.hxx +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (C) 2007-2010 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 -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef SequentialTOPOLOGY_HXX_ -#define SequentialTOPOLOGY_HXX_ - -#include "MEDPARTITIONER.hxx" - -namespace MEDPARTITIONER { - class SequentialTopology:public Topology - { - - public: - - SequentialTopology(); - SequentialTopology(std::vector, std::vector); - - //!converts a list of global cell numbers - //!to a distributed array with local cell numbers - void convertGlobalNodeList(const int*, int,int*,int*); - - //!converts a list of global node numbers - //!to a distributed array with local cell numbers - void convertGlobalCellList(const int*, int , int*, int *); - - //number of doamins - int nbDomain() const; - - //number of cells - int nbCells() const; - - //number of cells on a specific domain - int nbCells(int idomain) const; - - //!creating node mapping - void createNodeMapping(vector type_connectivity,int* present_type_numbers, int idomain); - - //!converting node global numberings to local numberings - void convertToLocal(vector type_connectivity,int* present_type_numbers); - - //!retrieving number of nodes - int getNodeNumber(int idomain) const ; - - //!retrieving list of nodes - void getNodeList(int idomain, int* list) const; - - //!retrieving number of cells - int getCellNumber(int idomain) const ; - - //!retrieving list of cells - void getCellList(int idomain, int* list) const; - - private: - //!mapping global -> local - map > m_glob_to_loc; - - //!mapping local -> global - map,int> m_loc_to_glob; - - //!mapping global -> local - multimap > m_node_glob_to_loc; - - //!mapping local -> global - map,int> m_node_loc_to_glob; - - vector m_nb_cells; - - vector m_nb_nodes; - - int m_nb_total_cells; - - int m_nb_total_nodes; - }; -} -#endif /*SequentialTOPOLOGY_HXX_*/ diff --git a/src/MEDPartitioner/MEDPARTITIONER_UserGraph.cxx b/src/MEDPartitioner/MEDPARTITIONER_UserGraph.cxx index 9cbaeadea..948ec64cb 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_UserGraph.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_UserGraph.cxx @@ -39,7 +39,7 @@ UserGraph::UserGraph(MEDPARTITIONER::MEDSKYLINEARRAY* array, const int* partitio value[i]=partition[i]; } - m_partition = new MEDPARTITIONER::MEDSKYLINEARRAY(index,value); + _partition = new MEDPARTITIONER::MEDSKYLINEARRAY(index,value); }