Public Member Functions | |
| SerialPartitionerBase (bool ignoreGhosts=false) | |
| virtual | ~SerialPartitionerBase () |
| void | getNeighbors (const Mesh &mesh, Array< Array< int > > &neighbors, int &nEdges) const |
| Set< int > | arrayToSet (const Array< int > &a) const |
| virtual void | getAssignments (const Mesh &mesh, int np, Array< int > &assignments) const =0 |
| Array< Mesh > | makeMeshParts (const Mesh &mesh, int np, Array< Sundance::Map< int, int > > &oldElemLIDToNewLIDMap, Array< Sundance::Map< int, int > > &oldVertLIDToNewLIDMap) const |
| void | getOffProcData (int p, const Array< int > &elemAssignments, const Array< int > &nodeAssignments, Set< int > &offProcNodes, Set< int > &offProcElems) const |
| void | getNodeAssignments (int nProc, const Array< int > &elemAssignments, Array< int > &nodeAssignments, Array< int > &nodeOwnerElems, Array< int > &nodesPerProc) const |
| void | getElemsPerProc (int nProc, const Array< int > &elemAssignments, Array< int > &elemsPerProc) const |
| void | remapEntities (const Array< int > &assignments, int nProc, Array< int > &entityMap) const |
Private Member Functions | |
| int | max (const Set< int > &s) const |
Private Attributes | |
| bool | ignoreGhosts_ |
| Array< Set< int > > | elemVerts_ |
| Array< Set< int > > | elemEdgewiseNbors_ |
| Array< Set< int > > | vertElems_ |
Base class for mesh partitioners that run in serial
Definition at line 58 of file SundanceSerialPartitionerBase.hpp.
| Sundance::SerialPartitionerBase::SerialPartitionerBase | ( | bool | ignoreGhosts = false | ) | [inline] |
Definition at line 62 of file SundanceSerialPartitionerBase.hpp.
| virtual Sundance::SerialPartitionerBase::~SerialPartitionerBase | ( | ) | [inline, virtual] |
Definition at line 66 of file SundanceSerialPartitionerBase.hpp.
| Set< int > SerialPartitionerBase::arrayToSet | ( | const Array< int > & | a | ) | const |
Definition at line 61 of file SundanceSerialPartitionerBase.cpp.
References Sundance::Set< Key, Compare >::put().
Referenced by getNeighbors(), and makeMeshParts().
| virtual void Sundance::SerialPartitionerBase::getAssignments | ( | const Mesh & | mesh, |
| int | np, | ||
| Array< int > & | assignments | ||
| ) | const [pure virtual] |
Implemented in Sundance::FileIOChacoPartitioner.
Referenced by makeMeshParts().
| void SerialPartitionerBase::getElemsPerProc | ( | int | nProc, |
| const Array< int > & | elemAssignments, | ||
| Array< int > & | elemsPerProc | ||
| ) | const |
Definition at line 170 of file SundanceSerialPartitionerBase.cpp.
| void SerialPartitionerBase::getNeighbors | ( | const Mesh & | mesh, |
| Array< Array< int > > & | neighbors, | ||
| int & | nEdges | ||
| ) | const |
Definition at line 76 of file SundanceSerialPartitionerBase.cpp.
References arrayToSet(), Sundance::Set< Key, Compare >::begin(), elemEdgewiseNbors_, elemVerts_, Sundance::Set< Key, Compare >::end(), Sundance::Set< Key, Compare >::erase(), Sundance::Mesh::getCofacets(), Sundance::Mesh::getFacetArray(), Sundance::Mesh::numCells(), Sundance::Set< Key, Compare >::put(), Sundance::Set< Key, Compare >::setUnion(), Sundance::Set< Key, Compare >::size(), Sundance::Mesh::spatialDim(), and vertElems_.
Referenced by Sundance::FileIOChacoPartitioner::writeGraph().
| void SerialPartitionerBase::getNodeAssignments | ( | int | nProc, |
| const Array< int > & | elemAssignments, | ||
| Array< int > & | nodeAssignments, | ||
| Array< int > & | nodeOwnerElems, | ||
| Array< int > & | nodesPerProc | ||
| ) | const |
Definition at line 148 of file SundanceSerialPartitionerBase.cpp.
References max(), and vertElems_.
Referenced by makeMeshParts().
| void SerialPartitionerBase::getOffProcData | ( | int | p, |
| const Array< int > & | elemAssignments, | ||
| const Array< int > & | nodeAssignments, | ||
| Set< int > & | offProcNodes, | ||
| Set< int > & | offProcElems | ||
| ) | const |
Definition at line 208 of file SundanceSerialPartitionerBase.cpp.
References Sundance::Set< Key, Compare >::begin(), elemEdgewiseNbors_, elemVerts_, Sundance::Set< Key, Compare >::end(), ignoreGhosts_, Sundance::Set< Key, Compare >::put(), Playa::Out::root(), and vertElems_.
Referenced by makeMeshParts().
| Array< Mesh > SerialPartitionerBase::makeMeshParts | ( | const Mesh & | mesh, |
| int | np, | ||
| Array< Sundance::Map< int, int > > & | oldElemLIDToNewLIDMap, | ||
| Array< Sundance::Map< int, int > > & | oldVertLIDToNewLIDMap | ||
| ) | const |
Definition at line 259 of file SundanceSerialPartitionerBase.cpp.
References arrayToSet(), Sundance::Set< Key, Compare >::begin(), Sundance::Set< Key, Compare >::contains(), Sundance::MeshType::createEmptyMesh(), Sundance::Set< Key, Compare >::end(), Sundance::Set< Key, Compare >::erase(), Sundance::Map< Key, Value, Compare >::get(), Sundance::Mesh::getAllLabelsForDimension(), getAssignments(), Sundance::Mesh::getCofacets(), Sundance::Mesh::getFacetArray(), Sundance::Mesh::getLIDsForLabel(), getNodeAssignments(), getOffProcData(), Sundance::Mesh::nodePosition(), Sundance::Map< Key, Value, Compare >::put(), Sundance::Set< Key, Compare >::put(), remapEntities(), Sundance::Mesh::spatialDim(), and Playa::MPIComm::world().
| int SerialPartitionerBase::max | ( | const Set< int > & | s | ) | const [private] |
Definition at line 71 of file SundanceSerialPartitionerBase.cpp.
References Sundance::Set< Key, Compare >::rbegin().
Referenced by getNodeAssignments().
| void SerialPartitionerBase::remapEntities | ( | const Array< int > & | assignments, |
| int | nProc, | ||
| Array< int > & | entityMap | ||
| ) | const |
Remap global element or node numberings so that each processor owns sequentially-numbered global indexes.
Definition at line 183 of file SundanceSerialPartitionerBase.cpp.
Referenced by makeMeshParts().
Array<Set<int> > Sundance::SerialPartitionerBase::elemEdgewiseNbors_ [mutable, private] |
Definition at line 118 of file SundanceSerialPartitionerBase.hpp.
Referenced by getNeighbors(), and getOffProcData().
Array<Set<int> > Sundance::SerialPartitionerBase::elemVerts_ [mutable, private] |
Definition at line 117 of file SundanceSerialPartitionerBase.hpp.
Referenced by getNeighbors(), and getOffProcData().
bool Sundance::SerialPartitionerBase::ignoreGhosts_ [private] |
Definition at line 115 of file SundanceSerialPartitionerBase.hpp.
Referenced by getOffProcData().
Array<Set<int> > Sundance::SerialPartitionerBase::vertElems_ [mutable, private] |
Definition at line 119 of file SundanceSerialPartitionerBase.hpp.
Referenced by getNeighbors(), getNodeAssignments(), and getOffProcData().