From: Jean-Paul Pelteret Date: Fri, 5 Oct 2018 13:59:47 +0000 (+0200) Subject: Fix incorrect check for data structure resizing X-Git-Tag: v9.1.0-rc1~630^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d69da1137011c3cd02e207b086624b2469455f65;p=dealii.git Fix incorrect check for data structure resizing --- diff --git a/source/differentiation/ad/ad_helpers.cc b/source/differentiation/ad/ad_helpers.cc index befa9e89ad..ab22f87b82 100644 --- a/source/differentiation/ad/ad_helpers.cc +++ b/source/differentiation/ad/ad_helpers.cc @@ -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()},