This commit deals with the variant of the function that takes vectors.
reference operator[] (const size_type i);
/**
- * A collective get operation: instead of getting individual elements of a
- * vector, this function allows to get a whole set of elements at once. The
+ * Instead of getting individual elements of a vector via operator(),
+ * this function allows getting a whole set of elements at once. The
* indices of the elements to be read are stated in the first argument, the
* corresponding values are returned in the second.
+ *
+ * If the current vector is called @p v, then this function is the equivalent
+ * to the code
+ * @code
+ * for (unsigned int i=0; i<indices.size(); ++i)
+ * values[i] = v[indices[i]];
+ * @endcode
+ *
+ * @pre The sizes of the @p indices and @p values arrays must be identical.
*/
template <typename OtherNumber>
void extract_subvector_to (const std::vector<size_type> &indices,
Number &local_element (const size_type local_index);
/**
- * A collective get operation: instead of getting individual elements of
- * a vector, this function allows to get a whole set of elements at
- * once. The indices of the elements to be read are stated in the first
- * argument, the corresponding values are returned in the second.
+ * Instead of getting individual elements of a vector via operator(),
+ * this function allows getting a whole set of elements at once. The
+ * indices of the elements to be read are stated in the first argument, the
+ * corresponding values are returned in the second.
+ *
+ * If the current vector is called @p v, then this function is the equivalent
+ * to the code
+ * @code
+ * for (unsigned int i=0; i<indices.size(); ++i)
+ * values[i] = v[indices[i]];
+ * @endcode
+ *
+ * @pre The sizes of the @p indices and @p values arrays must be identical.
*/
template <typename OtherNumber>
void extract_subvector_to (const std::vector<size_type> &indices,
const std::vector<PetscScalar> &values);
/**
- * A collective get operation: instead of getting individual elements of a
- * vector, this function allows to get a whole set of elements at once.
- * The indices of the elements to be read are stated in the first
- * argument, the corresponding values are returned in the second.
+ * Instead of getting individual elements of a vector via operator(),
+ * this function allows getting a whole set of elements at once. The
+ * indices of the elements to be read are stated in the first argument, the
+ * corresponding values are returned in the second.
+ *
+ * If the current vector is called @p v, then this function is the equivalent
+ * to the code
+ * @code
+ * for (unsigned int i=0; i<indices.size(); ++i)
+ * values[i] = v[indices[i]];
+ * @endcode
+ *
+ * @pre The sizes of the @p indices and @p values arrays must be identical.
*/
void extract_subvector_to (const std::vector<size_type> &indices,
std::vector<PetscScalar> &values) const;
Number &operator [] (const size_type global_index);
/**
- * Instead of getting individual elements of a vector, this function
- * allows to get a whole set of elements at once. The indices of the
- * elements to be read are stated in the first argument, the corresponding
- * values are returned in the second.
+ * Instead of getting individual elements of a vector via operator(),
+ * this function allows getting a whole set of elements at once. The
+ * indices of the elements to be read are stated in the first argument, the
+ * corresponding values are returned in the second.
+ *
+ * If the current vector is called @p v, then this function is the equivalent
+ * to the code
+ * @code
+ * for (unsigned int i=0; i<indices.size(); ++i)
+ * values[i] = v[indices[i]];
+ * @endcode
+ *
+ * @pre The sizes of the @p indices and @p values arrays must be identical.
*/
template <typename Number2>
void extract_subvector_to (const std::vector<size_type> &indices,
*
* This initialization routine is useful in cases where the operator to be
* preconditioned is not a TrilinosWrappers::SparseMatrix object but still
- * allows to get a copy of the entries in each of the locally owned matrix
+ * allows getting a copy of the entries in each of the locally owned matrix
* rows (method ExtractMyRowCopy) and implements a matrix-vector product
* (methods Multiply or Apply). An example are operators which provide
* faster matrix-vector multiplications than possible with matrix entries
operator[] (const size_type index) const;
/**
- * A collective get operation: instead of getting individual elements of a
- * vector, this function allows to get a whole set of elements at once.
- * The indices of the elements to be read are stated in the first
- * argument, the corresponding values are returned in the second.
+ * Instead of getting individual elements of a vector via operator(),
+ * this function allows getting a whole set of elements at once. The
+ * indices of the elements to be read are stated in the first argument, the
+ * corresponding values are returned in the second.
+ *
+ * If the current vector is called @p v, then this function is the equivalent
+ * to the code
+ * @code
+ * for (unsigned int i=0; i<indices.size(); ++i)
+ * values[i] = v[indices[i]];
+ * @endcode
+ *
+ * @pre The sizes of the @p indices and @p values arrays must be identical.
*/
void extract_subvector_to (const std::vector<size_type> &indices,
std::vector<TrilinosScalar> &values) const;
Number &operator[] (const size_type i);
/**
- * A collective get operation: instead of getting individual elements of a
- * vector, this function allows to get a whole set of elements at once. The
+ * Instead of getting individual elements of a vector via operator(),
+ * this function allows getting a whole set of elements at once. The
* indices of the elements to be read are stated in the first argument, the
* corresponding values are returned in the second.
+ *
+ * If the current vector is called @p v, then this function is the equivalent
+ * to the code
+ * @code
+ * for (unsigned int i=0; i<indices.size(); ++i)
+ * values[i] = v[indices[i]];
+ * @endcode
+ *
+ * @pre The sizes of the @p indices and @p values arrays must be identical.
*/
template <typename OtherNumber>
void extract_subvector_to (const std::vector<size_type> &indices,