From: Matthias Maier Date: Tue, 8 Aug 2017 16:33:53 +0000 (-0500) Subject: Make ConstraintMatrix::ConstraintLine a public member class X-Git-Tag: v9.0.0-rc1~1333^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed7219100a0829a32ac860f16b0187e7b476d396;p=dealii.git Make ConstraintMatrix::ConstraintLine a public member class --- diff --git a/include/deal.II/lac/constraint_matrix.h b/include/deal.II/lac/constraint_matrix.h index adb33df06f..1957cc4a21 100644 --- a/include/deal.II/lac/constraint_matrix.h +++ b/include/deal.II/lac/constraint_matrix.h @@ -1120,6 +1120,64 @@ public: * @} */ + + + /** + * This class represents one line of a constraint matrix. + */ + struct ConstraintLine + { + /** + * A data type in which we store the list of entries that make up the + * homogenous part of a constraint. + */ + typedef std::vector > Entries; + + /** + * Number of this line. Since only very few lines are stored, we can not + * assume a specific order and have to store the line number explicitly. + */ + size_type line; + + /** + * Row numbers and values of the entries in this line. + * + * For the reason why we use a vector instead of a map and the + * consequences thereof, the same applies as what is said for + * ConstraintMatrix::lines. + */ + Entries entries; + + /** + * Value of the inhomogeneity. + */ + double inhomogeneity; + + /** + * This operator is a bit weird and unintuitive: it compares the line + * numbers of two lines. We need this to sort the lines; in fact we could + * do this using a comparison predicate. However, this way, it is easier, + * albeit unintuitive since two lines really have no god-given order + * relation. + */ + bool operator < (const ConstraintLine &) const; + + /** + * This operator is likewise weird: it checks whether the line indices of + * the two operands are equal, irrespective of the fact that the contents + * of the line may be different. + */ + bool operator == (const ConstraintLine &) const; + + /** + * Determine an estimate for the memory consumption (in bytes) of this + * object. + */ + std::size_t memory_consumption () const; + }; + + + /** * Exception * @@ -1227,60 +1285,6 @@ public: private: - /** - * This class represents one line of a constraint matrix. - */ - struct ConstraintLine - { - /** - * A data type in which we store the list of entries that make up the - * homogenous part of a constraint. - */ - typedef std::vector > Entries; - - /** - * Number of this line. Since only very few lines are stored, we can not - * assume a specific order and have to store the line number explicitly. - */ - size_type line; - - /** - * Row numbers and values of the entries in this line. - * - * For the reason why we use a vector instead of a map and the - * consequences thereof, the same applies as what is said for - * ConstraintMatrix::lines. - */ - Entries entries; - - /** - * Value of the inhomogeneity. - */ - double inhomogeneity; - - /** - * This operator is a bit weird and unintuitive: it compares the line - * numbers of two lines. We need this to sort the lines; in fact we could - * do this using a comparison predicate. However, this way, it is easier, - * albeit unintuitive since two lines really have no god-given order - * relation. - */ - bool operator < (const ConstraintLine &) const; - - /** - * This operator is likewise weird: it checks whether the line indices of - * the two operands are equal, irrespective of the fact that the contents - * of the line may be different. - */ - bool operator == (const ConstraintLine &) const; - - /** - * Determine an estimate for the memory consumption (in bytes) of this - * object. - */ - std::size_t memory_consumption () const; - }; - /** * Store the lines of the matrix. Entries are usually appended in an * arbitrary order and insertion into a vector is done best at the end, so