source: issm/trunk/externalpackages/scotch/gpart.m@ 3650

Last change on this file since 3650 was 3650, checked in by jschierm, 15 years ago

Scotch: implement gpart functionality and reset more static variables.

File size: 1.7 KB
Line 
1%
2% function to call the gpart module of the scotch partitioner.
3% (note that gpart is just a simplied entry into gmap.)
4%
5% [maptab]=gpart(npart,adj_mat,vlist,vwgt,ewgt,...
6% options)
7%
8% where the required input is:
9% npart (double, number of parts for 'cmplt' architecture)
10% adj_mat (double [sparse nv x nv], vertex adjacency matrix)
11% vlist (double [nv], vertex labels or [])
12% vwgt (double [nv], vertex weights (integers) or [])
13% ewgt (double [sparse nv x nv], edge weights (integers) or [])
14%
15% the required output is:
16% maptab (double [nv x 2], vertex labels and partitions)
17%
18% the optional input is:
19% options (character, options to gpart)
20% " -h : Display this help"
21% " -m<strat> : Set mapping strategy (see user's manual)"
22% " -s<obj> : Force unity weights on <obj>:"
23% " e : edges"
24% " v : vertices"
25% " -V : Print program version and copyright"
26% " -v<verb> : Set verbose mode to <verb>:"
27% " m : mapping information"
28% " s : strategy information"
29% " t : timing information"
30% ""
31% "See default strategy with option '-vs'"
32%
33function [maptab]=gpart(npart,adj_mat,vlist,vwgt,ewgt,...
34 varargin)
35
36if ~nargin
37 help gpart
38 return
39end
40
41% gmap_mex uses static variables, so clear those out before every run
42clear gmap_mex
43
44[maptab]=gmap_mex(npart,adj_mat,vlist,vwgt,ewgt,...
45 varargin{:});
46
47% doesn't hurt to clear out after every run, too
48clear gmap_mex
49
50end
Note: See TracBrowser for help on using the repository browser.