From: Peter Munch Date: Sun, 23 Oct 2022 12:54:07 +0000 (+0200) Subject: Generalize precompilation of TensorProductMatrixSymmetricSum X-Git-Tag: v9.5.0-rc1~883^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b61f282a308b67822219a8db14e065e5bbb1725;p=dealii.git Generalize precompilation of TensorProductMatrixSymmetricSum --- diff --git a/include/deal.II/lac/tensor_product_matrix.templates.h b/include/deal.II/lac/tensor_product_matrix.templates.h index 02cd64cfa7..c7b026fea0 100644 --- a/include/deal.II/lac/tensor_product_matrix.templates.h +++ b/include/deal.II/lac/tensor_product_matrix.templates.h @@ -21,11 +21,17 @@ #include -#ifndef FDM_DEGREE_MAX -// We set this value 17, since this is the value needed for smoothers for -// cell-centered patches with overlap for continuous elements with degrees up -// to FE_EVAL_FACTORY_DEGREE_MAX. -# define FDM_DEGREE_MAX 17 +#ifndef FDM_N_ROWS_MAX +// Maximum number of rows with pre-compiled TensorProductMatrixSymmetricSum +// kernels. If no value is given by the user during +// compilation, we choose its value so that all number of rows are pre-compiled +// to support smoothers for cell-centered patches with overlap for continuous +// elements with degrees up to FE_EVAL_FACTORY_DEGREE_MAX (default value 6). +# ifndef FE_EVAL_FACTORY_DEGREE_MAX +# define FDM_N_ROWS_MAX 17 +# else +# define FDM_N_ROWS_MAX (FE_EVAL_FACTORY_DEGREE_MAX * 3 - 1) +# endif #endif DEAL_II_NAMESPACE_OPEN @@ -47,8 +53,8 @@ namespace internal if (n_rows_1d_templated == n_rows_1d) vmult( dst, src, tmp, n_rows_1d, mass_matrix, derivative_matrix); - else if (n_rows_1d_templated < FDM_DEGREE_MAX) - select_vmult( + else if (n_rows_1d_templated < FDM_N_ROWS_MAX) + select_vmult( dst, src, tmp, n_rows_1d, mass_matrix, derivative_matrix); else vmult<0>(dst, src, tmp, n_rows_1d, mass_matrix, derivative_matrix); @@ -68,8 +74,8 @@ namespace internal if (n_rows_1d_templated == n_rows_1d) apply_inverse( dst, src, tmp, n_rows_1d, eigenvectors, eigenvalues); - else if (n_rows_1d_templated < FDM_DEGREE_MAX) - select_apply_inverse( + else if (n_rows_1d_templated < FDM_N_ROWS_MAX) + select_apply_inverse( dst, src, tmp, n_rows_1d, eigenvectors, eigenvalues); else apply_inverse<0>(dst, src, tmp, n_rows_1d, eigenvectors, eigenvalues);