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_ |
Definition at line 47 of file SundanceSerialPartitionerBase.hpp.
Sundance::SerialPartitionerBase::SerialPartitionerBase | ( | bool | ignoreGhosts = false |
) | [inline] |
Definition at line 51 of file SundanceSerialPartitionerBase.hpp.
virtual Sundance::SerialPartitionerBase::~SerialPartitionerBase | ( | ) | [inline, virtual] |
Definition at line 55 of file SundanceSerialPartitionerBase.hpp.
Set< int > SerialPartitionerBase::arrayToSet | ( | const Array< int > & | a | ) | const |
Definition at line 19 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] |
void SerialPartitionerBase::getElemsPerProc | ( | int | nProc, | |
const Array< int > & | elemAssignments, | |||
Array< int > & | elemsPerProc | |||
) | const |
Definition at line 128 of file SundanceSerialPartitionerBase.cpp.
void SerialPartitionerBase::getNeighbors | ( | const Mesh & | mesh, | |
Array< Array< int > > & | neighbors, | |||
int & | nEdges | |||
) | const |
Definition at line 34 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 106 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 166 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 217 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 29 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 141 of file SundanceSerialPartitionerBase.cpp.
Referenced by makeMeshParts().
Array<Set<int> > Sundance::SerialPartitionerBase::elemEdgewiseNbors_ [mutable, private] |
Definition at line 107 of file SundanceSerialPartitionerBase.hpp.
Referenced by getNeighbors(), and getOffProcData().
Array<Set<int> > Sundance::SerialPartitionerBase::elemVerts_ [mutable, private] |
Definition at line 106 of file SundanceSerialPartitionerBase.hpp.
Referenced by getNeighbors(), and getOffProcData().
bool Sundance::SerialPartitionerBase::ignoreGhosts_ [private] |
Array<Set<int> > Sundance::SerialPartitionerBase::vertElems_ [mutable, private] |
Definition at line 108 of file SundanceSerialPartitionerBase.hpp.
Referenced by getNeighbors(), getNodeAssignments(), and getOffProcData().