Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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, 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().

{
ASSERTL1(xadj.num_elements() == nVerts+1,"Array xadj out of bounds");
ASSERTL1(perm.num_elements() == nVerts,"Array perm out of bounds");
ASSERTL1(iperm.num_elements() == nVerts,"Array iperm out of bounds");
AS_METIS_NodeND(&nVerts, &xadj[0], &adjncy[0], NULL, NULL, &perm[0],
&iperm[0], &map[0], &mdswitch);
}
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,
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().

{
int *vwgt = 0;
int *vsize = 0;
if (vertWgt.num_elements() > 0)
{
vwgt = &vertWgt[0];
}
if (vertSize.num_elements() > 0)
{
vsize = &vertSize[0];
}
// number of balancing conditions (size of vertex multi-weight)
int ncon = nVertConds;
int options[METIS_NOPTIONS];
METIS_SetDefaultOptions(options);
METIS_PartGraphKway(&nVerts, &ncon, &xadj[0], &adjcy[0], vwgt, vsize,
0, &nparts, 0, 0, options, &volume, &part[0]);
}