From d69da1137011c3cd02e207b086624b2469455f65 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Fri, 5 Oct 2018 15:59:47 +0200 Subject: [PATCH] Fix incorrect check for data structure resizing --- source/differentiation/ad/ad_helpers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()}, -- 2.39.5