PaStiX Handbook
6.4.0
symbol_base.c
Go to the documentation of this file.
1
/**
2
*
3
* @file symbol_base.c
4
*
5
* PaStiX symbol structure base function
6
*
7
* @copyright 1999-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8
* Univ. Bordeaux. All rights reserved.
9
*
10
* @version 6.4.0
11
* @author Francois Pellegrini
12
* @author Mathieu Faverge
13
* @date 2024-07-05
14
*
15
**/
16
#include "common.h"
17
#include "
symbol/symbol.h
"
18
19
/**
20
*******************************************************************************
21
*
22
* @ingroup pastix_symbol
23
*
24
* @brief Sets the base of the given symbol matrix structure to the given
25
* base value.
26
*
27
*******************************************************************************
28
*
29
* @param[inout] symbptr
30
* The symbol structure to initialize.
31
*
32
* @param[in] baseval
33
* The base value.
34
*
35
*******************************************************************************/
36
void
37
pastixSymbolBase
(
symbol_matrix_t
*
const
symbptr,
38
const
pastix_int_t
baseval )
39
{
40
symbol_cblk_t
*cblk;
41
symbol_blok_t
*blok;
42
pastix_int_t
baseadj;
/* Base adjust */
43
pastix_int_t
cblknum;
44
pastix_int_t
bloknum;
45
46
baseadj = baseval - symbptr->
baseval
;
/* Set base adjust */
47
if
(baseadj == 0)
/* If base already set */
48
return
;
49
50
symbptr->
baseval
= baseval;
/* Set graph base */
51
52
symbptr->
schurfcol
+= baseadj;
53
54
cblk = symbptr->
cblktab
;
55
for
(cblknum = 0; cblknum <= symbptr->
cblknbr
; cblknum ++, cblk++) {
56
cblk->
fcolnum
+= baseadj;
57
cblk->
lcolnum
+= baseadj;
58
cblk->
bloknum
+= baseadj;
59
}
60
61
blok = symbptr->
bloktab
;
62
for
(bloknum = 0; bloknum < symbptr->
bloknbr
; bloknum ++) {
63
blok->
frownum
+= baseadj;
64
blok->
lrownum
+= baseadj;
65
blok->
lcblknm
+= baseadj;
66
blok->
fcblknm
+= baseadj;
67
}
68
69
if
( symbptr->
dof
< 1 ) {
70
pastix_int_t
i;
71
pastix_int_t
*dofs = symbptr->
dofs
;
72
73
assert( dofs != NULL );
74
75
for
(i = 0; i <= symbptr->
nodenbr
; i ++, dofs++) {
76
*dofs += baseadj;
77
}
78
}
79
}
pastix_int_t
BEGIN_C_DECLS typedef int pastix_int_t
Definition:
datatypes.h:51
symbol_blok_s::fcblknm
pastix_int_t fcblknm
Definition:
symbol.h:63
symbol_blok_s::frownum
pastix_int_t frownum
Definition:
symbol.h:60
symbol_blok_s::lrownum
pastix_int_t lrownum
Definition:
symbol.h:61
symbol_matrix_s::bloknbr
pastix_int_t bloknbr
Definition:
symbol.h:80
symbol_matrix_s::baseval
pastix_int_t baseval
Definition:
symbol.h:78
symbol_matrix_s::cblktab
symbol_cblk_t * cblktab
Definition:
symbol.h:83
symbol_matrix_s::schurfcol
pastix_int_t schurfcol
Definition:
symbol.h:82
symbol_cblk_s::bloknum
pastix_int_t bloknum
Definition:
symbol.h:48
symbol_cblk_s::fcolnum
pastix_int_t fcolnum
Definition:
symbol.h:46
symbol_cblk_s::lcolnum
pastix_int_t lcolnum
Definition:
symbol.h:47
symbol_matrix_s::dof
pastix_int_t dof
Definition:
symbol.h:87
symbol_matrix_s::bloktab
symbol_blok_t * bloktab
Definition:
symbol.h:84
symbol_blok_s::lcblknm
pastix_int_t lcblknm
Definition:
symbol.h:62
symbol_matrix_s::dofs
pastix_int_t * dofs
Definition:
symbol.h:89
symbol_matrix_s::nodenbr
pastix_int_t nodenbr
Definition:
symbol.h:81
symbol_matrix_s::cblknbr
pastix_int_t cblknbr
Definition:
symbol.h:79
pastixSymbolBase
void pastixSymbolBase(symbol_matrix_t *symbptr, const pastix_int_t baseval)
Sets the base of the given symbol matrix structure to the given base value.
Definition:
symbol_base.c:37
symbol_blok_s
Symbol block structure.
Definition:
symbol.h:59
symbol_cblk_s
Symbol column block structure.
Definition:
symbol.h:45
symbol_matrix_s
Symbol matrix structure.
Definition:
symbol.h:77
symbol.h
symbol
symbol_base.c
Generated by
1.9.1