}
};
+ /**
+ * This struct is used to implement
+ * FEEvaluation::fast_evaluation_supported() and
+ * FEFaceEvaluation::fast_evaluation_supported().
+ */
+ struct FastEvaluationSupported
+ {
+ template <int fe_degree, int n_q_points_1d>
+ static bool
+ run()
+ {
+ return fe_degree != -1;
+ }
+ };
} // end of namespace internal
fe_eval);
}
+
+
+ // It is important that this file sits in the same compilation unit as the
+ // evaluate() and integrate() calls of this class, to ensure that all
+ // options choose the same code path when compiling FEFaceEvaluationFactory
+ // outside of deal.II.
+ template <int dim, typename Number>
+ bool
+ FEFaceEvaluationFactory<dim, Number>::fast_evaluation_supported(
+ const unsigned int given_degree,
+ const unsigned int n_q_points_1d)
+ {
+ return instantiation_helper_run<1, FastEvaluationSupported>(given_degree,
+ n_q_points_1d);
+ }
} // end of namespace internal
DEAL_II_NAMESPACE_CLOSE
const EvaluationFlags::EvaluationFlags integration_flag,
Number * values_dofs,
FEEvaluationData<dim, Number, true> & fe_eval);
+
+ static bool
+ fast_evaluation_supported(const unsigned int given_degree,
+ const unsigned int n_q_points_1d);
};
namespace internal
{
- struct FastEvaluationSupported
- {
- template <int fe_degree, int n_q_points_1d>
- static bool
- run()
- {
- return fe_degree != -1;
- }
- };
-
-
-
template <int dim, typename Number>
void
FEEvaluationFactory<dim, Number>::evaluate(
+ // It is important that this file sits in the same compilation unit as the
+ // evaluate() and integrate() calls of this class, to ensure that all
+ // options choose the same code path when compiling FEFaceEvaluationFactory
+ // outside of deal.II.
template <int dim, typename Number>
bool
FEEvaluationFactory<dim, Number>::fast_evaluation_supported(
* setting the macro `FE_EVAL_FACTORY_DEGREE_MAX` to the desired integer and
* instantiating the classes FEEvaluationFactory and FEFaceEvaluationFactory
* (the latter for FEFaceEvaluation) creates paths to templated functions for
- * a possibly larger set of degrees. You can check if fast
- * evaluation/integration for a given degree/n_quadrature_points pair by calling
+ * a possibly larger set of degrees. This can both be set when configuring
+ * deal.II by passing the flag `-D FE_EVAL_FACTORY_DEGREE_MAX=8` (in case you
+ * want to compile all degrees up to eight; recommended setting) or by
+ * compiling `evaluation_template_factory.templates.h` and
+ * `evaluation_template_face_factory.templates.h` with the
+ * `FE_EVAL_FACTORY_DEGREE_MAX` overriden to the desired value. In the second
+ * option, symbols will be available twice, and it depends on your linker and
+ * dynamic library loader whether the user-specified setting takes
+ * precendence. You can check if fast evaluation/integration for a given
+ * degree/n_quadrature_points pair by calling
* FEEvaluation::fast_evaluation_supported() or
* FEFaceEvaluation::fast_evaluation_supported().
*
const unsigned int given_n_q_points_1d)
{
return fe_degree == -1 ?
- internal::FEEvaluationFactory<dim, VectorizedArrayType>::
+ internal::FEFaceEvaluationFactory<dim, VectorizedArrayType>::
fast_evaluation_supported(given_degree, given_n_q_points_1d) :
true;
}