From: Wolfgang Bangerth Date: Mon, 11 May 1998 16:51:10 +0000 (+0000) Subject: Add #ratio# function. Doc update. X-Git-Tag: v8.0.0~22978 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8caec0bf9b326bb4fa431c85124260b984a1a0e4;p=dealii.git Add #ratio# function. Doc update. git-svn-id: https://svn.dealii.org/trunk@276 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/dvector.h b/deal.II/lac/include/lac/dvector.h index 630503ba4e..02a71a76cb 100644 --- a/deal.II/lac/include/lac/dvector.h +++ b/deal.II/lac/include/lac/dvector.h @@ -166,10 +166,15 @@ class dVector : public VectorBase /** - * Change Dimension.

- * Set dimension to N

- * ! reserved memory for This remains unchanged !

- * on fast==false vector is filled by 0. + * Change the dimension of the vector to + * #N#. The reserved memory for this vector + * remains unchanged, however, to make + * things faster, but this may waste some + * memory, so take this in the back of your + * head. + * + * On #fast==false#, the vector is filled by + * zeros. */ void reinit (const unsigned int N, const bool fast=false); @@ -312,6 +317,23 @@ class dVector : public VectorBase */ void equ (const double a, const dVector& V, const double b, const dVector& W); + + /** + * Compute the elementwise ratio of the + * two given vectors, that is let + * #this[i] = a[i]/b[i]#. This is useful + * for example if you want to compute + * the cellwise ratio of true to estimated + * error. + * + * This vector is appropriately scaled to + * hold the result. + * + * If any of the #b[i]# is zero, the result + * is undefined. No attempt is made to + * catch such situations. + */ + void ratio (const dVector &a, const dVector &b); //@}