PaStiX Handbook  6.3.2
graph_isolate.c File Reference
#include "common.h"
#include "pastix/order.h"
#include "blend/extendVector.h"
#include "graph/graph.h"

Go to the source code of this file.

Functions

static void graph_isolate_assign_ptr (pastix_int_t **newptr, pastix_int_t *tmpptr)
 Assign the new pointer to the temporary one. More...
 
static void graph_isolate_everything (pastix_int_t n, pastix_int_t **newperm, pastix_int_t **newinvp)
 If isolate_n == n, everything needs to be isolated. That means that we just need an id permuation. More...
 
static void graph_isolate_permutations (pastix_int_t n, pastix_int_t isolate_n, const pastix_int_t *isolate_list, pastix_int_t *permtab, pastix_int_t *invptab, pastix_int_t baseval)
 Init and fill the inverse permutation array. More...
 
static void graph_isolate_compress (const pastix_graph_t *oldgraph, pastix_graph_t *newgraph, pastix_int_t new_gn, const pastix_int_t *permtab)
 Compress the local copy of the graph with only the kept unknowns. More...
 
static void graph_iRange_fill_outptr (const pastix_graph_t *graph, const pastix_order_t *order, ExtendVectorINT *vec, pastix_int_t *out_colptr, pastix_int_t *out_rowptr, pastix_int_t fnode, pastix_int_t lnode, pastix_int_t distance)
 Fill the isolated colptr and rowptr. More...
 
Graph manipulation subroutines
int graphIsolate (const pastix_graph_t *ingraph, pastix_graph_t *outgraph, pastix_int_t isolate_n, pastix_int_t *isolate_list, pastix_int_t **new_perm, pastix_int_t **new_invp)
 Isolate a subset of vertices from a given graph. More...
 
int graphIsolateRange (const pastix_graph_t *graph, const pastix_order_t *order, pastix_graph_t *out_graph, pastix_int_t fnode, pastix_int_t lnode, pastix_int_t distance)
 Isolate the subgraph associated to a range of unknowns in the permuted graph. More...
 

Detailed Description

PaStiX graph isolate routine

Version
6.3.2
Author
Xavier Lacoste
Pierre Ramet
Mathieu Faverge
Tony Delarue
Date
2023-07-21

Definition in file graph_isolate.c.

Function Documentation

◆ graph_isolate_assign_ptr()

static void graph_isolate_assign_ptr ( pastix_int_t **  newptr,
pastix_int_t tmpptr 
)
inlinestatic

Assign the new pointer to the temporary one.

Parameters
[in]newptrTODO
[in]tmpptrTODO

Definition at line 38 of file graph_isolate.c.

Referenced by graphIsolate().

◆ graph_isolate_everything()

static void graph_isolate_everything ( pastix_int_t  n,
pastix_int_t **  newperm,
pastix_int_t **  newinvp 
)
inlinestatic

If isolate_n == n, everything needs to be isolated. That means that we just need an id permuation.

Parameters
[in]nTODO
[in]newpermTODO
[in]newinvpTODO

Definition at line 66 of file graph_isolate.c.

References pastix_int_t.

Referenced by graphIsolate().

◆ graph_isolate_permutations()

static void graph_isolate_permutations ( pastix_int_t  n,
pastix_int_t  isolate_n,
const pastix_int_t isolate_list,
pastix_int_t permtab,
pastix_int_t invptab,
pastix_int_t  baseval 
)
inlinestatic

Init and fill the inverse permutation array.

Parameters
[in]nTODO
[in]isolate_nTODO
[in]isolate_listTODO
[in]permtabTODO
[in]invptabTODO
[in]basevalTODO

Definition at line 121 of file graph_isolate.c.

References pastix_int_t.

Referenced by graphIsolate().

◆ graph_isolate_compress()

static void graph_isolate_compress ( const pastix_graph_t *  oldgraph,
pastix_graph_t *  newgraph,
pastix_int_t  new_gn,
const pastix_int_t permtab 
)
inlinestatic

Compress the local copy of the graph with only the kept unknowns.

Parameters
[in]oldgraphTODO
[in]newgraphTODO
[in]new_gnTODO
[in]permtabTODO

Definition at line 188 of file graph_isolate.c.

References graphUpdateComputedFields(), and pastix_int_t.

Referenced by graphIsolate().

◆ graph_iRange_fill_outptr()

static void graph_iRange_fill_outptr ( const pastix_graph_t *  graph,
const pastix_order_t order,
ExtendVectorINT vec,
pastix_int_t out_colptr,
pastix_int_t out_rowptr,
pastix_int_t  fnode,
pastix_int_t  lnode,
pastix_int_t  distance 
)
inlinestatic

Fill the isolated colptr and rowptr.

Parameters
[in]graphThe original graph associated from which vertices and edges must be extracted.
[in]orderThe ordering structure associated to the graph.
[in]vecTODO
[in,out]out_colptrTODO
[in,out]out_rowptrTODO
[in]fnodeThe index of the first node to extract in the inverse permutation.
[in]lnodeThe index (+1) of the last node to extract in the inverse permutation.
[in]distanceDistance considered in number of edges to create an edge in isolated graph.

Definition at line 425 of file graph_isolate.c.

References extendint_Add(), extendint_Clear(), extendint_Read(), extendint_Size(), pastix_int_t, pastix_order_s::peritab, and pastix_order_s::permtab.

Referenced by graphIsolateRange().