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
|
<center><a href="https://gitlab.com/petsc/petsc/-/blob/966382dc56242773704ef5f5cee7aa2db3ebc577/include/petscistypes.h">Actual source code: petscistypes.h</a></center><br>
<html>
<head>
<title></title>
<meta name="generator" content="c2html 0.9.6">
<meta name="date" content="2025-04-30T18:14:50+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><font color="#B22222">/* MANSEC = <a href="../manualpages/Vec/Vec.html">Vec</a> */</font>
<a name="line4"> 4: </a><font color="#B22222">/* SUBMANSEC = <a href="../manualpages/IS/IS.html">IS</a> */</font>
<a name="line6"> 6: </a><font color="#B22222">/*S</font>
<a name="line7"> 7: </a><font color="#B22222"> <a href="../manualpages/IS/IS.html">IS</a> - Abstract PETSc object used for efficient indexing into vector and matrices</font>
<a name="line9"> 9: </a><font color="#B22222"> Level: beginner</font>
<a name="line11"> 11: </a><font color="#B22222">.seealso: `<a href="../manualpages/IS/ISType.html">ISType</a>`, `<a href="../manualpages/IS/ISCreateGeneral.html">ISCreateGeneral</a>()`, `<a href="../manualpages/IS/ISCreateBlock.html">ISCreateBlock</a>()`, `<a href="../manualpages/IS/ISCreateStride.html">ISCreateStride</a>()`, `<a href="../manualpages/IS/ISGetIndices.html">ISGetIndices</a>()`, `<a href="../manualpages/IS/ISDestroy.html">ISDestroy</a>()`</font>
<a name="line12"> 12: </a><font color="#B22222">S*/</font>
<a name="line13"> 13: </a><font color="#4169E1">typedef struct _p_IS *<a href="../manualpages/IS/IS.html">IS</a>;</font>
<a name="line15"> 15: </a><font color="#B22222">/*S</font>
<a name="line16"> 16: </a><font color="#B22222"> <a href="../manualpages/IS/ISLocalToGlobalMapping.html">ISLocalToGlobalMapping</a> - mappings from a</font>
<a name="line17"> 17: </a><font color="#B22222"> local ordering (on individual MPI processes) of 0 to n-1 to a global PETSc ordering (across collections of MPI processes)</font>
<a name="line18"> 18: </a><font color="#B22222"> used by a vector or matrix.</font>
<a name="line20"> 20: </a><font color="#B22222"> Level: intermediate</font>
<a name="line22"> 22: </a><font color="#B22222"> Note:</font>
<a name="line23"> 23: </a><font color="#B22222"> Mapping from local to global is scalable; but global</font>
<a name="line24"> 24: </a><font color="#B22222"> to local may not be if the range of global values represented locally</font>
<a name="line25"> 25: </a><font color="#B22222"> is very large. `<a href="../manualpages/IS/ISLocalToGlobalMappingType.html">ISLocalToGlobalMappingType</a>` provides alternative ways of efficiently applying `<a href="../manualpages/IS/ISGlobalToLocalMappingApply.html">ISGlobalToLocalMappingApply</a>()</font>
<a name="line27"> 27: </a><font color="#B22222"> Developer Note:</font>
<a name="line28"> 28: </a><font color="#B22222"> `<a href="../manualpages/IS/ISLocalToGlobalMapping.html">ISLocalToGlobalMapping</a>` is actually a private object; it is included</font>
<a name="line29"> 29: </a><font color="#B22222"> here for the inline function `<a href="../manualpages/IS/ISLocalToGlobalMappingApply.html">ISLocalToGlobalMappingApply</a>()` to allow it to be inlined since</font>
<a name="line30"> 30: </a><font color="#B22222"> it is used so often.</font>
<a name="line32"> 32: </a><font color="#B22222">.seealso: `<a href="../manualpages/IS/ISLocalToGlobalMappingCreate.html">ISLocalToGlobalMappingCreate</a>()`, `<a href="../manualpages/IS/ISLocalToGlobalMappingApply.html">ISLocalToGlobalMappingApply</a>()`, `<a href="../manualpages/IS/ISLocalToGlobalMappingDestroy.html">ISLocalToGlobalMappingDestroy</a>()`, `<a href="../manualpages/IS/ISGlobalToLocalMappingApply.html">ISGlobalToLocalMappingApply</a>()`</font>
<a name="line33"> 33: </a><font color="#B22222">S*/</font>
<a name="line34"> 34: </a><font color="#4169E1">typedef struct _p_ISLocalToGlobalMapping *<a href="../manualpages/IS/ISLocalToGlobalMapping.html">ISLocalToGlobalMapping</a>;</font>
<a name="line36"> 36: </a><font color="#B22222">/*S</font>
<a name="line37"> 37: </a><font color="#B22222"> <a href="../manualpages/IS/ISColoring.html">ISColoring</a> - sets of `<a href="../manualpages/IS/IS.html">IS</a>`s that define a coloring of something, such as a graph defined by a sparse matrix</font>
<a name="line39"> 39: </a><font color="#B22222"> Level: intermediate</font>
<a name="line41"> 41: </a><font color="#B22222"> Notes:</font>
<a name="line42"> 42: </a><font color="#B22222"> One should not access the *is records below directly because they may not yet</font>
<a name="line43"> 43: </a><font color="#B22222"> have been created. One should use `<a href="../manualpages/IS/ISColoringGetIS.html">ISColoringGetIS</a>()` to make sure they are</font>
<a name="line44"> 44: </a><font color="#B22222"> created when needed.</font>
<a name="line46"> 46: </a><font color="#B22222"> When the coloring type is `<a href="../manualpages/IS/ISColoringType.html">IS_COLORING_LOCAL</a>` the coloring is in the local ordering of the unknowns.</font>
<a name="line47"> 47: </a><font color="#B22222"> That is the matching the local (ghosted) vector; a local to global mapping must be applied to map</font>
<a name="line48"> 48: </a><font color="#B22222"> them to the global ordering.</font>
<a name="line50"> 50: </a><font color="#B22222"> Developer Note:</font>
<a name="line51"> 51: </a><font color="#B22222"> This is not a `<a href="../manualpages/Sys/PetscObject.html">PetscObject</a>`</font>
<a name="line53"> 53: </a><font color="#B22222">.seealso: `<a href="../manualpages/IS/IS.html">IS</a>`, `<a href="../manualpages/MatGraphOperations/MatColoringCreate.html">MatColoringCreate</a>()`, `<a href="../manualpages/Mat/MatColoring.html">MatColoring</a>`, `<a href="../manualpages/IS/ISColoringCreate.html">ISColoringCreate</a>()`, `<a href="../manualpages/IS/ISColoringGetIS.html">ISColoringGetIS</a>()`, `<a href="../manualpages/IS/ISColoringView.html">ISColoringView</a>()`</font>
<a name="line54"> 54: </a><font color="#B22222">S*/</font>
<a name="line55"> 55: </a><font color="#4169E1">typedef struct _n_ISColoring *<a href="../manualpages/IS/ISColoring.html">ISColoring</a>;</font>
<a name="line57"> 57: </a><font color="#B22222">/*S</font>
<a name="line58"> 58: </a><font color="#B22222"> <a href="../manualpages/IS/PetscLayout.html">PetscLayout</a> - defines layout of vectors and matrices (that is the "global" numbering of vector and matrix entries) across MPI processes (which rows are owned by which processes)</font>
<a name="line60"> 60: </a><font color="#B22222"> Level: developer</font>
<a name="line62"> 62: </a><font color="#B22222"> Notes:</font>
<a name="line63"> 63: </a><font color="#B22222"> PETSc vectors (`<a href="../manualpages/Vec/Vec.html">Vec</a>`) have a global number associated with each vector entry. The first MPI process that shares the vector owns the first `n0` entries of the vector,</font>
<a name="line64"> 64: </a><font color="#B22222"> the second MPI process the next `n1` entries, etc. A `<a href="../manualpages/IS/PetscLayout.html">PetscLayout</a>` is a way of managing this information, for example the number of locally owned entries is provided</font>
<a name="line65"> 65: </a><font color="#B22222"> by `<a href="../manualpages/IS/PetscLayoutGetLocalSize.html">PetscLayoutGetLocalSize</a>()` and the range of indices for a given MPI process is provided by `<a href="../manualpages/IS/PetscLayoutGetRange.html">PetscLayoutGetRange</a>()`.</font>
<a name="line67"> 67: </a><font color="#B22222"> Each PETSc `<a href="../manualpages/Vec/Vec.html">Vec</a>` contains a `<a href="../manualpages/IS/PetscLayout.html">PetscLayout</a>` object which can be obtained with `<a href="../manualpages/Vec/VecGetLayout.html">VecGetLayout</a>()`. For convenience `<a href="../manualpages/Vec/Vec.html">Vec</a>` provides an API to access the layout information directly,</font>
<a name="line68"> 68: </a><font color="#B22222"> for example with `<a href="../manualpages/Vec/VecGetLocalSize.html">VecGetLocalSize</a>()` and `<a href="../manualpages/Vec/VecGetOwnershipRange.html">VecGetOwnershipRange</a>()`.</font>
<a name="line70"> 70: </a><font color="#B22222"> Similarly PETSc matrices have layouts, these are discussed in [](ch_matrices).</font>
<a name="line72"> 72: </a><font color="#B22222">.seealso: `<a href="../manualpages/IS/PetscLayoutCreate.html">PetscLayoutCreate</a>()`, `<a href="../manualpages/IS/PetscLayoutDestroy.html">PetscLayoutDestroy</a>()`, `<a href="../manualpages/IS/PetscLayoutGetRange.html">PetscLayoutGetRange</a>()`, `<a href="../manualpages/IS/PetscLayoutGetLocalSize.html">PetscLayoutGetLocalSize</a>()`, `<a href="../manualpages/IS/PetscLayoutGetSize.html">PetscLayoutGetSize</a>()`,</font>
<a name="line73"> 73: </a><font color="#B22222"> `<a href="../manualpages/IS/PetscLayoutGetBlockSize.html">PetscLayoutGetBlockSize</a>()`, `<a href="../manualpages/IS/PetscLayoutGetRanges.html">PetscLayoutGetRanges</a>()`, `<a href="../manualpages/IS/PetscLayoutFindOwner.html">PetscLayoutFindOwner</a>()`, `<a href="../manualpages/IS/PetscLayoutFindOwnerIndex.html">PetscLayoutFindOwnerIndex</a>()`,</font>
<a name="line74"> 74: </a><font color="#B22222"> `<a href="../manualpages/Vec/VecGetLayout.html">VecGetLayout</a>()`, `<a href="../manualpages/Vec/VecGetLocalSize.html">VecGetLocalSize</a>()`, `<a href="../manualpages/Vec/VecGetOwnershipRange.html">VecGetOwnershipRange</a>()`</font>
<a name="line75"> 75: </a><font color="#B22222">S*/</font>
<a name="line76"> 76: </a><font color="#4169E1">typedef struct _n_PetscLayout *<a href="../manualpages/IS/PetscLayout.html">PetscLayout</a>;</font>
</pre>
</body>
</html>
|