Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 437226b8 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#984 Clarify documentation of SetValues() for matrices.

parent 1bbb9e23
......@@ -315,11 +315,17 @@ namespace HappyHeart
/*!
* \brief Add or modify values inside a Petsc matrix.
*
* \note Petsc documentation says you should use this over MatSetValue, but usage is actually not that
* wide: you actually define here a block of values. So for instance you choose \a row_indexing = { 1, 2 }
* and \a col_indexing = { 3, 5 }, you modify the four values (1, 3), (1, 5), (2, 3), (2, 5)... (which
* might fail if some of it are actually not non zero values!)
* To my knowledge there are no way to modify just (1, 3) and (2, 5) in one call! I skimmed a bit through
* petsc-user help list, and they seem to suggest MatSetValues should be called for one row at a time.
*
* \warning Assembly() must be called afterwards!
*
* \param[in] row_indexing Program-wise index of the rows which values will be set.
* \param[in] column_indexing Program-wise index of the columns which values will be set.
* Should be the same size as \a row_indexing.
* \param[in] values Values to put in the matrix. This array should be the same size as \a row_indexing
* x \a column_indexing: it is a block of values that is actually introduced!
* \param [in] insertOrAppend Petsc ADD_VALUES or INSERT_VALUES (see Petsc documentation).
......@@ -352,7 +358,8 @@ namespace HappyHeart
*
* \warning Assembly() must be called afterwards!
*
* As noted in Petsc manual pages, if several values the SetValues() method should be preferred.
* As noted in Petsc manual pages, if several values the SetValues() method should be preferred;
* however see \a SetValues() documentation that specify the cases in which it can be applied.
*
* \param[in] row_index Index of the row which value will be set.
* \param[in] column_index Index of the column which value will be set.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment