Nektar++
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
Nektar::SpatialDomains::MeshPartitionMetis Class Reference

#include <MeshPartitionMetis.h>

Inheritance diagram for Nektar::SpatialDomains::MeshPartitionMetis:
[legend]

Public Member Functions

 MeshPartitionMetis (const LibUtilities::SessionReaderSharedPtr session, int meshDim, std::map< int, MeshEntity > element, CompositeDescriptor compMap)
 
virtual ~MeshPartitionMetis ()
 
- Public Member Functions inherited from Nektar::SpatialDomains::MeshPartition
 MeshPartition (const LibUtilities::SessionReaderSharedPtr session, int meshDim, std::map< int, MeshEntity > element, CompositeDescriptor compMap)
 
virtual ~MeshPartition ()
 
void PartitionMesh (int nParts, bool shared=false, bool overlapping=false, int nLocal=0)
 
void PrintPartInfo (std::ostream &out)
 
void GetElementIDs (const int procid, std::vector< unsigned int > &tmp)
 

Static Public Member Functions

static MeshPartitionSharedPtr create (const LibUtilities::SessionReaderSharedPtr session, int meshDim, std::map< int, MeshEntity > element, CompositeDescriptor compMap)
 Creates an instance of this class. More...
 

Static Public Attributes

static std::string className
 Name of class. More...
 
static std::string cmdSwitch
 

Private Member Functions

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, Nektar::Array< Nektar::OneD, int > &edgeWgt, int &nparts, int &volume, Nektar::Array< Nektar::OneD, int > &part)
 

Additional Inherited Members

- Protected Types inherited from Nektar::SpatialDomains::MeshPartition
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::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, NumModesNummodesPerField
 
- Protected Member Functions inherited from Nektar::SpatialDomains::MeshPartition
void ReadExpansions ()
 
void ReadConditions ()
 
void WeightElements ()
 
void CreateGraph ()
 
void PartitionGraph (int nParts, bool overlapping=false)
 Partition the graph. More...
 
void CheckPartitions (int nParts, Array< OneD, int > &pPart)
 
int CalculateElementWeight (LibUtilities::ShapeType elmtType, bool bndWeight, int na, int nb, int nc)
 
int CalculateEdgeWeight (LibUtilities::ShapeType elmtType, int na, int nb, int nc)
 
- Protected Attributes inherited from Nektar::SpatialDomains::MeshPartition
LibUtilities::SessionReaderSharedPtr m_session
 
int m_dim
 
int m_numFields
 
std::map< int, MeshEntitym_elements
 
std::map< int, MeshEntitym_ghostElmts
 
CompositeDescriptor m_compMap
 
std::map< int, NummodesPerFieldm_expansions
 
std::map< int, LibUtilities::ShapeTypem_shape
 
std::map< std::string, int > m_fieldNameToId
 
std::map< int, MultiWeightm_vertWeights
 
std::map< int, MultiWeightm_vertBndWeights
 
std::map< int, MultiWeightm_edgeWeights
 
BoostGraph m_graph
 
std::vector< std::vector< unsigned int > > m_localPartition
 
LibUtilities::CommSharedPtr m_comm
 
bool m_weightingRequired
 
bool m_weightBnd
 
bool m_weightDofs
 
bool m_shared
 
bool m_parallel
 

Detailed Description

Definition at line 46 of file MeshPartitionMetis.h.

Constructor & Destructor Documentation

◆ MeshPartitionMetis()

Nektar::SpatialDomains::MeshPartitionMetis::MeshPartitionMetis ( const LibUtilities::SessionReaderSharedPtr  session,
int  meshDim,
std::map< int, MeshEntity element,
CompositeDescriptor  compMap 
)

Definition at line 52 of file MeshPartitionMetis.cpp.

57  : MeshPartition(session, meshDim, element, compMap)
58 {
59 }
MeshPartition(const LibUtilities::SessionReaderSharedPtr session, int meshDim, std::map< int, MeshEntity > element, CompositeDescriptor compMap)

◆ ~MeshPartitionMetis()

Nektar::SpatialDomains::MeshPartitionMetis::~MeshPartitionMetis ( )
virtual

Definition at line 61 of file MeshPartitionMetis.cpp.

62 {
63 }

Member Function Documentation

◆ create()

static MeshPartitionSharedPtr Nektar::SpatialDomains::MeshPartitionMetis::create ( const LibUtilities::SessionReaderSharedPtr  session,
int  meshDim,
std::map< int, MeshEntity element,
CompositeDescriptor  compMap 
)
inlinestatic

Creates an instance of this class.

Definition at line 50 of file MeshPartitionMetis.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

55  {
57  session, meshDim, element, compMap);
58  }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ PartitionGraphImpl()

void Nektar::SpatialDomains::MeshPartitionMetis::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 
)
privatevirtual

Implements Nektar::SpatialDomains::MeshPartition.

Definition at line 65 of file MeshPartitionMetis.cpp.

References Metis::PartGraphVKway().

72 {
73  Metis::PartGraphVKway(nVerts, nVertConds, xadj, adjcy, vertWgt, vertSize,
74  edgeWgt, nparts, volume, part);
75 }
static void PartGraphVKway(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)
Definition: Metis.hpp:45

Member Data Documentation

◆ className

std::string Nektar::SpatialDomains::MeshPartitionMetis::className
static
Initial value:
=
"Partitioning using the METIS library.")

Name of class.

Definition at line 61 of file MeshPartitionMetis.h.

◆ cmdSwitch

std::string Nektar::SpatialDomains::MeshPartitionMetis::cmdSwitch
static
Initial value:
=
"use-metis", "", "Use METIS for mesh partitioning.")

Definition at line 62 of file MeshPartitionMetis.h.