35#ifndef NEKTAR_SPATIALDOMAINS_MESHPARTITION_H
36#define NEKTAR_SPATIALDOMAINS_MESHPARTITION_H
43#include <boost/graph/adjacency_list.hpp>
51typedef std::map<int, std::pair<LibUtilities::ShapeType, std::vector<int>>>
56typedef LibUtilities::NekFactory<std::string, MeshPartition,
70 std::map<int, MeshEntity> element,
75 bool overlapping =
false,
81 std::vector<unsigned int> &tmp);
105 typedef boost::adjacency_list<
107 boost::property<boost::edge_index_t, unsigned int, GraphEdgeProperties>>
110 typedef boost::graph_traits<BoostGraph>::vertex_descriptor
BoostVertex;
111 typedef boost::graph_traits<BoostGraph>::edge_descriptor
BoostEdge;
113 typedef boost::graph_traits<BoostGraph>::vertex_iterator
115 typedef boost::graph_traits<BoostGraph>::adjacency_iterator
136 std::map<int, LibUtilities::ShapeType>
m_shape;
160 int na,
int nb,
int nc);
#define SPATIAL_DOMAINS_EXPORT
Provides a generic Factory class.
boost::graph_traits< BoostGraph >::vertex_iterator BoostVertexIterator
virtual void v_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, Nektar::Array< Nektar::OneD, int > &edgeWgt, int &nparts, int &volume, Nektar::Array< Nektar::OneD, int > &part)=0
void PartitionGraph(int nParts, bool overlapping=false)
Partition the graph.
std::map< int, NummodesPerField > m_expansions
boost::graph_traits< BoostGraph >::vertex_descriptor BoostVertex
boost::graph_traits< BoostGraph >::adjacency_iterator BoostAdjacencyIterator
std::map< int, MultiWeight > m_edgeWeights
CompositeDescriptor m_compMap
std::map< std::string, int > m_fieldNameToId
std::map< int, MeshEntity > m_ghostElmts
LibUtilities::SessionReaderSharedPtr m_session
std::map< int, MultiWeight > m_vertBndWeights
boost::adjacency_list< boost::setS, boost::vecS, boost::undirectedS, GraphVertexProperties, boost::property< boost::edge_index_t, unsigned int, GraphEdgeProperties > > BoostGraph
std::map< int, MultiWeight > m_vertWeights
void PrintPartInfo(std::ostream &out)
void GetElementIDs(const int procid, std::vector< unsigned int > &tmp)
boost::graph_traits< BoostGraph >::edge_descriptor BoostEdge
std::vector< unsigned int > NumModes
std::map< int, std::vector< unsigned int > > m_localPartition
int CalculateElementWeight(LibUtilities::ShapeType elmtType, bool bndWeight, int na, int nb, int nc)
std::vector< unsigned int > MultiWeight
std::map< std::string, NumModes > NummodesPerField
boost::graph_traits< BoostGraph >::edge_iterator BoostEdgeIterator
int CalculateEdgeWeight(LibUtilities::ShapeType elmtType, int na, int nb, int nc)
void PartitionMesh(int nParts, bool shared=false, bool overlapping=false, int nLocal=0)
std::map< int, MeshEntity > m_elements
MeshPartition(const LibUtilities::SessionReaderSharedPtr session, LibUtilities::CommSharedPtr comm, int meshDim, std::map< int, MeshEntity > element, CompositeDescriptor compMap)
LibUtilities::CommSharedPtr m_comm
void CheckPartitions(int nParts, Array< OneD, int > &pPart)
std::map< int, LibUtilities::ShapeType > m_shape
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
std::map< int, std::pair< LibUtilities::ShapeType, std::vector< int > > > CompositeDescriptor
MeshPartitionFactory & GetMeshPartitionFactory()
LibUtilities::NekFactory< std::string, MeshPartition, const LibUtilities::SessionReaderSharedPtr, LibUtilities::CommSharedPtr, int, std::map< int, MeshEntity >, CompositeDescriptor > MeshPartitionFactory
Datatype of the NekFactory used to instantiate classes derived from the EquationSystem class.
std::shared_ptr< MeshPartition > MeshPartitionSharedPtr
std::vector< MeshEdge > edges
std::vector< MeshVertex > vertices
MultiWeight weight
Weightings to this graph vertex.
int partition
Index of the partition to which it belongs.