Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
Metis Namespace Reference

Functions

void AS_METIS_NodeND (int *nVerts, int *xadj, int *adjncy, int *vwgt, int *options, int *perm, int *iperm, int *map, int *mdswitch)
 
static void as_onmetis (int nVerts, Nektar::Array< Nektar::OneD, int > xadj, Nektar::Array< Nektar::OneD, int > adjncy, Nektar::Array< Nektar::OneD, int > perm, Nektar::Array< Nektar::OneD, int > iperm, Nektar::Array< Nektar::OneD, int > map, int mdswitch=1)
 
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)
 

Function Documentation

void Metis::AS_METIS_NodeND ( int *  nVerts,
int *  xadj,
int *  adjncy,
int *  vwgt,
int *  options,
int *  perm,
int *  iperm,
int *  map,
int *  mdswitch 
)

Referenced by as_onmetis().

static void Metis::as_onmetis ( int  nVerts,
Nektar::Array< Nektar::OneD, int >  xadj,
Nektar::Array< Nektar::OneD, int >  adjncy,
Nektar::Array< Nektar::OneD, int >  perm,
Nektar::Array< Nektar::OneD, int >  iperm,
Nektar::Array< Nektar::OneD, int >  map,
int  mdswitch = 1 
)
inlinestatic

Definition at line 53 of file Metis.hpp.

References AS_METIS_NodeND(), and ASSERTL1.

Referenced by Nektar::MultiRegions::MultiLevelBisectionReordering().

61  {
62  ASSERTL1(xadj.num_elements() == nVerts+1,"Array xadj out of bounds");
63  ASSERTL1(perm.num_elements() == nVerts,"Array perm out of bounds");
64  ASSERTL1(iperm.num_elements() == nVerts,"Array iperm out of bounds");
65 
66  AS_METIS_NodeND(&nVerts, &xadj[0], &adjncy[0], NULL, NULL, &perm[0],
67  &iperm[0], &map[0], &mdswitch);
68  }
void AS_METIS_NodeND(int *nVerts, int *xadj, int *adjncy, int *vwgt, int *options, int *perm, int *iperm, int *map, int *mdswitch)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...
Definition: ErrorUtil.hpp:228
static void Metis::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 
)
inlinestatic

Definition at line 71 of file Metis.hpp.

Referenced by Nektar::LibUtilities::MeshPartitionMetis::PartitionGraphImpl().

82  {
83  int *vwgt = 0;
84  int *vsize = 0;
85  int *adjwgt = 0;
86  if (vertWgt.num_elements() > 0)
87  {
88  vwgt = &vertWgt[0];
89  }
90  if (vertSize.num_elements() > 0)
91  {
92  vsize = &vertSize[0];
93  }
94  if (edgeWgt.num_elements() > 0)
95  {
96  adjwgt = &edgeWgt[0];
97  }
98  // number of balancing conditions (size of vertex multi-weight)
99  int ncon = nVertConds;
100  int options[METIS_NOPTIONS];
101  METIS_SetDefaultOptions(options);
102  METIS_PartGraphKway(&nVerts, &ncon, &xadj[0], &adjcy[0], vwgt, vsize,
103  adjwgt, &nparts, 0, 0, options, &volume, &part[0]);
104  }