File: petscpartitioner.h.html

package info (click to toggle)
petsc 3.24.1%2Bdfsg1-1exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 524,004 kB
  • sloc: ansic: 762,842; cpp: 52,564; python: 39,546; f90: 17,688; javascript: 3,493; makefile: 3,206; sh: 1,508; xml: 619; objc: 445; java: 13; csh: 1
file content (96 lines) | stat: -rw-r--r-- 15,274 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<center><a href="https://gitlab.com/petsc/petsc/-/blob/b522cb8c110832b61be366220eb7433134308289/include/petscpartitioner.h">Actual source code: petscpartitioner.h</a></center><br>

<html>
<head>
<title></title>
<meta name="generator" content="c2html 0.9.6">
<meta name="date" content="2025-10-29T18:33:44+00:00">
</head>

<body bgcolor="#FFFFFF">
<pre width=80>
<a name="line1">  1: </a><font color="#A020F0">#pragma once</font>

<a name="line3">  3: </a>#include <A href="../include/petscsection.h.html">&lt;petscsection.h&gt;</A>

<a name="line5">  5: </a><font color="#B22222">/* MANSEC = <a href="../manualpages/Mat/Mat.html">Mat</a> */</font>
<a name="line6">  6: </a><font color="#B22222">/* SUBMANSEC = MatGraphOperations */</font>

<a name="line8">  8: </a><font color="#B22222">/*S</font>
<a name="line9">  9: </a><font color="#B22222">  <a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a> - PETSc object that manages a graph partitioner</font>

<a name="line11"> 11: </a><font color="#B22222">  Level: intermediate</font>

<a name="line13"> 13: </a><font color="#B22222">  Note:</font>
<a name="line14"> 14: </a><font color="#B22222">  Also consider `<a href="../manualpages/Mat/MatPartitioning.html">MatPartitioning</a>` which provides an alternative API for partitioning.</font>

<a name="line16"> 16: </a><font color="#B22222">.seealso: `<a href="../manualpages/MatGraphOperations/PetscPartitionerCreate.html">PetscPartitionerCreate</a>()`, `<a href="../manualpages/MatGraphOperations/PetscPartitionerSetType.html">PetscPartitionerSetType</a>()`, `<a href="../manualpages/MatGraphOperations/PetscPartitionerType.html">PetscPartitionerType</a>`, `<a href="../manualpages/Mat/MatPartitioning.html">MatPartitioning</a>`, `<a href="../manualpages/MatGraphOperations/MatPartitioningCreate.html">MatPartitioningCreate</a>()`</font>
<a name="line17"> 17: </a><font color="#B22222">S*/</font>
<a name="line18"> 18: </a><font color="#4169E1">typedef struct _p_PetscPartitioner *<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>;</font>

<a name="line20"> 20: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscClassId.html">PetscClassId</a>   PETSCPARTITIONER_CLASSID;
<a name="line21"> 21: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerInitializePackage.html">PetscPartitionerInitializePackage</a>(void)</font></strong>;
<a name="line22"> 22: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerFinalizePackage.html">PetscPartitionerFinalizePackage</a>(void)</font></strong>;

<a name="line24"> 24: </a><font color="#B22222">/*J</font>
<a name="line25"> 25: </a><font color="#B22222">  <a href="../manualpages/MatGraphOperations/PetscPartitionerType.html">PetscPartitionerType</a> - String with the name of a PETSc graph partitioner</font>

<a name="line27"> 27: </a><font color="#B22222">  Level: beginner</font>

<a name="line29"> 29: </a><font color="#B22222">.seealso: `<a href="../manualpages/MatGraphOperations/PetscPartitionerSetType.html">PetscPartitionerSetType</a>()`, `<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>`</font>
<a name="line30"> 30: </a><font color="#B22222">J*/</font>
<a name="line31"> 31: </a><font color="#4169E1">typedef const char *<a href="../manualpages/MatGraphOperations/PetscPartitionerType.html">PetscPartitionerType</a>;</font>
<a name="line32"> 32: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERPARMETIS.html">PETSCPARTITIONERPARMETIS</a>   </font><font color="#666666">"parmetis"</font><font color="#228B22"></font></strong>
<a name="line33"> 33: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERPTSCOTCH.html">PETSCPARTITIONERPTSCOTCH</a>   </font><font color="#666666">"ptscotch"</font><font color="#228B22"></font></strong>
<a name="line34"> 34: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERCHACO.html">PETSCPARTITIONERCHACO</a>      </font><font color="#666666">"chaco"</font><font color="#228B22"></font></strong>
<a name="line35"> 35: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERSIMPLE.html">PETSCPARTITIONERSIMPLE</a>     </font><font color="#666666">"simple"</font><font color="#228B22"></font></strong>
<a name="line36"> 36: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERSHELL.html">PETSCPARTITIONERSHELL</a>      </font><font color="#666666">"shell"</font><font color="#228B22"></font></strong>
<a name="line37"> 37: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERGATHER.html">PETSCPARTITIONERGATHER</a>     </font><font color="#666666">"gather"</font><font color="#228B22"></font></strong>
<a name="line38"> 38: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERMULTISTAGE.html">PETSCPARTITIONERMULTISTAGE</a> </font><font color="#666666">"multistage"</font><font color="#228B22"></font></strong>

<a name="line40"> 40: </a>PETSC_EXTERN <a href="../manualpages/Sys/PetscFunctionList.html">PetscFunctionList</a> PetscPartitionerList;
<a name="line41"> 41: </a><strong><font color="#4169E1"><a name="PetscPartitionerRegister"></a>PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a>    <a href="../manualpages/MatGraphOperations/PetscPartitionerRegister.html">PetscPartitionerRegister</a>(const char[], <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> (*)(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>)</font></strong>);

