Nektar++
|
#include <MeshPartition.h>
Classes | |
struct | GraphEdgeProperties |
struct | GraphVertexProperties |
struct | MeshComposite |
struct | MeshCurved |
struct | MeshEdge |
struct | MeshElement |
struct | MeshEntity |
struct | MeshFace |
struct | MeshVertex |
Public Member Functions | |
MeshPartition (const SessionReaderSharedPtr &pSession) | |
virtual | ~MeshPartition () |
void | PartitionMesh (int nParts, bool shared=false) |
void | WriteLocalPartition (SessionReaderSharedPtr &pSession) |
void | WriteAllPartitions (SessionReaderSharedPtr &pSession) |
void | PrintPartInfo (std::ostream &out) |
void | GetCompositeOrdering (CompositeOrdering &composites) |
void | GetBndRegionOrdering (BndRegionOrdering &composites) |
void | GetElementIDs (const int procid, std::vector< unsigned int > &tmp) |
Private Types | |
typedef std::pair< std::string, int > | MeshCurvedKey |
typedef std::vector< unsigned int > | MultiWeight |
typedef boost::adjacency_list< boost::setS, boost::vecS, boost::undirectedS, GraphVertexProperties, boost::property< boost::edge_index_t, unsigned int, GraphEdgeProperties > > | BoostGraph |
typedef boost::subgraph< BoostGraph > | BoostSubGraph |
typedef boost::graph_traits< BoostGraph >::vertex_descriptor | BoostVertex |
typedef boost::graph_traits< BoostGraph >::edge_descriptor | BoostEdge |
typedef boost::graph_traits< BoostGraph >::edge_iterator | BoostEdgeIterator |
typedef boost::graph_traits< BoostGraph >::vertex_iterator | BoostVertexIterator |
typedef boost::graph_traits< BoostGraph >::adjacency_iterator | BoostAdjacencyIterator |
typedef std::vector< unsigned int > | NumModes |
typedef std::map< std::string, NumModes > | NummodesPerField |
Private Member Functions | |
void | ReadExpansions (const SessionReaderSharedPtr &pSession) |
void | ReadGeometry (const SessionReaderSharedPtr &pSession) |
void | ReadConditions (const SessionReaderSharedPtr &pSession) |
void | WeightElements () |
void | CreateGraph (BoostSubGraph &pGraph) |
void | PartitionGraph (BoostSubGraph &pGraph, int nParts, std::vector< BoostSubGraph > &pLocalPartition) |
virtual void | PartitionGraphImpl (int &nVerts, int &nVertConds, Nektar::Array< Nektar::OneD, int > &xadj, Nektar::Array< Nektar::OneD, int > &adjcy, Nektar::Array< Nektar::OneD, int > &vertWgt, Nektar::Array< Nektar::OneD, int > &vertSize, int &nparts, int &volume, Nektar::Array< Nektar::OneD, int > &part)=0 |
void | OutputPartition (SessionReaderSharedPtr &pSession, BoostSubGraph &pGraph, TiXmlElement *pGeometry) |
void | CheckPartitions (int nParts, Array< OneD, int > &pPart) |
int | CalculateElementWeight (char elmtType, bool bndWeight, int na, int nb, int nc) |
Private Attributes | |
int | m_dim |
int | m_numFields |
std::map< int, MeshVertex > | m_meshVertices |
std::map< int, MeshEntity > | m_meshEdges |
std::map< int, MeshEntity > | m_meshFaces |
std::map< int, MeshEntity > | m_meshElements |
std::map< MeshCurvedKey, MeshCurved > | m_meshCurved |
std::map< int, MeshEntity > | m_meshComposites |
std::vector< unsigned int > | m_domain |
std::map< std::string, std::string > | m_vertexAttributes |
std::map< int, NummodesPerField > | m_expansions |
std::map< std::string, int > | m_fieldNameToId |
std::map< int, MultiWeight > | m_vertWeights |
BndRegionOrdering | m_bndRegOrder |
BoostSubGraph | m_mesh |
std::vector< BoostSubGraph > | m_localPartition |
CommSharedPtr | m_comm |
bool | m_weightingRequired |
bool | m_shared |
Definition at line 61 of file MeshPartition.h.
|
private |
Definition at line 185 of file MeshPartition.h.
|
private |
Definition at line 176 of file MeshPartition.h.
|
private |
Definition at line 179 of file MeshPartition.h.
|
private |
Definition at line 166 of file MeshPartition.h.
|
private |
Definition at line 169 of file MeshPartition.h.
|
private |
Definition at line 173 of file MeshPartition.h.
|
private |
Definition at line 182 of file MeshPartition.h.
|
private |
Definition at line 128 of file MeshPartition.h.
|
private |
Definition at line 137 of file MeshPartition.h.
|
private |
Definition at line 187 of file MeshPartition.h.
|
private |
Definition at line 188 of file MeshPartition.h.
Nektar::LibUtilities::MeshPartition::MeshPartition | ( | const SessionReaderSharedPtr & | pSession | ) |
Definition at line 74 of file MeshPartition.cpp.
References ReadConditions(), ReadExpansions(), and ReadGeometry().
|
virtual |
Definition at line 85 of file MeshPartition.cpp.
|
private |
Definition at line 1264 of file MeshPartition.cpp.
References Nektar::LibUtilities::StdSegData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdTriData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdQuadData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdHexData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdTetData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdPyrData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdPrismData::getNumberOfBndCoefficients(), Nektar::LibUtilities::StdSegData::getNumberOfCoefficients(), Nektar::LibUtilities::StdTriData::getNumberOfCoefficients(), Nektar::LibUtilities::StdQuadData::getNumberOfCoefficients(), Nektar::LibUtilities::StdHexData::getNumberOfCoefficients(), Nektar::LibUtilities::StdTetData::getNumberOfCoefficients(), Nektar::LibUtilities::StdPyrData::getNumberOfCoefficients(), and Nektar::LibUtilities::StdPrismData::getNumberOfCoefficients().
Referenced by PrintPartInfo(), and WeightElements().
|
private |
|
private |
Definition at line 657 of file MeshPartition.cpp.
References Nektar::iterator, m_meshElements, m_vertWeights, and m_weightingRequired.
Referenced by PartitionMesh().
void Nektar::LibUtilities::MeshPartition::GetBndRegionOrdering | ( | BndRegionOrdering & | composites | ) |
Definition at line 177 of file MeshPartition.cpp.
References m_bndRegOrder.
void Nektar::LibUtilities::MeshPartition::GetCompositeOrdering | ( | CompositeOrdering & | composites | ) |
Definition at line 167 of file MeshPartition.cpp.
References Nektar::iterator, and m_meshComposites.
void Nektar::LibUtilities::MeshPartition::GetElementIDs | ( | const int | procid, |
std::vector< unsigned int > & | tmp | ||
) |
Definition at line 1249 of file MeshPartition.cpp.
References ASSERTL0, m_localPartition, and m_meshElements.
|
private |
Definition at line 846 of file MeshPartition.cpp.
References Nektar::LibUtilities::MeshPartition::MeshCurved::data, Nektar::LibUtilities::MeshPartition::MeshCurved::entityid, Nektar::LibUtilities::MeshPartition::MeshCurved::entitytype, Nektar::ParseUtils::GenerateSeqVector(), Nektar::LibUtilities::MeshPartition::MeshCurved::id, Nektar::iterator, m_bndRegOrder, m_dim, m_domain, m_meshComposites, m_meshCurved, m_meshEdges, m_meshElements, m_meshFaces, m_meshVertices, m_vertexAttributes, Nektar::LibUtilities::MeshPartition::MeshCurved::npoints, and Nektar::LibUtilities::MeshPartition::MeshCurved::type.
Referenced by WriteAllPartitions(), and WriteLocalPartition().
|
private |
Definition at line 697 of file MeshPartition.cpp.
References CheckPartitions(), ErrorUtil::efatal, m_comm, m_shared, m_weightingRequired, NEKERROR, and PartitionGraphImpl().
Referenced by PartitionMesh().
|
privatepure virtual |
Implemented in Nektar::LibUtilities::MeshPartitionScotch, and Nektar::LibUtilities::MeshPartitionMetis.
Referenced by PartitionGraph().
void Nektar::LibUtilities::MeshPartition::PartitionMesh | ( | int | nParts, |
bool | shared = false |
||
) |
Definition at line 90 of file MeshPartition.cpp.
References ASSERTL0, CreateGraph(), m_localPartition, m_mesh, m_meshElements, m_shared, m_weightingRequired, PartitionGraph(), and WeightElements().
void Nektar::LibUtilities::MeshPartition::PrintPartInfo | ( | std::ostream & | out | ) |
Definition at line 470 of file MeshPartition.cpp.
References ASSERTL0, CalculateElementWeight(), Nektar::iterator, m_dim, m_domain, m_expansions, m_localPartition, m_mesh, and m_meshComposites.
|
private |
Definition at line 540 of file MeshPartition.cpp.
References ASSERTL0, and m_weightingRequired.
Referenced by MeshPartition().
|
private |
Expansiontypes will contain plenty of data, where relevant at this stage are composite ID(s) that this expansion type describes, nummodes and a list of fields that this expansion relates to. If this does not exist the variable is only set to "DefaultVar".
Definition at line 183 of file MeshPartition.cpp.
References ASSERTL0, Nektar::ParseUtils::GenerateOrderedStringVector(), Nektar::ParseUtils::GenerateOrderedVector(), Nektar::ParseUtils::GenerateSeqVector(), m_dim, m_expansions, m_fieldNameToId, and m_numFields.
Referenced by MeshPartition().
|
private |
Definition at line 286 of file MeshPartition.cpp.
References ASSERTL0, Nektar::LibUtilities::MeshPartition::MeshCurved::data, Nektar::LibUtilities::MeshPartition::MeshCurved::entityid, Nektar::LibUtilities::MeshPartition::MeshCurved::entitytype, Nektar::ParseUtils::GenerateSeqVector(), Nektar::LibUtilities::MeshPartition::MeshEntity::id, Nektar::LibUtilities::MeshPartition::MeshVertex::id, Nektar::LibUtilities::MeshPartition::MeshCurved::id, Nektar::LibUtilities::MeshPartition::MeshEntity::list, m_dim, m_domain, m_meshComposites, m_meshCurved, m_meshEdges, m_meshElements, m_meshFaces, m_meshVertices, m_vertexAttributes, Nektar::LibUtilities::MeshPartition::MeshCurved::npoints, Nektar::LibUtilities::MeshPartition::MeshEntity::type, Nektar::LibUtilities::MeshPartition::MeshCurved::type, Nektar::LibUtilities::MeshPartition::MeshVertex::x, Nektar::LibUtilities::MeshPartition::MeshVertex::y, and Nektar::LibUtilities::MeshPartition::MeshVertex::z.
Referenced by MeshPartition().
|
private |
Definition at line 609 of file MeshPartition.cpp.
References ASSERTL0, CalculateElementWeight(), Nektar::iterator, m_dim, m_domain, m_expansions, m_fieldNameToId, m_meshComposites, m_meshElements, m_numFields, and m_vertWeights.
Referenced by PartitionMesh().
void Nektar::LibUtilities::MeshPartition::WriteAllPartitions | ( | LibUtilities::SessionReaderSharedPtr & | pSession | ) |
Definition at line 134 of file MeshPartition.cpp.
References m_localPartition, OutputPartition(), and Nektar::LibUtilities::PortablePath().
void Nektar::LibUtilities::MeshPartition::WriteLocalPartition | ( | LibUtilities::SessionReaderSharedPtr & | pSession | ) |
Definition at line 104 of file MeshPartition.cpp.
References m_comm, m_localPartition, OutputPartition(), and Nektar::LibUtilities::PortablePath().
|
private |
Definition at line 209 of file MeshPartition.h.
Referenced by GetBndRegionOrdering(), and OutputPartition().
|
private |
Definition at line 214 of file MeshPartition.h.
Referenced by PartitionGraph(), and WriteLocalPartition().
|
private |
Definition at line 190 of file MeshPartition.h.
Referenced by OutputPartition(), PrintPartInfo(), ReadExpansions(), ReadGeometry(), and WeightElements().
|
private |
Definition at line 199 of file MeshPartition.h.
Referenced by OutputPartition(), PrintPartInfo(), ReadGeometry(), and WeightElements().
|
private |
Definition at line 204 of file MeshPartition.h.
Referenced by PrintPartInfo(), ReadExpansions(), and WeightElements().
|
private |
Definition at line 206 of file MeshPartition.h.
Referenced by ReadExpansions(), and WeightElements().
|
private |
Definition at line 212 of file MeshPartition.h.
Referenced by GetElementIDs(), PartitionMesh(), PrintPartInfo(), WriteAllPartitions(), and WriteLocalPartition().
|
private |
Definition at line 211 of file MeshPartition.h.
Referenced by PartitionMesh(), and PrintPartInfo().
|
private |
Definition at line 198 of file MeshPartition.h.
Referenced by GetCompositeOrdering(), OutputPartition(), PrintPartInfo(), ReadGeometry(), and WeightElements().
|
private |
Definition at line 197 of file MeshPartition.h.
Referenced by OutputPartition(), and ReadGeometry().
|
private |
Definition at line 194 of file MeshPartition.h.
Referenced by OutputPartition(), and ReadGeometry().
|
private |
Definition at line 196 of file MeshPartition.h.
Referenced by CreateGraph(), GetElementIDs(), OutputPartition(), PartitionMesh(), ReadGeometry(), and WeightElements().
|
private |
Definition at line 195 of file MeshPartition.h.
Referenced by OutputPartition(), and ReadGeometry().
|
private |
Definition at line 193 of file MeshPartition.h.
Referenced by OutputPartition(), and ReadGeometry().
|
private |
Definition at line 191 of file MeshPartition.h.
Referenced by ReadExpansions(), and WeightElements().
|
private |
Definition at line 217 of file MeshPartition.h.
Referenced by PartitionGraph(), and PartitionMesh().
|
private |
Definition at line 200 of file MeshPartition.h.
Referenced by OutputPartition(), and ReadGeometry().
|
private |
Definition at line 207 of file MeshPartition.h.
Referenced by CreateGraph(), and WeightElements().
|
private |
Definition at line 216 of file MeshPartition.h.
Referenced by CreateGraph(), PartitionGraph(), PartitionMesh(), and ReadConditions().