8.3
general documentation
cs_matrix_assembler.h
Go to the documentation of this file.
1#ifndef __CS_MATRIX_ASSEMBLER_H__
2#define __CS_MATRIX_ASSEMBLER_H__
3
4/*============================================================================
5 * Incremental or general construction of matrix.
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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_log.h"
38
39/*----------------------------------------------------------------------------*/
40
42
43/*============================================================================
44 * Macro definitions
45 *============================================================================*/
46
51#define CS_MATRIX_DISTANT_ROW_USE_COL_IDX (1 << 0)
52#define CS_MATRIX_DISTANT_ROW_USE_COL_G_ID (1 << 1)
53#define CS_MATRIX_EXTERNAL_HALO (1 << 2)
54
55/*============================================================================
56 * Type definitions
57 *============================================================================*/
58
61typedef struct _cs_matrix_assembler_t cs_matrix_assembler_t;
62
65typedef struct _cs_matrix_assembler_values_t cs_matrix_assembler_values_t;
66
67/*----------------------------------------------------------------------------*/
81/*----------------------------------------------------------------------------*/
82
83typedef void
85 cs_lnum_t db_size,
86 cs_lnum_t eb_size);
87
88/*----------------------------------------------------------------------------*/
113/*----------------------------------------------------------------------------*/
114
115typedef void
117 cs_lnum_t n,
118 cs_lnum_t stride,
119 const cs_lnum_t row_id[],
120 const cs_lnum_t col_idx[],
121 const cs_real_t val[]);
122
123/*----------------------------------------------------------------------------*/
145/*----------------------------------------------------------------------------*/
146
147typedef void
149 cs_lnum_t n,
150 cs_lnum_t stride,
151 const cs_gnum_t row_g_id[],
152 const cs_gnum_t col_g_id[],
153 const cs_real_t val[]);
154
155/*----------------------------------------------------------------------------*/
166/*----------------------------------------------------------------------------*/
167
168typedef void
170
171/*----------------------------------------------------------------------------*/
183/*----------------------------------------------------------------------------*/
184
185typedef void
186(cs_matrix_assembler_values_end_t) (void *matrix);
187
188/*============================================================================
189 * Global variables
190 *============================================================================*/
191
192/*=============================================================================
193 * Public function prototypes
194 *============================================================================*/
195
196/*----------------------------------------------------------------------------*/
197/*
198 * \brief Create a matrix assembler structure.
199 *
200 * The associated matrix structure data will initially be empty, though
201 * the range of rows associated with the current rank must be defined
202 * immediately.
203 *
204 * \param[in] l_range global id range [min, max[ for local rank
205 * \param[in] separate_diag if true, diagonal terms are handled separately
206 *
207 * \return pointer to created matrix assembler structure
208 */
209/*----------------------------------------------------------------------------*/
210
213 bool separate_diag);
214
215/*----------------------------------------------------------------------------*/
216/*
217 * \brief Create a matrix assembler structure based on a given connectivity
218 * and associated halo structure.
219 *
220 * The assembler may not be later modified when built this way.
221 *
222 * The connectivity arrays and halo will be shared by the caller, so their
223 * life cycle must be at least as long as the matrix assembler structure.
224 *
225 * \param[in] n_rows number fo local rows
226 * \param[in] separate_diag if true, diagonal terms are handled separately
227 * \param[in] row_idx matrix row index
228 * \param[in] col_id matrix column indexes
229 * \param[in] halo associated halo structure
230 *
231 * \return pointer to created matrix assembler structure
232 */
233/*----------------------------------------------------------------------------*/
234
237 bool separate_diag,
238 const cs_lnum_t row_idx[],
239 const cs_lnum_t col_id[],
240 const cs_halo_t *halo);
241
242/*----------------------------------------------------------------------------*/
243/*
244 * \brief Destroy a matrix assembler structure.
245 *
246 * \param[in, out] ma pointer to matrix assembler structure pointer
247 */
248/*----------------------------------------------------------------------------*/
249
250void
252
253/*----------------------------------------------------------------------------*/
254/*
255 * \brief Compute internal structures required by a matrix assembler.
256 *
257 * The associated vector halo is also computed at this stage.
258 *
259 * \param[in, out] ma pointer to matrix assembler structure
260 *
261 * This function should be called by a single thread for a given assembler.
262 */
263/*----------------------------------------------------------------------------*/
264
265void
267
268/*----------------------------------------------------------------------------*/
269/*
270 * \brief Set option flags for a given matrix assembler structure.
271 *
272 * When used, this function should be called before defining entries
273 * (in case of future option additions) and in any case before computing
274 * the final structure.
275 *
276 * Flags are defined as a sum (bitwise or) of constants, described below:
277 * - \ref CS_MATRIX_DISTANT_ROW_USE_COL_IDX indicates that column indexes
278 * matching distant row data are computed and maintained, so the
279 * associated coefficient contributions can be added more efficiently.
280 * - \ref CS_MATRIX_DISTANT_ROW_USE_COL_G_ID indicates that columns
281 * global ids matching distant row data are maintained directly,
282 * so no lookup to a global id description of matrix columns is needed;
283 * this option is useful only when using an external library allowing
284 * incremental setting or accumulation of coefficients using global
285 * column ids, such as with PETSc's MatSetValues. When building matrices
286 * locally first (which includes most cases, whether internal matrices,
287 * or using library conversion or import functions such as PETSc's
288 * MatCreateMPIAIJWithArrays) this is slightly less efficient, as
289 * column ids will need to be matched to each row's columns a second
290 * time for those (exchanged) coefficients.
291 * - \ref CS_MATRIX_EXTERNAL_HALO indicates that we do not need to
292 * build an associated halo structure, as it will be built externally
293 * (i.e. by an external library such as PETSc, HYPRE, ...) using its
294 * own equivalent structures.
295 *
296 * \param[in, out] ma pointer to matrix assembler structure
297 * \param[in] flags sum of matrix assembler flag constants
298 * (bitwise or)
299 */
300/*----------------------------------------------------------------------------*/
301
302void
304 int flags);
305
306/*----------------------------------------------------------------------------*/
307/*
308 * \brief Return the option flags for a given matrix assembler structure.
309 *
310 * Flags are defined as a sum (bitwise or) of constants, described in
311 * \ref cs_matrix_assembler_set_options.
312 *
313 * \param[in] ma pointer to matrix assembler structure
314 *
315 * \return option flags (sum of integer constants) used y this structure
316 */
317/*----------------------------------------------------------------------------*/
318
319int
321
322/*----------------------------------------------------------------------------*/
323/*
324 * \brief Add entries to a matrix assembler structure.
325 *
326 * This function should be called by a single thread for a given assembler.
327 *
328 * \param[in, out] ma pointer to matrix assembler structure
329 * \param[in] n number of entries
330 * \param[in] col_g_id global column ids associated with entries
331 * \param[in] row_g_id global row ids associated with entries
332 */
333/*----------------------------------------------------------------------------*/
334
335void
337 cs_lnum_t n,
338 const cs_gnum_t row_g_id[],
339 const cs_gnum_t col_g_id[]);
340
341
342#if defined(HAVE_MPI)
343
344/*----------------------------------------------------------------------------*/
345/*
346 * \brief Assign specific MPI communicator to matrix assembler.
347 *
348 * This must be called before \ref cs_matrix_assembler_compute.
349 *
350 * \param[in, out] ma pointer to matrix assembler structure
351 * \param[in] comm assigned MPI communicator
352 */
353/*----------------------------------------------------------------------------*/
354
355void
356cs_matrix_assembler_set_comm(cs_matrix_assembler_t *ma,
357 MPI_Comm comm);
358
359#endif /* HAVE_MPI */
360
361/*----------------------------------------------------------------------------*/
362/*
363 * \brief Return a pointer to local global row range associated with a
364 * matrix assembler.
365 *
366 * \param[in] ma pointer to matrix assembler structure
367 *
368 * \return pointer to local range
369 */
370/*----------------------------------------------------------------------------*/
371
372const cs_gnum_t *
374
375/*----------------------------------------------------------------------------*/
376/*
377 * \brief Return a pointer to the halo structure associated with a
378 * matrix assembler.
379 *
380 * \param[in] ma pointer to matrix assembler structure
381 *
382 * \return pointer to halo structure
383 */
384/*----------------------------------------------------------------------------*/
385
386const cs_halo_t *
388
389/*----------------------------------------------------------------------------*/
390/*
391 * \brief Indicate if the matrix assembler is based on a separate diagonal.
392 *
393 * \param[in] ma pointer to matrix assembler structure
394 *
395 * \return true if the associated structure has a separate diagonal,
396 * false otherwise
397 */
398/*----------------------------------------------------------------------------*/
399
400bool
402
403/*----------------------------------------------------------------------------*/
404/*
405 * \brief Return the number of rows associated with a matrix assembler.
406 *
407 * \param[in] ma pointer to matrix assembler structure
408 *
409 * \return number of rows associated with matrix assembler
410 */
411/*----------------------------------------------------------------------------*/
412
415
416/*----------------------------------------------------------------------------*/
417/*
418 * \brief Return the global number of rows associated with a matrix assembler.
419 *
420 * \param[in] ma pointer to matrix assembler structure
421 *
422 * \return number of rows associated with matrix assembler
423 */
424/*----------------------------------------------------------------------------*/
425
428
429/*----------------------------------------------------------------------------*/
430/*
431 * \brief Return the number of columns associated with a matrix assembler.
432 *
433 * \param[in] ma pointer to matrix assembler structure
434 *
435 * \return number of columns associated with matrix assembler
436 */
437/*----------------------------------------------------------------------------*/
438
441
442/*----------------------------------------------------------------------------*/
443/*
444 * \brief Return a row index associated with a matrix assembler.
445 *
446 * This index is a CSR type index relative to all columns, including or
447 * excluding the diagonal depending on the \c separate_diag option used
448 * when creating the matrix assembler. The matching column ids can be
449 * obtained using \ref cs_matrix_assembler_get_col_ids.
450 *
451 * \warning the returned index is valid only as long as the matrix assembly
452 * structure exists.
453 *
454 * \param[in] ma pointer to matrix assembler structure
455 *
456 * \return pointer to matrix structure row index
457 */
458/*----------------------------------------------------------------------------*/
459
460const cs_lnum_t *
462
463/*----------------------------------------------------------------------------*/
464/*
465 * \brief Return a column ids associated with a matrix assembler.
466 *
467 * These ids relative to all columns of successive rows, with columns
468 * ordered by local id, so local columns appear first, distant columns
469 * after. Depending on the \c separate_diag option used when creating the
470 * matrix assembler, the columns may include the diagonal or not.
471 * The matching index can be obtained using
472 * \ref cs_matrix_assembler_get_row_index.
473 *
474 * \warning the returned index is valid only as long as the matrix assembly
475 * structure exists.
476 *
477 * \param[in] ma pointer to matrix assembler structure
478 *
479 * \return pointer to matrix structure row index
480 */
481/*----------------------------------------------------------------------------*/
482
483const cs_lnum_t *
485
486/*----------------------------------------------------------------------------*/
487/*
488 * \brief Return info on the number of neighbor ranks a matrix assembler
489 * may communicate with.
490 *
491 * \param[in] ma pointer to matrix assembler structure
492 * \param[out] rc rank counts; the 4 values are:
493 * - 0 number of communicating ranks for vector update (halo)
494 * - 1 number of communicating ranks for matrix assembly
495 * - 2 maximum number of communicating ranks for halo
496 * construction (assumed ranks algorithm)
497 * - 3 maximum number of communicating ranks for matrix
498 * assembly determination (assumed ranks algorithm)
499 */
500/*----------------------------------------------------------------------------*/
501
502void
504 int rc[4]);
505
506/*----------------------------------------------------------------------------*/
507/*
508 * \brief Log rank counts for a given matrix assembler.
509 *
510 * \param[in] ma pointer to matrix assembler structure
511 * \param[in] log_id log type
512 * \param[in] name name of this assembler
513 */
514/*----------------------------------------------------------------------------*/
515
516void
518 cs_log_t log_id,
519 const char *name);
520
521/*----------------------------------------------------------------------------*/
522/*
523 * \brief Create and initialize a matrix assembler values structure.
524 *
525 * The associated values will initially be set to zero.
526 *
527 * This is a low-level function, which should be called by a simpler
528 * function (\ref cs_matrix_assembler_values_init) which provides
529 * the necessary function pointers.
530 *
531 * \warning The matrix pointer must point to valid data when the selection
532 * function is called, so the life cycle of the data pointed to
533 * should be at least as long as that of the assembler values
534 * structure. In a similar manner, the life cycle of the associated
535 * matrix assembler must also be at least as long as that
536 * of the assembler values structure.
537 *
538 * \param[in] ma associated matrix assembly structure
539 * \param[in] sep_diag true if diagonal terms are stored separately
540 * \param[in] db_size diagonal block sizes
541 * \param[in] eb_size extra-diagonal block sizes
542 * \param[in, out] matrix untyped pointer to matrix description structure
543 * \param[in] init pointer to matrix coefficients
544 * initialization function
545 * \param[in] add pointer to matrix coefficients addition from
546 * local ids function
547 * \param[in] add_g pointer to matrix coefficients addition from
548 * global ids function
549 * \param[in] begin pointer to matrix coefficients assembly
550 * start function (optional)
551 * \param[in] end pointer to matrix coefficients assembly
552 * end function (optional)
553 *
554 * \return pointer to initialized matrix assembler structure;
555 */
556/*----------------------------------------------------------------------------*/
557
560 bool sep_diag,
561 cs_lnum_t db_size,
562 cs_lnum_t eb_size,
563 void *matrix,
569
570/*----------------------------------------------------------------------------*/
571/*
572 * \brief Finalize matrix assembler values structure.
573 *
574 * When this function returns, the assembler values structure has been
575 * destroyed, and the associated matrix is fully assembled (i.e. ready to
576 * use).
577 *
578 * \param[in, out] mav pointer to matrix assembler values structure pointer
579 */
580/*----------------------------------------------------------------------------*/
581
582void
584
585/*----------------------------------------------------------------------------*/
586/*
587 * \brief Add values to a matrix assembler values structure using local
588 * row and column ids.
589 *
590 * If the matching matrix coefficients use a block structure, the
591 * values passed to this function should use the same block size.
592 *
593 * Note also that if the matrix has different diagonal and extradiagonal
594 * block sizes, separate calls to this function should be used for both
595 * types of coefficients; in addition, in this case, diagonal coefficients
596 * should only be provided by the owning rank (this also impacts how
597 * the associated matrix assembler structure is defined).
598 *
599 * This function may be called by different threads, as long those threads
600 * do not add contributions to the same rows (assuming caution is taken
601 * in the case of external libraries so that their builder functions
602 * have the same property).
603 *
604 * \param[in, out] mav pointer to matrix assembler values structure
605 * \param[in] n number of entries
606 * \param[in] col_id local column ids associated with entries
607 * \param[in] row_id local row ids associated with entries
608 * \param[in] val values associated with entries
609 */
610/*----------------------------------------------------------------------------*/
611
612void
614 cs_lnum_t n,
615 const cs_lnum_t row_id[],
616 const cs_lnum_t col_id[],
617 const cs_real_t val[]);
618
619/*----------------------------------------------------------------------------*/
620/*
621 * \brief Add values to a matrix assembler values structure using global
622 * row and column ids.
623 *
624 * If the matching matrix coefficients use a block structure, the
625 * values passed to this function should use the same block size.
626 *
627 * Note also that if the matrix has different diagonal and extradiagonal
628 * block sizes, separate calls to this function should be used for both
629 * types of coefficients; in addition, in this case, diagonal coefficients
630 * should only be provided by the owning rank (this also impacts how
631 * the associated matrix assembler structure is defined).
632 *
633 * This function may be called by different threads, as long those threads
634 * do not add contributions to the same rows (assuming caution is taken
635 * in the case of external libraries so that their builder functions
636 * have the same property).
637 *
638 * \param[in, out] mav pointer to matrix assembler values structure
639 * \param[in] n number of entries
640 * \param[in] col_g_id global column ids associated with entries
641 * \param[in] row_g_id global row ids associated with entries
642 * \param[in] val values associated with entries
643 */
644/*----------------------------------------------------------------------------*/
645
646void
648 cs_lnum_t n,
649 const cs_gnum_t row_g_id[],
650 const cs_gnum_t col_g_id[],
651 const cs_real_t val[]);
652
653/*----------------------------------------------------------------------------*/
654/*
655 * \brief Start assembly of matrix values structure.
656 *
657 * The call to this function is always optional, and indicates that assembly
658 * may begin. Calling it before \ref cs_matrix_assembler_values_finalize
659 * may be useful when the underlying libraries can overlap communication
660 * (or other operations such as matrix trasformation) and computation.
661 *
662 * \remark When values have been added to rows belonging to another rank,
663 * communication will occur here. Splitting this function could
664 * add another opportunity for overlap of computation and
665 * communication, but is not done as of 2016, as it would add
666 * complexity, with probably limited returns, as the effective
667 * asynchonous progress of MPI libraries is usually limited.
668 *
669 * \param[in, out] mav pointer to matrix assembler data structure
670 */
671/*----------------------------------------------------------------------------*/
672
673void
675
676/*----------------------------------------------------------------------------*/
677
679
680#endif /* __CS_MATRIX_ASSEMBLER_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
uint64_t cs_gnum_t
global mesh entity number
Definition: cs_defs.h:325
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
cs_log_t
Definition: cs_log.h:48
void cs_matrix_assembler_log_rank_counts(const cs_matrix_assembler_t *ma, cs_log_t log_id, const char *name)
Log rank counts for a given matrix assembler.
Definition: cs_matrix_assembler.cpp:2979
cs_matrix_assembler_t * cs_matrix_assembler_create_from_shared(cs_lnum_t n_rows, bool separate_diag, const cs_lnum_t row_idx[], const cs_lnum_t col_id[], const cs_halo_t *halo)
Create a matrix assembler structure based on a given connectivity and associated halo structure.
Definition: cs_matrix_assembler.cpp:2456
const cs_lnum_t * cs_matrix_assembler_get_row_index(const cs_matrix_assembler_t *ma)
Return a row index associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2903
cs_matrix_assembler_t * cs_matrix_assembler_create(const cs_gnum_t l_range[2], bool separate_diag)
Create a matrix assembler structure.
Definition: cs_matrix_assembler.cpp:2369
const cs_lnum_t * cs_matrix_assembler_get_col_ids(const cs_matrix_assembler_t *ma)
Return a column ids associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2929
struct _cs_matrix_assembler_t cs_matrix_assembler_t
Definition: cs_matrix_assembler.h:61
const cs_gnum_t * cs_matrix_assembler_get_l_range(const cs_matrix_assembler_t *ma)
Return a pointer to local global row range associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2793
void cs_matrix_assembler_values_add_g(cs_matrix_assembler_values_t *mav, cs_lnum_t n, const cs_gnum_t row_g_id[], const cs_gnum_t col_g_id[], const cs_real_t val[])
Add values to a matrix assembler values structure using global row and column ids.
Definition: cs_matrix_assembler.cpp:3279
bool cs_matrix_assembler_get_separate_diag(const cs_matrix_assembler_t *ma)
Indicate if the matrix assembler is based on a separate diagonal.
Definition: cs_matrix_assembler.cpp:2827
void cs_matrix_assembler_set_options(cs_matrix_assembler_t *ma, int flags)
Set option flags for a given matrix assembler structure.
Definition: cs_matrix_assembler.cpp:2631
void() cs_matrix_assembler_values_end_t(void *matrix)
Function pointer to complete the final assembly of matrix coefficients.
Definition: cs_matrix_assembler.h:186
void cs_matrix_assembler_compute(cs_matrix_assembler_t *ma)
Compute internal structures required by a matrix assembler.
Definition: cs_matrix_assembler.cpp:2737
void() cs_matrix_assembler_values_add_t(void *matrix, cs_lnum_t n, cs_lnum_t stride, const cs_lnum_t row_id[], const cs_lnum_t col_idx[], const cs_real_t val[])
Function pointer for addition to matrix coefficients using local row ids and column indexes.
Definition: cs_matrix_assembler.h:116
cs_matrix_assembler_values_t * cs_matrix_assembler_values_create(const cs_matrix_assembler_t *ma, bool sep_diag, cs_lnum_t db_size, cs_lnum_t eb_size, void *matrix, cs_matrix_assembler_values_init_t *init, cs_matrix_assembler_values_add_t *add, cs_matrix_assembler_values_add_g_t *add_g, cs_matrix_assembler_values_begin_t *begin, cs_matrix_assembler_values_end_t *end)
Create and initialize a matrix assembler values structure.
Definition: cs_matrix_assembler.cpp:3052
cs_lnum_t cs_matrix_assembler_get_n_rows(const cs_matrix_assembler_t *ma)
Return the number of rows associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2843
void cs_matrix_assembler_values_done(cs_matrix_assembler_values_t *mav)
Start assembly of matrix values structure.
Definition: cs_matrix_assembler.cpp:3513
cs_lnum_t cs_matrix_assembler_get_n_columns(const cs_matrix_assembler_t *ma)
Return the number of columns associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2875
int cs_matrix_assembler_get_options(const cs_matrix_assembler_t *ma)
Return the option flags for a given matrix assembler structure.
Definition: cs_matrix_assembler.cpp:2657
cs_gnum_t cs_matrix_assembler_get_n_g_rows(const cs_matrix_assembler_t *ma)
Return the global number of rows associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2859
void cs_matrix_assembler_get_rank_counts(const cs_matrix_assembler_t *ma, int rc[4])
Return info on the number of neighbor ranks a matrix assembler may communicate with.
Definition: cs_matrix_assembler.cpp:2951
void() cs_matrix_assembler_values_add_g_t(void *matrix, cs_lnum_t n, cs_lnum_t stride, const cs_gnum_t row_g_id[], const cs_gnum_t col_g_id[], const cs_real_t val[])
Function pointer for addition to matrix coefficients using global row ids and column indexes.
Definition: cs_matrix_assembler.h:148
void cs_matrix_assembler_destroy(cs_matrix_assembler_t **ma)
Destroy a matrix assembler structure.
Definition: cs_matrix_assembler.cpp:2558
void cs_matrix_assembler_values_finalize(cs_matrix_assembler_values_t **mav)
Finalize matrix assembler values structure.
Definition: cs_matrix_assembler.cpp:3122
struct _cs_matrix_assembler_values_t cs_matrix_assembler_values_t
Definition: cs_matrix_assembler.h:65
void cs_matrix_assembler_add_g_ids(cs_matrix_assembler_t *ma, cs_lnum_t n, const cs_gnum_t row_g_id[], const cs_gnum_t col_g_id[])
Add entries to a matrix assembler structure.
Definition: cs_matrix_assembler.cpp:2676
const cs_halo_t * cs_matrix_assembler_get_halo(const cs_matrix_assembler_t *ma)
Return a pointer to the halo structure associated with a matrix assembler.
Definition: cs_matrix_assembler.cpp:2810
void cs_matrix_assembler_values_add(cs_matrix_assembler_values_t *mav, cs_lnum_t n, const cs_lnum_t row_id[], const cs_lnum_t col_id[], const cs_real_t val[])
Add values to a matrix assembler values structure using local row and column ids.
Definition: cs_matrix_assembler.cpp:3169
void() cs_matrix_assembler_values_init_t(void *matrix, cs_lnum_t db_size, cs_lnum_t eb_size)
Function pointer for initialization of matrix coefficients using local row ids and column indexes.
Definition: cs_matrix_assembler.h:84
void() cs_matrix_assembler_values_begin_t(void *matrix)
Function pointer to start the final assembly of matrix coefficients.
Definition: cs_matrix_assembler.h:169
Definition: cs_halo.h:77