]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix incorrect check for data structure resizing
authorJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 5 Oct 2018 13:59:47 +0000 (15:59 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Fri, 5 Oct 2018 13:59:47 +0000 (15:59 +0200)
source/differentiation/ad/ad_helpers.cc

index befa9e89ad896b402ffd0528dbbc640ca82430cb..ab22f87b823f995bf377720b4ec891968d51d0c2 100644 (file)
@@ -998,7 +998,7 @@ namespace Differentiation
 
       // We can neglect correctly initializing the entries as
       // we'll be overwriting them immediately.
-      if (hessian.m() != this->n_independent_variables() &&
+      if (hessian.m() != this->n_independent_variables() ||
           hessian.n() != this->n_independent_variables())
         hessian.reinit({this->n_independent_variables(),
                         this->n_independent_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.