Functions

parma.h File Reference

#include "apf.h"
#include "apfMesh.h"
#include "apfPartition.h"

Go to the source code of this file.

Functions

int Parma_Run (apf::Mesh *mesh, apf::MeshTag *weight, const double maxImb)
 run partition improvement and heavy part splitting
int Parma_RunPtnImprovement (apf::Mesh *mesh, int(*priority)[4], const double maxImb=1.05, const int verbosity=0, const int maxItr=20)
 run multi criteria partition improvement
int Parma_RunGhostPtnImprovement (apf::Mesh *mesh, apf::MeshTag *weight, const double maxImb, const int numlayers, const int bridgeDim, const int verbosity=0)
 run ghost partition improvement
int Parma_RunWeightedPtnImprovement (apf::Mesh *mesh, apf::MeshTag *weight, int(*priority)[4], const double maxImb=1.05, const int dbgLvl=0, const int maxItr=20)
 see Parma_RunPtnImprovement(apf::Mesh ... )
int Parma_RunSelp (apf::Mesh *mesh, apf::MeshTag *weight, const int factor, const int verbosity=0)
 run selp to create a partition with kN parts where k is the partition factor, and N is the number of parts in the input mesh
void Parma_GetEntImbalance (apf::Mesh *mesh, double(*entImb)[4])
 get entity imbalance
void Parma_GetWeightedEntImbalance (apf::Mesh *mesh, apf::MeshTag *weight, double(*entImb)[4])
 see Parma_GetEntImbalance(...)
void Parma_GetNeighborStats (apf::Mesh *m, int &max, double &avg, int &loc)
 get the maximum and average number of vtx-connected neighboring parts
long Parma_GetNumBdryVtx (apf::Mesh *m)
 get the number of vertices on inter-part boundaries
void Parma_GetDisconnectedStats (apf::Mesh *m, int &max, double &avg, int &loc)
 get the maximum, average and local number of face-disconnected components
void Parma_PrintPtnStats (apf::Mesh *m, std::string key)
 prints partition stats
void Parma_ProcessDisconnectedParts (apf::Mesh *m)
 re-connect disconnected parts
apf::Balancer * Parma_MakeCentroidDiffuser (apf::Mesh *m, double stepFactor=0.1)
 create an APF Balancer using centroid diffusion
apf::Balancer * Parma_MakeGhostDiffuser (apf::Mesh *m, int layers, int bridge, double stepFactor=0.1, int verbosity=0)
 create an APF Balancer using ghost element aware diffusion
apf::Balancer * Parma_MakeHpsBalancer (apf::Mesh *m, int verbosity=0)
 create an APF Balancer using heavy part splitting
apf::Splitter * Parma_MakeRibSplitter (apf::Mesh *m, bool sync=true)
 create an APF Splitter using recursive inertial bisection
apf::MeshTag * Parma_WeighByMemory (apf::Mesh *m)
 create a mesh tag that weighs elements by their memory consumption

Function Documentation

void Parma_GetDisconnectedStats ( apf::Mesh *  m,
int &  max,
double &  avg,
int &  loc 
)

get the maximum, average and local number of face-disconnected components

Parameters:
mesh (In) partitioned mesh
max (InOut) max disconnected
avg (InOut) average disconnected
isMax (InOut) local disconnected
void Parma_GetEntImbalance ( apf::Mesh *  mesh,
double(*)  entImb[4] 
)

get entity imbalance

Parameters:
mesh (InOut) partitioned mesh
entImb (InOut) entity imbalance [vtx, edge, face, rgn]
void Parma_GetNeighborStats ( apf::Mesh *  m,
int &  max,
double &  avg,
int &  loc 
)

get the maximum and average number of vtx-connected neighboring parts

Remarks:
for each part count the number of parts it shares mesh vertices with
Parameters:
mesh (In) partitioned mesh
max (InOut) max neighbors
avg (InOut) average neighbors
loc (InOut) local neighbors count
long Parma_GetNumBdryVtx ( apf::Mesh *  m  ) 

get the number of vertices on inter-part boundaries

Parameters:
mesh (In) partitioned mesh
Returns:
number of vertices
void Parma_GetWeightedEntImbalance ( apf::Mesh *  mesh,
apf::MeshTag *  weight,
double(*)  entImb[4] 
)

see Parma_GetEntImbalance(...)

Parameters:
mesh (InOut) partitioned mesh
weight (In) element weight used for computing imbalance
entImb (InOut) entity imbalance [vtx, edge, face, rgn]
apf::Balancer* Parma_MakeCentroidDiffuser ( apf::Mesh *  m,
double  stepFactor = 0.1 
)

