From: Jean-Paul Pelteret Date: Wed, 11 Aug 2021 02:51:15 +0000 (+0200) Subject: Improve some assertions X-Git-Tag: v9.4.0-rc1~1090^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d05b077b22d22005f27cc154ac27726118ca74b;p=dealii.git Improve some assertions --- diff --git a/include/deal.II/fe/fe_interface_values.h b/include/deal.II/fe/fe_interface_values.h index b3ecab1cc3..d5b228d2d0 100644 --- a/include/deal.II/fe/fe_interface_values.h +++ b/include/deal.II/fe/fe_interface_values.h @@ -2836,8 +2836,7 @@ namespace FEInterfaceViews std::vector> &values) const { - Assert(values.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(values.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -2883,8 +2882,7 @@ namespace FEInterfaceViews std::vector> &values) const { - Assert(values.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(values.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -2927,8 +2925,7 @@ namespace FEInterfaceViews std::vector> &gradients) const { - Assert(gradients.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -2972,8 +2969,7 @@ namespace FEInterfaceViews std::vector> &values) const { - Assert(values.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(values.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3018,8 +3014,7 @@ namespace FEInterfaceViews std::vector> &gradients) const { - Assert(gradients.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3063,8 +3058,7 @@ namespace FEInterfaceViews std::vector> &hessians) const { - Assert(hessians.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3108,8 +3102,7 @@ namespace FEInterfaceViews std::vector> &hessians) const { - Assert(hessians.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3156,8 +3149,8 @@ namespace FEInterfaceViews solution_third_derivative_type> &third_derivatives) const { - Assert(third_derivatives.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(third_derivatives.size(), + this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3506,8 +3499,7 @@ namespace FEInterfaceViews std::vector> &values) const { - Assert(values.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(values.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3553,8 +3545,7 @@ namespace FEInterfaceViews std::vector> &values) const { - Assert(values.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(values.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3597,8 +3588,7 @@ namespace FEInterfaceViews std::vector> &gradients) const { - Assert(gradients.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3642,8 +3632,7 @@ namespace FEInterfaceViews std::vector> &values) const { - Assert(values.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(values.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3688,8 +3677,7 @@ namespace FEInterfaceViews std::vector> &gradients) const { - Assert(gradients.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(gradients.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3733,8 +3721,7 @@ namespace FEInterfaceViews std::vector> &hessians) const { - Assert(hessians.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3778,8 +3765,7 @@ namespace FEInterfaceViews std::vector> &hessians) const { - Assert(hessians.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(hessians.size(), this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices(); @@ -3826,8 +3812,8 @@ namespace FEInterfaceViews solution_third_derivative_type> &third_derivatives) const { - Assert(third_derivatives.size() == this->fe_interface->n_quadrature_points, - ExcNotImplemented()); + AssertDimension(third_derivatives.size(), + this->fe_interface->n_quadrature_points); const auto &interface_dof_indices = this->fe_interface->get_interface_dof_indices();