mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-23 07:53:29 -06:00
Refine description of csrmatrix_new_elms_pushback()
While here, tighten the distinction between <CODE> and non-<CODE> mark-up.
This commit is contained in:
parent
469ddb0468
commit
1256fb4389
@ -58,9 +58,9 @@ struct CSRMatrix
|
|||||||
*
|
*
|
||||||
* \return Allocated matrix structure with allocated row pointers and
|
* \return Allocated matrix structure with allocated row pointers and
|
||||||
* valid @c m field. The row pointer elements are initialised all
|
* valid @c m field. The row pointer elements are initialised all
|
||||||
* zero to simplify the non-zero element counting procedure. The @c
|
* zero to simplify the non-zero element counting procedure. The
|
||||||
* ja and @c sa fields are NULL. This function returns NULL in case
|
* @c ja and @c sa fields are @c NULL. This function returns @c NULL
|
||||||
* of allocation failure.
|
* in case of allocation failure.
|
||||||
*/
|
*/
|
||||||
struct CSRMatrix *
|
struct CSRMatrix *
|
||||||
csrmatrix_new_count_nnz(size_t m);
|
csrmatrix_new_count_nnz(size_t m);
|
||||||
@ -83,7 +83,7 @@ csrmatrix_new_count_nnz(size_t m);
|
|||||||
* \param[in] nnz Number of structural non-zeros.
|
* \param[in] nnz Number of structural non-zeros.
|
||||||
*
|
*
|
||||||
* \return Allocated matrix structure and constituent element arrays.
|
* \return Allocated matrix structure and constituent element arrays.
|
||||||
* NULL in case of allocation failure.
|
* @c NULL in case of allocation failure.
|
||||||
*/
|
*/
|
||||||
struct CSRMatrix *
|
struct CSRMatrix *
|
||||||
csrmatrix_new_known_nnz(size_t m, size_t nnz);
|
csrmatrix_new_known_nnz(size_t m, size_t nnz);
|
||||||
@ -98,17 +98,12 @@ csrmatrix_new_known_nnz(size_t m, size_t nnz);
|
|||||||
* csrmatrix_delete() function.
|
* csrmatrix_delete() function.
|
||||||
*
|
*
|
||||||
* This function assumes that, on input, the total number of
|
* This function assumes that, on input, the total number of
|
||||||
* structurally non-zero elements of row @c i are stored in @c
|
* structurally non-zero elements of row @c i are stored in
|
||||||
* A->ia[i+1] for all <CODE>i = 0, ..., A->m - 1</CODE> and that
|
* <CODE>A->ia[i+1]</CODE> for all <CODE>i = 0, ..., A->m - 1</CODE>
|
||||||
* <CODE>A->ia[0] == 0</CODE>. If successful, then on output the row
|
* and that <CODE>A->ia[0] == 0</CODE>. If successful, then on output
|
||||||
* pointers are valid. If not, then the @c A->ja and @c A->sa arrays
|
* the row \em end pointers <CODE>A->ia[i+1]</CODE> are positioned at
|
||||||
* remain unallocated.
|
* the \em start of the corresponding rows. If not, then the
|
||||||
*
|
* <CODE>A->ja</CODE> and <CODE>A->sa</CODE> arrays remain unallocated.
|
||||||
* Following a successful call to csmatrix_new_elms_pushback(), the
|
|
||||||
* entire matrix structure (sparsity pattern) is structurally
|
|
||||||
* consistent, but the contents of the @c ja and @c sa arrays is
|
|
||||||
* undefined and must be set prior to using the matrix in, e.g., a
|
|
||||||
* pressure system solve.
|
|
||||||
*
|
*
|
||||||
* \param[in,out] A Matrix.
|
* \param[in,out] A Matrix.
|
||||||
*
|
*
|
||||||
@ -157,9 +152,9 @@ csrmatrix_sortrows(struct CSRMatrix *A);
|
|||||||
* Dispose of memory resources obtained through prior calls to
|
* Dispose of memory resources obtained through prior calls to
|
||||||
* allocation routines.
|
* allocation routines.
|
||||||
*
|
*
|
||||||
* \param[in] A Matrix obtained from csrmatrix_new_count_nnz() +
|
* \param[in,out] A Matrix obtained from csrmatrix_new_count_nnz() +
|
||||||
* csrmatrix_new_elms_pushback() or
|
* csrmatrix_new_elms_pushback() or
|
||||||
* csrmatrix_new_known_nnz().
|
* csrmatrix_new_known_nnz().
|
||||||
*
|
*
|
||||||
* The pointer @c A is invalid following a call to csrmatrix_delete().
|
* The pointer @c A is invalid following a call to csrmatrix_delete().
|
||||||
*/
|
*/
|
||||||
@ -212,9 +207,9 @@ csrmatrix_write(const struct CSRMatrix *A, const char *fn);
|
|||||||
* facilitates simple processing through the @c spconvert function in
|
* facilitates simple processing through the @c spconvert function in
|
||||||
* MATLAB© or Octave.
|
* MATLAB© or Octave.
|
||||||
*
|
*
|
||||||
* \param[in] A Matrix.
|
* \param[in] A Matrix.
|
||||||
* \param[in] fp Open (text) stream to which matrix contents will be
|
* \param[in,out] fp Open (text) stream to which matrix contents
|
||||||
* output.
|
* will be output.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
csrmatrix_write_stream(const struct CSRMatrix *A, FILE *fp);
|
csrmatrix_write_stream(const struct CSRMatrix *A, FILE *fp);
|
||||||
@ -223,8 +218,8 @@ csrmatrix_write_stream(const struct CSRMatrix *A, FILE *fp);
|
|||||||
/**
|
/**
|
||||||
* Print vector to file.
|
* Print vector to file.
|
||||||
*
|
*
|
||||||
* Elements are printed with one line (separated by '\n') per vector
|
* Elements are printed with one line (separated by <CODE>'\n'</CODE>)
|
||||||
* element.
|
* per vector element.
|
||||||
*
|
*
|
||||||
* This function is implemented in terms of vector_write_stream().
|
* This function is implemented in terms of vector_write_stream().
|
||||||
*
|
*
|
||||||
@ -239,13 +234,13 @@ vector_write(size_t n, const double *v, const char *fn);
|
|||||||
/**
|
/**
|
||||||
* Print vector to stream.
|
* Print vector to stream.
|
||||||
*
|
*
|
||||||
* Elements are printed with one line (separated by '\n') per vector
|
* Elements are printed with one line (separated by <CODE>'\n'</CODE>)
|
||||||
* element.
|
* per vector element.
|
||||||
*
|
*
|
||||||
* \param[in] n Number of vector elements.
|
* \param[in] n Number of vector elements.
|
||||||
* \param[in] v Vector.
|
* \param[in] v Vector.
|
||||||
* \param[in] fp Open (text) stream to which vector contents will be
|
* \param[in,out] fp Open (text) stream to which vector contents will be
|
||||||
* output.
|
* output.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
vector_write_stream(size_t n, const double *v, FILE *fp);
|
vector_write_stream(size_t n, const double *v, FILE *fp);
|
||||||
|
Loading…
Reference in New Issue
Block a user