create an APF Balancer using centroid diffusion

Parameters:
mesh (In) partitioned mesh
stepFactor (In) amount of weight to migrate between parts during diffusion, lower values migrate fewer elements per iteration
Returns:
apf balancer instance
apf::Balancer* Parma_MakeGhostDiffuser ( apf::Mesh *  m,
int  layers,
int  bridge,
double  stepFactor = 0.1,
int  verbosity = 0 
)

create an APF Balancer using ghost element aware diffusion

Parameters:
mesh (In) partitioned mesh
layers (In) depth of ghosting
bridge (In) dimension of entity ghosting depth is based on, typically meshDim-1
stepFactor (In) amount of weight to migrate between parts during diffusion, lower values migrate fewer elements per iteration
verbosity (In) output control, higher values output more
Returns:
apf balancer instance
apf::Balancer* Parma_MakeHpsBalancer ( apf::Mesh *  m,
int  verbosity = 0 
)

create an APF Balancer using heavy part splitting

Parameters:
mesh (In) partitioned mesh
verbosity (In) output control, higher values output more
Returns:
apf balancer instance
apf::Splitter* Parma_MakeRibSplitter ( apf::Mesh *  m,
bool  sync = true 
)

create an APF Splitter using recursive inertial bisection

Parameters:
mesh (In) partitioned mesh
sync (In) true if all parts will be split, false o.w.
Returns:
apf splitter instance
void Parma_PrintPtnStats ( apf::Mesh *  m,
std::string  key 
)

prints partition stats

Remarks:
includes face-disconnected components, number of vertices on inter-part boundaries, number of vtx-connected neighboring parts, entity imbalance, and number of empty parts
Parameters:
mesh (In) partitioned mesh
key (In) identifying string to write with stat output
void Parma_ProcessDisconnectedParts ( apf::Mesh *  m  ) 

re-connect disconnected parts

Parameters:
mesh (In) partitioned mesh
int Parma_Run ( apf::Mesh *  mesh,
apf::MeshTag *  weight,
const double  maxImb 
)

run partition improvement and heavy part splitting

Parameters:
mesh (InOut) partitioned mesh
weight (In) element weight used for computing imbalance
maxImb (In) maximum imbalance tolerance
int Parma_RunGhostPtnImprovement ( apf::Mesh *  mesh,
apf::MeshTag *  weight,
const double  maxImb,
const int  numlayers,
const int  bridgeDim,
const int  verbosity = 0 
)

run ghost partition improvement

Parameters:
mesh (InOut) partitioned mesh
weight (In) element weight used for computing imbalance
maxImb (In) maximum imbalance tolerance
numlayers (In) number of ghost layers
bridgeDim (In) dimension of bridge entity
verbosity (In) 0: minimal output, >0 increasing amounts runtime information
Returns:
zero on success, non-zero otherwise
int Parma_RunPtnImprovement ( apf::Mesh *  mesh,
int(*)  priority[4],
const double  maxImb = 1.05,
const int  verbosity = 0,
const int  maxItr = 20 
)

run multi criteria partition improvement

Remarks:
see http://redmine.scorec.rpi.edu/projects/parma/wiki for more info
Parameters:
mesh (InOut) partitioned mesh
priority (In) entity improvement priority [vtx, edge, face, rgn] larger values (>0) have higher priority
maxImb (In) maximum imbalance tolerance
verbosity (In) 0: minimal output, >0 increasing amounts runtime information
maxItr (In) maximum diffusion iterations per entity type
Returns:
zero on success, non-zero otherwise
int Parma_RunSelp ( apf::Mesh *  mesh,
apf::MeshTag *  weight,
const int  factor,
const int  verbosity = 0 
)

run selp to create a partition with kN parts where k is the partition factor, and N is the number of parts in the input mesh

Parameters:
mesh (InOut) partitioned mesh with N parts
weight (In) element weight used for computing imbalance
factor (In) partition factor > 1
verbosity (In) 0: minimal output, >0 increasing amounts
Returns:
zero on success, non-zero otherwise
int Parma_RunWeightedPtnImprovement ( apf::Mesh *  mesh,
apf::MeshTag *  weight,
int(*)  priority[4],
const double  maxImb = 1.05,
const int  dbgLvl = 0,
const int  maxItr = 20 
)

see Parma_RunPtnImprovement(apf::Mesh ... )

Parameters:
weight (In) element weight used for computing imbalance
apf::MeshTag* Parma_WeighByMemory ( apf::Mesh *  m  ) 

create a mesh tag that weighs elements by their memory consumption

Parameters:
mesh (In) partitioned mesh
Returns:
mesh tag
 All Files Functions