]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Grammar: clarify obtain vs. attain. 4542/head
authorDavid Wells <wellsd2@rpi.edu>
Sat, 24 Jun 2017 14:35:27 +0000 (10:35 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 24 Jun 2017 14:35:27 +0000 (10:35 -0400)
Attain and obtain are nearly, but not quite, synonyms: 'attain' implies
achievement or accomplishment while 'obtain' just implies
ownership. This patch fixes our errant usage of 'attain' (one comment
also had a logic error, which I fixed).

include/deal.II/lac/petsc_vector_base.h
source/lac/petsc_parallel_vector.cc
source/lac/petsc_vector_base.cc
source/numerics/data_out_rotation.cc

index 505cfaf313f709edc2d4c778eb0b2dd211fb5d9a..e3eefbba8d68f537f13a85c8556b9dfb67bbccab 100644 (file)
@@ -257,7 +257,7 @@ namespace PETScWrappers
 
     /**
      * Initialize a Vector from a PETSc Vec object. Note that we do not copy
-     * the vector and we do not attain ownership, so we do not destroy the
+     * the vector and we do not obtain ownership, so we do not destroy the
      * PETSc object in the destructor.
      */
     explicit VectorBase (const Vec &v);
@@ -711,7 +711,7 @@ namespace PETScWrappers
      * it got created by this class and determines if it gets destructed in
      * the destructor.
      */
-    bool attained_ownership;
+    bool obtained_ownership;
 
     /**
      * Collective set or add operation: This function is invoked by the
index c09e57c75553615e88a4b1a34eb786453714e01c..d9911e9c2421dddbaf3c2fbecd56e690cd3cf7c3 100644 (file)
@@ -134,7 +134,7 @@ namespace PETScWrappers
     void
     Vector::clear ()
     {
-      attained_ownership = true;
+      obtained_ownership = true;
       VectorBase::clear ();
 
       create_vector(0, 0);
index 76042c8686b40ec1a8321d4785dcf59a00cbc18c..6f5dc4177b69e9dd4e33a7196d812518b90c385a 100644 (file)
@@ -114,7 +114,7 @@ namespace PETScWrappers
     vector (nullptr),
     ghosted(false),
     last_action (::dealii::VectorOperation::unknown),
-    attained_ownership(true)
+    obtained_ownership(true)
   {
     Assert( MultithreadInfo::is_running_single_threaded(),
             ExcMessage("PETSc does not support multi-threaded access, set "
@@ -129,7 +129,7 @@ namespace PETScWrappers
     ghosted(v.ghosted),
     ghost_indices(v.ghost_indices),
     last_action (::dealii::VectorOperation::unknown),
-    attained_ownership(true)
+    obtained_ownership(true)
   {
     Assert( MultithreadInfo::is_running_single_threaded(),
             ExcMessage("PETSc does not support multi-threaded access, set "
@@ -150,7 +150,7 @@ namespace PETScWrappers
     vector(v),
     ghosted(false),
     last_action (::dealii::VectorOperation::unknown),
-    attained_ownership(false)
+    obtained_ownership(false)
   {
     Assert( MultithreadInfo::is_running_single_threaded(),
             ExcMessage("PETSc does not support multi-threaded access, set "
@@ -161,7 +161,7 @@ namespace PETScWrappers
 
   VectorBase::~VectorBase ()
   {
-    if (attained_ownership)
+    if (obtained_ownership)
       {
         const PetscErrorCode ierr = VecDestroy (&vector);
         AssertNothrow (ierr == 0, ExcPETScError(ierr));
@@ -174,7 +174,7 @@ namespace PETScWrappers
   void
   VectorBase::clear ()
   {
-    if (attained_ownership)
+    if (obtained_ownership)
       {
         const PetscErrorCode ierr = VecDestroy (&vector);
         AssertThrow (ierr == 0, ExcPETScError(ierr));
@@ -183,7 +183,7 @@ namespace PETScWrappers
     ghosted = false;
     ghost_indices.clear ();
     last_action = ::dealii::VectorOperation::unknown;
-    attained_ownership = true;
+    obtained_ownership = true;
   }
 
 
index eb2b54a90db7e71d560caa9337fe789d63a3c718..1c46232a211974a734d4d4af8caf3963bcc23a25 100644 (file)
@@ -156,8 +156,7 @@ build_one_patch (const cell_iterator
             {
               const Point<dimension> v = (*cell)->vertex(vertex);
 
-              // make sure that the radial variable does attain negative
-              // values
+              // make sure that the radial variable is nonnegative
               Assert (v(0) >= 0, ExcRadialVariableHasNegativeValues(v(0)));
 
               // now set the vertices of the patch

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.