From 0e02d92aff1ca3df9636a57469f82f6225fe215c Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Fri, 12 Oct 2018 07:48:53 +0200 Subject: [PATCH] Improve an in-code comment --- source/differentiation/ad/ad_helpers.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/differentiation/ad/ad_helpers.cc b/source/differentiation/ad/ad_helpers.cc index 844b7653f7..6d03dd2414 100644 --- a/source/differentiation/ad/ad_helpers.cc +++ b/source/differentiation/ad/ad_helpers.cc @@ -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(), -- 2.39.5