From: Jean-Paul Pelteret Date: Thu, 6 Dec 2018 13:41:28 +0000 (+0100) Subject: Improve some error messages in ADHelper classes. X-Git-Tag: v9.1.0-rc1~389^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7c946aac00869577af146fa79516f8bbcd565b0;p=dealii.git Improve some error messages in ADHelper classes. --- diff --git a/source/differentiation/ad/ad_helpers.cc b/source/differentiation/ad/ad_helpers.cc index d8a7866ba3..e259ab6019 100644 --- a/source/differentiation/ad/ad_helpers.cc +++ b/source/differentiation/ad/ad_helpers.cc @@ -752,7 +752,8 @@ namespace Differentiation this->finalize_sensitive_independent_variables(); Assert(this->independent_variables.size() == this->n_independent_variables(), - ExcInternalError()); + ExcDimensionMismatch(this->independent_variables.size(), + this->n_independent_variables())); return this->independent_variables; } @@ -876,7 +877,8 @@ namespace Differentiation ExcInternalError()); Assert(this->independent_variables.size() == this->n_independent_variables(), - ExcInternalError()); + ExcDimensionMismatch(this->independent_variables.size(), + this->n_independent_variables())); return this->tapeless_driver.value(this->dependent_variables); } @@ -938,7 +940,8 @@ namespace Differentiation ExcInternalError()); Assert(this->independent_variables.size() == this->n_independent_variables(), - ExcInternalError()); + ExcDimensionMismatch(this->independent_variables.size(), + this->n_independent_variables())); this->tapeless_driver.gradient(this->independent_variables, this->dependent_variables, @@ -1008,7 +1011,8 @@ namespace Differentiation ExcInternalError()); Assert(this->independent_variables.size() == this->n_independent_variables(), - ExcInternalError()); + ExcDimensionMismatch(this->independent_variables.size(), + this->n_independent_variables())); this->tapeless_driver.hessian(this->independent_variables, this->dependent_variables, @@ -1153,7 +1157,8 @@ namespace Differentiation ExcInternalError()); Assert(this->independent_variables.size() == this->n_independent_variables(), - ExcInternalError()); + ExcDimensionMismatch(this->independent_variables.size(), + this->n_independent_variables())); this->tapeless_driver.jacobian(this->independent_variables, this->dependent_variables,