<a name="line43"> 43: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerCreate.html">PetscPartitionerCreate</a>(<a href="../manualpages/Sys/MPI_Comm.html">MPI_Comm</a>, <a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a> *)</font></strong>;
<a name="line44"> 44: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerDestroy.html">PetscPartitionerDestroy</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a> *)</font></strong>;
<a name="line45"> 45: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerSetType.html">PetscPartitionerSetType</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/MatGraphOperations/PetscPartitionerType.html">PetscPartitionerType</a>)</font></strong>;
<a name="line46"> 46: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerGetType.html">PetscPartitionerGetType</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/MatGraphOperations/PetscPartitionerType.html">PetscPartitionerType</a> *)</font></strong>;
<a name="line47"> 47: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerSetUp.html">PetscPartitionerSetUp</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>)</font></strong>;
<a name="line48"> 48: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerReset.html">PetscPartitionerReset</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>)</font></strong>;
<a name="line49"> 49: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerSetFromOptions.html">PetscPartitionerSetFromOptions</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>)</font></strong>;
<a name="line50"> 50: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerViewFromOptions.html">PetscPartitionerViewFromOptions</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Sys/PetscObject.html">PetscObject</a>, const char[])</font></strong>;
<a name="line51"> 51: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerView.html">PetscPartitionerView</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Viewer/PetscViewer.html">PetscViewer</a>)</font></strong>;
<a name="line52"> 52: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerPartition.html">PetscPartitionerPartition</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>[], <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>[], <a href="../manualpages/PetscSection/PetscSection.html">PetscSection</a>, <a href="../manualpages/PetscSection/PetscSection.html">PetscSection</a>, <a href="../manualpages/PetscSection/PetscSection.html">PetscSection</a>, <a href="../manualpages/PetscSection/PetscSection.html">PetscSection</a>, <a href="../manualpages/IS/IS.html">IS</a> *)</font></strong>;

<a name="line54"> 54: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerShellSetPartition.html">PetscPartitionerShellSetPartition</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>[], const <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>[])</font></strong>;
<a name="line55"> 55: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerShellSetRandom.html">PetscPartitionerShellSetRandom</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a>)</font></strong>;
<a name="line56"> 56: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerShellGetRandom.html">PetscPartitionerShellGetRandom</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Sys/PetscBool.html">PetscBool</a> *)</font></strong>;

<a name="line58"> 58: </a><font color="#B22222">/*E</font>
<a name="line59"> 59: </a><font color="#B22222">    <a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageStrategy.html">PetscPartitionerMultistageStrategy</a> - indicates what type of strategy to use</font>

<a name="line61"> 61: </a><font color="#B22222">    Values:</font>
<a name="line62"> 62: </a><font color="#B22222">+  `<a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageStrategy.html">PETSCPARTITIONER_MS_STRATEGY_NODE</a>` - Use node-aware stages</font>
<a name="line63"> 63: </a><font color="#B22222">-  `<a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageStrategy.html">PETSCPARTITIONER_MS_STRATEGY_MSECTION</a>` - Use recursive m-sections</font>

<a name="line65"> 65: </a><font color="#B22222">    Level: intermediate</font>

<a name="line67"> 67: </a><font color="#B22222">.seealso: `<a href="../manualpages/MatGraphOperations/PetscPartitionerSetType.html">PetscPartitionerSetType</a>()`, `<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>`, `<a href="../manualpages/MatGraphOperations/PETSCPARTITIONERMULTISTAGE.html">PETSCPARTITIONERMULTISTAGE</a>`</font>
<a name="line68"> 68: </a><font color="#B22222">E*/</font>
<a name="line69"> 69: </a><font color="#4169E1">typedef</font> <font color="#4169E1">enum</font> {
<a name="line70"> 70: </a>  <a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageStrategy.html">PETSCPARTITIONER_MS_STRATEGY_NODE</a>,
<a name="line71"> 71: </a>  <a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageStrategy.html">PETSCPARTITIONER_MS_STRATEGY_MSECTION</a>
<a name="line72"> 72: </a>} <a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageStrategy.html">PetscPartitionerMultistageStrategy</a>;
<a name="line73"> 73: </a>PETSC_EXTERN const char *const PetscPartitionerMultistageStrategyList[];

<a name="line75"> 75: </a><strong><font color="#4169E1"><a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerMultistageSetStages.html">PetscPartitionerMultistageSetStages</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Sys/PetscInt.html">PetscInt</a>, MPI_Group[])</font></strong>;

<a name="line77"> 77: </a><font color="#B22222">/* We should implement <a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a> with <a href="../manualpages/Mat/MatPartitioning.html">MatPartitioning</a> */</font>
<a name="line78"> 78: </a>#include <A href="../include/petscmat.h.html">&lt;petscmat.h&gt;</A>
<a name="line79"> 79: </a><strong><font color="#228B22">#define <a href="../manualpages/MatGraphOperations/PETSCPARTITIONERMATPARTITIONING.html">PETSCPARTITIONERMATPARTITIONING</a> </font><font color="#666666">"matpartitioning"</font><font color="#228B22"></font></strong>
<a name="line80"> 80: </a><strong><font color="#4169E1">PETSC_EXTERN <a href="../manualpages/Sys/PetscErrorCode.html">PetscErrorCode</a> <a href="../manualpages/MatGraphOperations/PetscPartitionerMatPartitioningGetMatPartitioning.html">PetscPartitionerMatPartitioningGetMatPartitioning</a>(<a href="../manualpages/MatGraphOperations/PetscPartitioner.html">PetscPartitioner</a>, <a href="../manualpages/Mat/MatPartitioning.html">MatPartitioning</a> *)</font></strong>;
</pre>
</body>

</html>