]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve an in-code comment
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 12 Oct 2018 05:48:53 +0000 (07:48 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 12 Oct 2018 08:39:50 +0000 (10:39 +0200)
source/differentiation/ad/ad_helpers.cc

index 844b7653f744aefea31ca5d2455d1b96bb35a4ca..6d03dd24147fd17167a2b4d492a25376662b3aa2 100644 (file)
@@ -872,7 +872,8 @@ namespace Differentiation
           "The ADHelperEnergyFunctional class expects there to be only one dependent variable."));
 
       // We can neglect correctly initializing the entries as
-      // we'll be overwriting them immediately.
+      // we'll be overwriting them immediately in the succeeding call to
+      // Drivers::gradient().
       if (gradient.size() != this->n_independent_variables())
         gradient.reinit(this->n_independent_variables(),
                         true /*omit_zeroing_entries*/);
@@ -939,7 +940,8 @@ namespace Differentiation
           "The ADHelperEnergyFunctional class expects there to be only one dependent variable."));
 
       // We can neglect correctly initializing the entries as
-      // we'll be overwriting them immediately.
+      // we'll be overwriting them immediately in the succeeding call to
+      // Drivers::hessian().
       if (hessian.m() != this->n_independent_variables() ||
           hessian.n() != this->n_independent_variables())
         hessian.reinit({this->n_independent_variables(),
@@ -1027,7 +1029,8 @@ namespace Differentiation
              ExcMessage("Not all dependent variables have been registered."));
 
       // We can neglect correctly initializing the entries as
-      // we'll be overwriting them immediately.
+      // we'll be overwriting them immediately in the succeeding call to
+      // Drivers::values().
       if (values.size() != this->n_dependent_variables())
         values.reinit(this->n_dependent_variables(),
                       true /*omit_zeroing_entries*/);
@@ -1082,7 +1085,8 @@ namespace Differentiation
              ExcMessage("Not all dependent variables have been registered."));
 
       // We can neglect correctly initializing the entries as
-      // we'll be overwriting them immediately.
+      // we'll be overwriting them immediately in the succeeding call to
+      // Drivers::jacobian().
       if (jacobian.m() != this->n_dependent_variables() ||
           jacobian.n() != this->n_independent_variables())
         jacobian.reinit({this->n_dependent_variables(),

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.