Skip to content

Commit

Permalink
Merge pull request #13199 from bangerth/patch-1
Browse files Browse the repository at this point in the history
Minor edits to the documentation of SparsityPattern.
  • Loading branch information
jppelteret committed Jan 9, 2022
2 parents 0951328 + 5fcce42 commit 25454d0
Showing 1 changed file with 71 additions and 26 deletions.
97 changes: 71 additions & 26 deletions include/deal.II/lac/sparsity_pattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,16 @@ namespace SparsityPatternIterators


/**
* A class that can store which elements of a matrix are nonzero (or, in fact,
* <i>may</i> be nonzero) and for which we have to allocate memory to store
* their values. This class is an example of the "static" type of sparsity
* patters (see
* A class that can store which elements of a matrix are nonzero (or, to be
* precise, <i>may</i> be nonzero) and for which we have to allocate memory to
* store their values. This class is an example of the "static" type of sparsity
* patterns (see
* @ref Sparsity).
* It uses the <a
* href="https://en.wikipedia.org/wiki/Sparse_matrix">compressed row storage
* (CSR)</a> format to store data, and is used as the basis for the
* derived SparsityPattern class and SparseMatrix class.
* derived SparsityPattern class, which is in turn used by the SparseMatrix
* class.
*
* The elements of a SparsityPatternBase, corresponding to the places where
* SparseMatrix objects can store nonzero entries, are stored row-by-row.
Expand Down Expand Up @@ -365,8 +366,10 @@ class SparsityPatternBase : public Subscriptor
*
* Constructors, destructor, functions initializing, copying and filling an
* object.
*
* @{
*/
// @{

/**
* Initialize the matrix empty, that is with no memory allocated. This is
* useful if you want such objects as member variables in other classes. You
Expand Down Expand Up @@ -434,12 +437,15 @@ class SparsityPatternBase : public Subscriptor
void
add(const size_type i, const size_type j);

// @}
/**
* @}
*/

/**
* @name Iterators
*
* @{
*/
// @{

/**
* Iterator starting at the first entry of the matrix. The resulting
Expand Down Expand Up @@ -484,12 +490,15 @@ class SparsityPatternBase : public Subscriptor
end(const size_type r) const;


// @}
/**
* @}
*/

/**
* @name Querying information
*
* @{
*/
// @{

/**
* Test for equality of two SparsityPatterns.
Expand Down Expand Up @@ -574,12 +583,15 @@ class SparsityPatternBase : public Subscriptor
std::size_t
memory_consumption() const;

// @}
/**
* @}
*/

/**
* @name Accessing entries
*
* @{
*/
// @{

/**
* Access to column number field. Return the column number of the
Expand Down Expand Up @@ -618,12 +630,15 @@ class SparsityPatternBase : public Subscriptor
std::pair<size_type, size_type>
matrix_position(const std::size_t global_index) const;

// @}
/**
* @}
*/

/**
* @name Input/Output
*
* @{
*/
// @{

/**
* Print the sparsity of the matrix. The output consists of one line per row
Expand Down Expand Up @@ -692,10 +707,13 @@ class SparsityPatternBase : public Subscriptor
BOOST_SERIALIZATION_SPLIT_MEMBER()
#endif

// @}
/**
* @}
*/

/**
* @addtogroup Exceptions
*
* @{
*/

Expand Down Expand Up @@ -728,7 +746,9 @@ class SparsityPatternBase : public Subscriptor
"The operation you attempted changes the structure of the SparsityPattern "
"and is not possible after compress() has been called.");

// @}
/**
* @}
*/


protected:
Expand Down Expand Up @@ -901,7 +921,10 @@ class SparsityPattern : public SparsityPatternBase
* Constructors, destructor, functions initializing, copying and filling an
* object.
*/
// @{
/**
* @{
*/

/**
* Initialize the matrix empty, that is with no memory allocated. This is
* useful if you want such objects as member variables in other classes. You
Expand Down Expand Up @@ -1163,13 +1186,18 @@ class SparsityPattern : public SparsityPatternBase
ForwardIterator end,
const bool indices_are_sorted = false);

// @}
/**
* @}
*/


/**
* @name Querying information
*/
// @{
/**
* @{
*/

/**
* Test for equality of two SparsityPatterns.
*/
Expand Down Expand Up @@ -1198,11 +1226,16 @@ class SparsityPattern : public SparsityPatternBase
std::size_t
memory_consumption() const;

// @}
/**
* @}
*/

/**
* @name Accessing entries
*
* @{
*/
// @{

/**
* Return the index of the matrix element with row number <tt>i</tt> and
* column number <tt>j</tt>. If the matrix element is not a nonzero one,
Expand All @@ -1228,11 +1261,16 @@ class SparsityPattern : public SparsityPatternBase
size_type
operator()(const size_type i, const size_type j) const;

// @}
/**
* @}
*/

/**
* @name Input/Output
*/
// @{
/**
* @{
*/

/**
* Write the data of this object en bloc to a file. This is done in a binary
Expand Down Expand Up @@ -1293,10 +1331,13 @@ class SparsityPattern : public SparsityPatternBase
BOOST_SERIALIZATION_SPLIT_MEMBER()
#endif

// @}
/**
* @}
*/

/**
* @addtogroup Exceptions
*
* @{
*/
/**
Expand All @@ -1314,7 +1355,9 @@ class SparsityPattern : public SparsityPatternBase
int,
<< "The number of partitions you gave is " << arg1
<< ", but must be greater than zero.");
//@}
/**
* @}
*/
private:
/**
* Is special treatment of diagonals enabled?
Expand All @@ -1341,7 +1384,9 @@ class SparsityPattern : public SparsityPatternBase
};


/*@}*/
/**
* @}
*/
/*---------------------- Inline functions -----------------------------------*/

#ifndef DOXYGEN
Expand Down

0 comments on commit 25454d0

Please sign in to comment.