programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cs_matrix.h
Go to the documentation of this file.
1 #ifndef __CS_MATRIX_H__
2 #define __CS_MATRIX_H__
3 
4 /*============================================================================
5  * Sparse Matrix Representation and Operations
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2014 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_defs.h"
35 
36 #include "cs_halo.h"
37 #include "cs_numbering.h"
38 #include "cs_halo_perio.h"
39 
40 /*----------------------------------------------------------------------------*/
41 
43 
44 /*============================================================================
45  * Macro definitions
46  *============================================================================*/
47 
48 /*============================================================================
49  * Type definitions
50  *============================================================================*/
51 
52 /* Matrix structure representation types */
53 
54 typedef enum {
55 
56  CS_MATRIX_NATIVE, /* Native matrix format */
57  CS_MATRIX_CSR, /* Compressed Sparse Row storage format */
58  CS_MATRIX_CSR_SYM, /* Compressed Symmetric Sparse Row storage format */
59  CS_MATRIX_MSR, /* Modified Compressed Sparse Row storage format */
60  CS_MATRIX_N_TYPES /* Number of known matrix types */
61 
63 
64 /* Matrix fill types (for tuning) */
65 
66 typedef enum {
67 
68  CS_MATRIX_SCALAR, /* Simple calar matrix */
69  CS_MATRIX_SCALAR_SYM, /* Simple scalar symmetric matrix */
70  CS_MATRIX_33_BLOCK_D, /* Matrix with 3x3 diagonal blocks
71  (and 3.I extradiagonal blocks) */
72  CS_MATRIX_33_BLOCK_D_SYM, /* Symmetric matrix with 3x3 diagonal blocks
73  (and 3.I extradiagonal blocks) */
74  CS_MATRIX_33_BLOCK, /* Matrix with 3x3 blocks
75  (diagonal and extra-diagonal) */
76  CS_MATRIX_N_FILL_TYPES /* Number of possible matrix fill types */
77 
79 
80 /* Structure associated with opaque matrix structure object */
81 
82 typedef struct _cs_matrix_structure_t cs_matrix_structure_t;
83 
84 /* Structure associated with opaque matrix object */
85 
86 typedef struct _cs_matrix_t cs_matrix_t;
87 
88 /* Structure associated with opaque matrix tuning results object */
89 
90 typedef struct _cs_matrix_variant_t cs_matrix_variant_t;
91 
92 /*============================================================================
93  * Global variables
94  *============================================================================*/
95 
96 /* Short names for matrix types */
97 
98 extern const char *cs_matrix_type_name[];
99 
100 /* Full names for matrix types */
101 
102 extern const char *cs_matrix_type_fullname[];
103 
104 /* Fill type names for matrices */
105 
106 extern const char *cs_matrix_fill_type_name[];
107 
108 /*=============================================================================
109  * Public function prototypes
110  *============================================================================*/
111 
112 /*----------------------------------------------------------------------------
113  * Create a matrix Structure.
114  *
115  * Note that the structure created maps to the given existing
116  * cell global number, face -> cell connectivity arrays, and cell halo
117  * structure, so it must be destroyed before they are freed
118  * (usually along with the code's main face -> cell structure).
119  *
120  * Note that the resulting matrix structure will contain either a full or
121  * an empty main diagonal, and that the extra-diagonal structure is always
122  * symmetric (though the coefficients my not be, and we may choose a
123  * matrix format that does not exploit ths symmetry). If the face_cell
124  * connectivity argument is NULL, the matrix will be purely diagonal.
125  *
126  * parameters:
127  * type <-- Type of matrix considered
128  * have_diag <-- Indicates if the diagonal structure contains nonzeroes
129  * n_cells <-- Local number of cells
130  * n_cells_ext <-- Local number of cells + ghost cells sharing a face
131  * n_faces <-- Local number of internal faces
132  * cell_num <-- Optional global cell numbers (1 to n), or NULL
133  * face_cell <-- Face -> cells connectivity (1 to n)
134  * halo <-- Halo structure associated with cells, or NULL
135  * numbering <-- vectorization or thread-related numbering info, or NULL
136  *
137  * returns:
138  * pointer to created matrix structure;
139  *----------------------------------------------------------------------------*/
140 
143  bool have_diag,
144  cs_lnum_t n_cells,
145  cs_lnum_t n_cells_ext,
146  cs_lnum_t n_faces,
147  const cs_gnum_t *cell_num,
148  const cs_lnum_t *face_cell,
149  const cs_halo_t *halo,
150  const cs_numbering_t *numbering);
151 
152 /*----------------------------------------------------------------------------
153  * Create a matrix container using a given variant.
154  *
155  * If the matrix variant is incompatible with the structure, it is ignored,
156  * and defaults for that structure are used instead.
157  *
158  * parameters:
159  * ms <-- Associated matrix structure
160  * mv <-- Associated matrix variant
161  *
162  * returns:
163  * pointer to created matrix structure;
164  *----------------------------------------------------------------------------*/
165 
166 cs_matrix_t *
168  const cs_matrix_variant_t *mv);
169 
170 /*----------------------------------------------------------------------------
171  * Destroy a matrix structure.
172  *
173  * parameters:
174  * ms <-> Pointer to matrix structure pointer
175  *----------------------------------------------------------------------------*/
176 
177 void
179 
180 /*----------------------------------------------------------------------------
181  * Get the type associated with a matrix structure.
182  *
183  * parameters:
184  * ms <-- Associated matrix structure
185  *----------------------------------------------------------------------------*/
186 
189 
190 /*----------------------------------------------------------------------------
191  * Create a matrix container using a given structure.
192  *
193  * Note that the matrix container maps to the assigned structure,
194  * so it must be destroyed before that structure.
195  *
196  * parameters:
197  * ms <-- Associated matrix structure
198  *
199  * returns:
200  * pointer to created matrix structure;
201  *----------------------------------------------------------------------------*/
202 
203 cs_matrix_t *
205 
206 /*----------------------------------------------------------------------------
207  * Destroy a matrix structure.
208  *
209  * parameters:
210  * matrix <-> Pointer to matrix structure pointer
211  *----------------------------------------------------------------------------*/
212 
213 void
215 
216 /*----------------------------------------------------------------------------
217  * Return number of columns in matrix.
218  *
219  * parameters:
220  * matrix --> Pointer to matrix structure
221  *----------------------------------------------------------------------------*/
222 
223 cs_lnum_t
225 
226 /*----------------------------------------------------------------------------
227  * Return number of rows in matrix.
228  *
229  * parameters:
230  * matrix --> Pointer to matrix structure
231  *----------------------------------------------------------------------------*/
232 
233 cs_lnum_t
235 
236 /*----------------------------------------------------------------------------
237  * Return matrix diagonal block sizes.
238  *
239  * Block sizes are defined by a array of 4 values:
240  * 0: useful block size, 1: vector block extents,
241  * 2: matrix line extents, 3: matrix line*column extents
242  *
243  * parameters:
244  * matrix <-- Pointer to matrix structure
245  *
246  * returns:
247  * pointer to block sizes
248  *----------------------------------------------------------------------------*/
249 
250 const int *
252 
253 /*----------------------------------------------------------------------------
254  * Get matrix fill type, depending on block sizes.
255  *
256  * Block sizes are defined by an optional array of 4 values:
257  * 0: useful block size, 1: vector block extents,
258  * 2: matrix line extents, 3: matrix line*column extents
259  *
260  * parameters:
261  * symmetric <-- Indicates if matrix coefficients are symmetric
262  * diag_block_size <-- Block sizes for diagonal, or NULL
263  * extra_diag_block_size <-- Block sizes for extra diagonal, or NULL
264  *
265  * returns:
266  * matrix fill type
267  *----------------------------------------------------------------------------*/
268 
270 cs_matrix_get_fill_type(bool symmetric,
271  const int *diag_block_size,
272  const int *extra_diag_block_size);
273 
274 /*----------------------------------------------------------------------------
275  * Set matrix coefficients, sharing arrays with the caller when possible.
276  *
277  * With shared arrays, the matrix becomes unusable if the arrays passed as
278  * arguments are not be modified (its coefficients should be unset first
279  * to mark this).
280  *
281  * Depending on current options and initialization, values will be copied
282  * or simply mapped.
283  *
284  * Block sizes are defined by an optional array of 4 values:
285  * 0: useful block size, 1: vector block extents,
286  * 2: matrix line extents, 3: matrix line*column extents
287  *
288  * parameters:
289  * matrix <-> Pointer to matrix structure
290  * symmetric <-- Indicates if matrix coefficients are symmetric
291  * diag_block_size <-- Block sizes for diagonal, or NULL
292  * extra_diag_block_size <-- Block sizes for extra diagonal, or NULL
293  * da <-- Diagonal values (NULL if zero)
294  * xa <-- Extradiagonal values (NULL if zero)
295  *----------------------------------------------------------------------------*/
296 
297 void
299  bool symmetric,
300  const int *diag_block_size,
301  const int *extra_diag_block_size,
302  const cs_real_t *da,
303  const cs_real_t *xa);
304 
305 /*----------------------------------------------------------------------------
306  * Set matrix coefficients in the non-interleaved case.
307  *
308  * In the symmetric case, there is no difference with the interleaved case.
309  *
310  * Depending on current options and initialization, values will be copied
311  * or simply mapped (non-symmetric values will be copied).
312  *
313  * parameters:
314  * matrix <-> Pointer to matrix structure
315  * symmetric <-- Indicates if matrix coefficients are symmetric
316  * da <-- Diagonal values (NULL if zero)
317  * xa <-- Extradiagonal values (NULL if zero)
318  *----------------------------------------------------------------------------*/
319 
320 void
322  bool symmetric,
323  const cs_real_t *da,
324  const cs_real_t *xa);
325 
326 /*----------------------------------------------------------------------------
327  * Set matrix coefficients, copying values to private arrays.
328  *
329  * With private arrays, the matrix becomes independant from the
330  * arrays passed as arguments.
331  *
332  * Block sizes are defined by an optional array of 4 values:
333  * 0: useful block size, 1: vector block extents,
334  * 2: matrix line extents, 3: matrix line*column extents
335  *
336  * parameters:
337  * matrix <-> Pointer to matrix structure
338  * symmetric <-- Indicates if matrix coefficients are symmetric
339  * diag_block_size <-- Block sizes for diagonal, or NULL
340  * extra_diag_block_size <-- Block sizes for extra diagonal, or NULL
341  * da <-- Diagonal values (NULL if zero)
342  * xa <-- Extradiagonal values (NULL if zero)
343  *----------------------------------------------------------------------------*/
344 
345 void
347  bool symmetric,
348  const int *diag_block_size,
349  const int *extra_diag_block_size,
350  const cs_real_t *da,
351  const cs_real_t *xa);
352 
353 /*----------------------------------------------------------------------------
354  * Release shared matrix coefficients.
355  *
356  * Pointers to mapped coefficients are set to NULL, while
357  * coefficient copies owned by the matrix are not modified.
358  *
359  * This simply ensures the matrix does not maintain pointers
360  * to nonexistant data.
361  *
362  * parameters:
363  * matrix <-> Pointer to matrix structure
364  *----------------------------------------------------------------------------*/
365 
366 void
368 
369 /*----------------------------------------------------------------------------
370  * Copy matrix diagonal values.
371  *
372  * In case of matrixes with block diagonal coefficients, only the true
373  * diagonal values are copied.
374  *
375  * parameters:
376  * matrix --> Pointer to matrix structure
377  * da --> Diagonal (pre-allocated, size: n_cells)
378  *----------------------------------------------------------------------------*/
379 
380 void
382  cs_real_t *restrict da);
383 
384 /*----------------------------------------------------------------------------
385  * Get matrix diagonal values.
386  *
387  * In case of matrixes with block diagonal coefficients, a pointer to
388  * the complete block diagonal is returned.
389  *
390  * parameters:
391  * matrix --> Pointer to matrix structure
392  *
393  * returns:
394  * pointer to matrix diagonal array
395  *----------------------------------------------------------------------------*/
396 
397 const cs_real_t *
399 
400 /*----------------------------------------------------------------------------
401  * Matrix.vector product y = A.x
402  *
403  * This function includes a halo update of x prior to multiplication by A.
404  *
405  * parameters:
406  * rotation_mode --> Halo update option for rotational periodicity
407  * matrix --> Pointer to matrix structure
408  * x <-> Multipliying vector values (ghost values updated)
409  * y --> Resulting vector
410  *----------------------------------------------------------------------------*/
411 
412 void
414  const cs_matrix_t *matrix,
415  cs_real_t *restrict x,
416  cs_real_t *restrict y);
417 
418 /*----------------------------------------------------------------------------
419  * Matrix.vector product y = A.x with no prior halo update of x.
420  *
421  * This function does not include a halo update of x prior to multiplication
422  * by A, so it should be called only when the halo of x is known to already
423  * be up to date (in which case we avoid the performance penalty of a
424  * redundant update by using this variant of the matrix.vector product).
425  *
426  * parameters:
427  * matrix --> Pointer to matrix structure
428  * x --> Multipliying vector values
429  * y --> Resulting vector
430  *----------------------------------------------------------------------------*/
431 
432 void
434  const cs_real_t *x,
435  cs_real_t *restrict y);
436 
437 /*----------------------------------------------------------------------------
438  * Matrix.vector product y = (A-D).x
439  *
440  * This function includes a halo update of x prior to multiplication by A.
441  *
442  * parameters:
443  * rotation_mode <-- Halo update option for rotational periodicity
444  * matrix <-- Pointer to matrix structure
445  * x <-> Multipliying vector values (ghost values updated)
446  * y --> Resulting vector
447  *----------------------------------------------------------------------------*/
448 
449 void
451  const cs_matrix_t *matrix,
452  cs_real_t *restrict x,
453  cs_real_t *restrict y);
454 
455 /*----------------------------------------------------------------------------
456  * Build list of variants for tuning or testing.
457  *
458  * parameters:
459  * n_fill_types <-- number of fill types tuned for
460  * fill_types <-- array of fill types tuned for
461  * type_filter <-- true for matrix types tuned for, false for others
462  * numbering <-- vectorization or thread-related numbering info,
463  * or NULL
464  * n_variants --> number of variants
465  * m_variant --> array of matrix variants
466  *----------------------------------------------------------------------------*/
467 
468 void
469 cs_matrix_variant_build_list(int n_fill_types,
470  cs_matrix_fill_type_t fill_types[],
471  bool type_filter[],
472  const cs_numbering_t *numbering,
473  int *n_variants,
474  cs_matrix_variant_t **m_variant);
475 
476 /*----------------------------------------------------------------------------
477  * Build matrix variant
478  *
479  * The variant will initially use default matrix-vector functions,
480  * which can be later modified using cs_matrix_variant_set_func().
481  *
482  * parameters:
483  * type <-- Type of matrix considered
484  * numbering <-- vectorization or thread-related numbering info,
485  * or NULL
486  *----------------------------------------------------------------------------*/
487 
490  const cs_numbering_t *numbering);
491 
492 /*----------------------------------------------------------------------------
493  * Destroy a matrix variant structure.
494  *
495  * parameters:
496  * mv <-> Pointer to matrix variant pointer
497  *----------------------------------------------------------------------------*/
498 
499 void
501 
502 /*----------------------------------------------------------------------------
503  * Select the sparse matrix-vector product function to be used by a
504  * matrix variant for a given fill type.
505  *
506  * Currently, possible variant functions are:
507  *
508  * CS_MATRIX_NATIVE (all fill types)
509  * standard
510  * 3_3_diag (for CS_MATRIX_33_BLOCK_D or CS_MATRIX_33_BLOCK_D_SYM)
511  * bull (for CS_MATRIX_SCALAR or CS_MATRIX_SCALAR_SYM)
512  * omp (for OpenMP with compatible numbering)
513  * vector (For vector machine with compatible numbering)
514  *
515  * CS_MATRIX_CSR (for CS_MATRIX_SCALAR or CS_MATRIX_SCALAR_SYM)
516  * standard
517  * prefetch
518  * mkl (with MKL)
519  *
520  * CS_MATRIX_CSR_SYM (for CS_MATRIX_SCALAR_SYM)
521  * standard
522  * mkl (with MKL)
523  *
524  * CS_MATRIX_MSR (all fill types except CS_MATRIX_33_BLOCK)
525  * standard
526  * prefetch
527  * mkl (with MKL, for CS_MATRIX_SCALAR or CS_MATRIX_SCALAR_SYM)
528  *
529  * parameters:
530  * mv <-> Pointer to matrix variant
531  * numbering <-- mesh numbering info, or NULL
532  * fill type <-- matrix fill type to merge from
533  * ed_flag <-- 0: with diagonal only, 1 exclude only; 2; both
534  * func_name <-- function type name
535  *----------------------------------------------------------------------------*/
536 
537 void
539  const cs_numbering_t *numbering,
540  cs_matrix_fill_type_t fill_type,
541  int ed_flag,
542  const char *func_name);
543 
544 /*----------------------------------------------------------------------------
545  * Merge a functions to a matrix variant from another variant sharing
546  * the same structure.
547  *
548  * Functions from the structure to merge for the selected fill type are
549  * assigned to the main variant.
550  *
551  * This can be useful when tuning has been done separately for different fill
552  * types, and the resulting selected structure is identical.
553  *
554  * parameters:
555  * mv <-> Pointer to matrix variant
556  * mv_merge <-- Pointer to matrix variant to merge
557  * fill type <-- matrix fill type to merge from
558  *----------------------------------------------------------------------------*/
559 
560 void
562  const cs_matrix_variant_t *mv_merge,
563  cs_matrix_fill_type_t fill_type);
564 
565 /*----------------------------------------------------------------------------
566  * Get the type associated with a matrix variant.
567  *
568  * parameters:
569  * mv <-- Pointer to matrix variant structure
570  *----------------------------------------------------------------------------*/
571 
574 
575 /*----------------------------------------------------------------------------
576  * Test local matrix.vector product operations.
577  *
578  * parameters:
579  * n_cells <-- number of local cells
580  * n_cells_ext <-- number of cells including ghost cells (array size)
581  * n_faces <-- local number of internal faces
582  * cell_num <-- Optional global cell numbers (1 to n), or NULL
583  * face_cell <-- face -> cells connectivity (1 to n)
584  * halo <-- cell halo structure
585  * numbering <-- vectorization or thread-related numbering info, or NULL
586  *----------------------------------------------------------------------------*/
587 
588 void
590  cs_lnum_t n_cells_ext,
591  cs_lnum_t n_faces,
592  const cs_gnum_t *cell_num,
593  const cs_lnum_t *face_cell,
594  const cs_halo_t *halo,
595  const cs_numbering_t *numbering);
596 
597 /*----------------------------------------------------------------------------*/
598 
600 
601 #endif /* __CS_MATRIX_H__ */
const int * cs_matrix_get_diag_block_size(const cs_matrix_t *matrix)
Definition: cs_matrix.c:4720
unsigned long cs_gnum_t
global mesh entity number
Definition: cs_defs.h:280
#define restrict
Definition: cs_defs.h:122
void cs_matrix_vector_multiply(cs_halo_rotation_t rotation_mode, const cs_matrix_t *matrix, cs_real_t *restrict x, cs_real_t *restrict y)
Definition: cs_matrix.c:5135
void cs_matrix_variant_build_list(int n_fill_types, cs_matrix_fill_type_t fill_types[], bool type_filter[], const cs_numbering_t *numbering, int *n_variants, cs_matrix_variant_t **m_variant)
Definition: cs_matrix.c:5278
cs_halo_rotation_t
Definition: cs_halo.h:59
void cs_matrix_copy_coefficients(cs_matrix_t *matrix, bool symmetric, const int *diag_block_size, const int *extra_diag_block_size, const cs_real_t *da, const cs_real_t *xa)
Definition: cs_matrix.c:4921
Definition: cs_matrix.h:72
cs_matrix_t * cs_matrix_create(const cs_matrix_structure_t *ms)
Definition: cs_matrix.c:4468
struct _cs_matrix_variant_t cs_matrix_variant_t
Definition: cs_matrix.h:90
#define BEGIN_C_DECLS
Definition: cs_defs.h:405
void cs_matrix_release_coefficients(cs_matrix_t *matrix)
Definition: cs_matrix.c:4987
cs_matrix_structure_t * cs_matrix_structure_create(cs_matrix_type_t type, bool have_diag, cs_lnum_t n_cells, cs_lnum_t n_cells_ext, cs_lnum_t n_faces, const cs_gnum_t *cell_num, const cs_lnum_t *face_cell, const cs_halo_t *halo, const cs_numbering_t *numbering)
Definition: cs_matrix.c:4013
Definition: cs_matrix.h:76
void cs_matrix_set_coefficients_ni(cs_matrix_t *matrix, bool symmetric, const cs_real_t *da, const cs_real_t *xa)
Definition: cs_matrix.c:4872
void cs_matrix_variant_test(cs_lnum_t n_cells, cs_lnum_t n_cells_ext, cs_lnum_t n_faces, const cs_gnum_t *cell_num, const cs_lnum_t *face_cell, const cs_halo_t *halo, const cs_numbering_t *numbering)
Definition: cs_matrix.c:5657
Definition: cs_halo.h:70
void cs_matrix_structure_destroy(cs_matrix_structure_t **ms)
Definition: cs_matrix.c:4089
void cs_matrix_copy_diagonal(const cs_matrix_t *matrix, cs_real_t *restrict da)
Definition: cs_matrix.c:5015
const char * cs_matrix_type_fullname[]
Definition: cs_matrix.c:135
const char * cs_matrix_fill_type_name[]
Definition: cs_matrix.c:142
struct _cs_matrix_t cs_matrix_t
Definition: cs_matrix.h:86
void cs_matrix_variant_merge(cs_matrix_variant_t *mv, const cs_matrix_variant_t *mv_merge, cs_matrix_fill_type_t fill_type)
Definition: cs_matrix.c:5612
cs_matrix_fill_type_t cs_matrix_get_fill_type(bool symmetric, const int *diag_block_size, const int *extra_diag_block_size)
Definition: cs_matrix.c:4746
const char * cs_matrix_type_name[]
Definition: cs_matrix.c:127
cs_matrix_type_t cs_matrix_structure_type(const cs_matrix_structure_t *ms)
Definition: cs_matrix.h:70
Definition: cs_matrix.h:60
cs_matrix_type_t
Definition: cs_matrix.h:54
void matrix(const cs_int_t *const iconvp, const cs_int_t *const idiffp, const cs_int_t *const ndircp, const cs_int_t *const isym, const cs_real_t *const thetap, const cs_int_t *const imucpp, const cs_real_t coefbp[], const cs_real_t cofbfp[], const cs_real_t rovsdt[], const cs_real_t i_massflux[], const cs_real_t b_massflux[], const cs_real_t i_visc[], const cs_real_t b_visc[], const cs_real_t xcpp[], cs_real_t da[], cs_real_t xa[])
Definition: cs_matrix_building.c:113
void cs_matrix_set_coefficients(cs_matrix_t *matrix, bool symmetric, const int *diag_block_size, const int *extra_diag_block_size, const cs_real_t *da, const cs_real_t *xa)
Definition: cs_matrix.c:4802
Definition: cs_matrix.h:68
Definition: cs_matrix.h:58
cs_matrix_variant_t * cs_matrix_variant_create(cs_matrix_type_t type, const cs_numbering_t *numbering)
Definition: cs_matrix.c:5235
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
cs_lnum_t cs_matrix_get_n_columns(const cs_matrix_t *matrix)
Definition: cs_matrix.c:4681
void cs_matrix_destroy(cs_matrix_t **matrix)
Definition: cs_matrix.c:4626
#define END_C_DECLS
Definition: cs_defs.h:406
void cs_matrix_variant_destroy(cs_matrix_variant_t **mv)
Definition: cs_matrix.c:5524
double cs_real_t
Definition: cs_defs.h:296
Definition: cs_matrix.h:74
void cs_matrix_exdiag_vector_multiply(cs_halo_rotation_t rotation_mode, const cs_matrix_t *matrix, cs_real_t *restrict x, cs_real_t *restrict y)
Definition: cs_matrix.c:5200
Definition: cs_matrix.h:59
cs_matrix_t * cs_matrix_create_by_variant(const cs_matrix_structure_t *ms, const cs_matrix_variant_t *mv)
Definition: cs_matrix.c:4597
Definition: cs_matrix.h:57
cs_lnum_t cs_matrix_get_n_rows(const cs_matrix_t *matrix)
Definition: cs_matrix.c:4697
void cs_matrix_variant_set_func(cs_matrix_variant_t *mv, const cs_numbering_t *numbering, cs_matrix_fill_type_t fill_type, int ed_flag, const char *func_name)
Definition: cs_matrix.c:5566
const cs_real_t * cs_matrix_get_diagonal(const cs_matrix_t *matrix)
Definition: cs_matrix.c:5042
Definition: cs_matrix.h:56
Definition: cs_matrix.h:69
cs_matrix_type_t cs_matrix_variant_type(const cs_matrix_variant_t *mv)
Definition: cs_matrix.c:5635
void cs_matrix_vector_multiply_nosync(const cs_matrix_t *matrix, const cs_real_t *x, cs_real_t *restrict y)
Definition: cs_matrix.c:5172
Definition: cs_numbering.h:61
struct _cs_matrix_structure_t cs_matrix_structure_t
Definition: cs_matrix.h:82
cs_matrix_fill_type_t
Definition: cs_matrix.h:66