You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
55 lines
1.4 KiB
#ifndef MESHPARTITION_METIS5_H
|
|
#define MESHPARTITION_METIS5_H
|
|
|
|
#include "node.h"
|
|
#include "edge.h"
|
|
#include "face.h"
|
|
#include "tetra.h"
|
|
#include <set>
|
|
#include "../dgtd-performance.hpp"
|
|
|
|
#ifndef METIS_INCLUDE
|
|
#define METIS_INCLUDE
|
|
extern "C"
|
|
{
|
|
#include "metis5.h"
|
|
}
|
|
#endif
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
/// \class MeshPartition_METIS5
|
|
/// \brief Perform mesh partition using METIS5
|
|
/// \note
|
|
/// -
|
|
/// \version
|
|
/// - Zhao Bo, 06/Mar/2011, created
|
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
class MeshPartition_METIS5{
|
|
private:
|
|
int m_numCuts;
|
|
int m_numNodes;
|
|
int m_numTets;
|
|
|
|
tetra * m_tetList;
|
|
node * m_nodeList;
|
|
|
|
int * m_elemNodeIDs;
|
|
int * m_elemNodeWeights;
|
|
int * m_elemPtr;
|
|
int * m_elemPtrCutted;
|
|
int * m_elemNodeIDsCutted;
|
|
|
|
public:
|
|
MeshPartition_METIS5();
|
|
~MeshPartition_METIS5();
|
|
|
|
void PerformSetup(int numNodes, int numTets, node * nodeList, tetra * tetList, int numCuts);
|
|
void PerformSetup(int numNodes, int numTets, int numCuts);
|
|
void PerformCut(std::vector < fp_t > & tetWeightList);
|
|
void PerformCut();
|
|
void PerformCut(int*);
|
|
int* PartionGraphForGrouping(vector<int> &, vector<int> &);
|
|
int* GetPartition(){return m_elemPtrCutted;}
|
|
};
|
|
#endif
|
|
|
|
|