Re-wrap Doxygen comments introduced in cset 6d9f8b35dd4e.

This commit is contained in:
Bård Skaflestad 2012-06-22 02:07:02 +02:00
parent 3659ca2d68
commit 469ddb0468

View File

@ -48,8 +48,8 @@ struct CSRMatrix
/** /**
* Allocate a matrix structure and corresponding row pointers, * Allocate a matrix structure and corresponding row pointers, @c ia,
* @c ia, sufficiently initialised to support "count and push-back" * sufficiently initialised to support "count and push-back"
* construction scheme. * construction scheme.
* *
* The matrix will be fully formed in csrmatrix_new_elms_pushback(). * The matrix will be fully formed in csrmatrix_new_elms_pushback().
@ -57,10 +57,10 @@ struct CSRMatrix
* \param[in] m Number of matrix rows. * \param[in] m Number of matrix rows.
* *
* \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 zero * valid @c m field. The row pointer elements are initialised all
* to simplify the non-zero element counting procedure. The @c ja and * zero to simplify the non-zero element counting procedure. The @c
* @c sa fields are NULL. This function returns NULL in case of * ja and @c sa fields are NULL. This function returns NULL in case
* allocation failure. * of allocation failure.
*/ */
struct CSRMatrix * struct CSRMatrix *
csrmatrix_new_count_nnz(size_t m); csrmatrix_new_count_nnz(size_t m);
@ -71,13 +71,13 @@ csrmatrix_new_count_nnz(size_t m);
* sparse matrix with a specified number of (structural) non-zero * sparse matrix with a specified number of (structural) non-zero
* elements. * elements.
* *
* The contents of the individual matrix arrays is undefined. In particular, * The contents of the individual matrix arrays is undefined. In
* the sparsity pattern must be constructed through some other, external, * particular, the sparsity pattern must be constructed through some
* means prior to using the matrix in (e.g.,) a global system assembly * other, external, means prior to using the matrix in (e.g.,) a
* process. * global system assembly process.
* *
* The memory resources should be released through the csrmatrix_delete() * The memory resources should be released through the
* function. * csrmatrix_delete() function.
* *
* \param[in] m Number of matrix rows. * \param[in] m Number of matrix rows.
* \param[in] nnz Number of structural non-zeros. * \param[in] nnz Number of structural non-zeros.
@ -90,27 +90,31 @@ csrmatrix_new_known_nnz(size_t m, size_t nnz);
/** /**
* Set row pointers and allocate column index and matrix element arrays of * Set row pointers and allocate column index and matrix element
* a matrix previous obtained from csrmatrix_new_count_nnz(). * arrays of a matrix previous obtained from
* csrmatrix_new_count_nnz().
* *
* The memory resources should be released through the csrmatrix_delete() * The memory resources should be released through the
* function. * csrmatrix_delete() function.
* *
* This function assumes that, on input, the total number of structurally * This function assumes that, on input, the total number of
* non-zero elements of row @c i are stored in @c A->ia[i+1] for all * structurally non-zero elements of row @c i are stored in @c
* <CODE>i = 0, ..., A->m - 1</CODE> and that <CODE>A->ia[0] == 0</CODE>. * A->ia[i+1] for all <CODE>i = 0, ..., A->m - 1</CODE> and that
* If successful, then on output the row pointers are valid. If not, then * <CODE>A->ia[0] == 0</CODE>. If successful, then on output the row
* the @c A->ja and @c A->sa arrays remain unallocated. * pointers are valid. If not, then the @c A->ja and @c A->sa arrays
* remain unallocated.
* *
* Following a successful call to csmatrix_new_elms_pushback(), the entire * Following a successful call to csmatrix_new_elms_pushback(), the
* matrix structure (sparsity pattern) is structurally consistent, but the * entire matrix structure (sparsity pattern) is structurally
* contents of the @c ja and @c sa arrays is undefined and must be set prior * consistent, but the contents of the @c ja and @c sa arrays is
* to using the matrix in, e.g., a pressure system solve. * 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.
* *
* \return Total number of allocated non-zeros, <CODE>A->nnz == * \return Total number of allocated non-zeros, <CODE>A->nnz ==
* A->ia[A->m]</CODE> if successful and zero in case of allocation failure. * A->ia[A->m]</CODE> if successful and zero in case of allocation
* failure.
*/ */
size_t size_t
csrmatrix_new_elms_pushback(struct CSRMatrix *A); csrmatrix_new_elms_pushback(struct CSRMatrix *A);
@ -135,8 +139,9 @@ csrmatrix_elm_index(int i, int j, const struct CSRMatrix *A);
* Sort column indices within each matrix row in ascending order. * Sort column indices within each matrix row in ascending order.
* *
* The corresponding matrix elements (i.e., @c sa) are not referenced. * The corresponding matrix elements (i.e., @c sa) are not referenced.
* Consequently, following a call to csrmatrix_sortrows(), all relations * Consequently, following a call to csrmatrix_sortrows(), all
* to any pre-existing matrix elements are lost and must be rebuilt. * relations to any pre-existing matrix elements are lost and must be
* rebuilt.
* *
* After a call to csrmatrix_sortrows(), the following relation holds * After a call to csrmatrix_sortrows(), the following relation holds
* <CODE>A->ja[k] < A->ja[k+1]</CODE> for all <CODE>k = A->ia[i], ..., * <CODE>A->ja[k] < A->ja[k+1]</CODE> for all <CODE>k = A->ia[i], ...,
@ -163,8 +168,8 @@ csrmatrix_delete(struct CSRMatrix *A);
/** /**
* Zero all matrix elements, typically in preparation of * Zero all matrix elements, typically in preparation of elemental
* elemental assembly. * assembly.
* *
* \param[in,out] A Matrix for which to zero the elements. * \param[in,out] A Matrix for which to zero the elements.
*/ */
@ -208,7 +213,8 @@ csrmatrix_write(const struct CSRMatrix *A, const char *fn);
* 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 output. * \param[in] fp Open (text) stream to which matrix contents will be
* output.
*/ */
void void
csrmatrix_write_stream(const struct CSRMatrix *A, FILE *fp); csrmatrix_write_stream(const struct CSRMatrix *A, FILE *fp);
@ -217,8 +223,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') * Elements are printed with one line (separated by '\n') per vector
* per vector element. * element.
* *
* This function is implemented in terms of vector_write_stream(). * This function is implemented in terms of vector_write_stream().
* *
@ -233,12 +239,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') * Elements are printed with one line (separated by '\n') per vector
* per vector element. * 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 output. * \param[in] fp Open (text) stream to which vector contents will be
* 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);