--- /dev/null
+Improved: Local operation classes of the portable matrix-free
+infrastructure do not need n_dofs_1d anymore.
+<br>
+(Peter Munch, 2024/01/28)
// arrays, we need to store the number of quadrature points and the
// number of degrees of freedom in this class to do necessary index
// conversions.
- static const unsigned int n_dofs_1d = fe_degree + 1;
- static const unsigned int n_local_dofs = Utilities::pow(n_dofs_1d, dim);
- static const unsigned int n_q_points = Utilities::pow(n_dofs_1d, dim);
+ static const unsigned int n_local_dofs = Utilities::pow(fe_degree + 1, dim);
+ static const unsigned int n_q_points = Utilities::pow(fe_degree + 1, dim);
private:
double *coef;
// Again, the Portable::MatrixFree object doesn't know about the number
// of degrees of freedom and the number of quadrature points so we need
// to store these for index calculations in the call operator.
- static constexpr unsigned int n_dofs_1d = fe_degree + 1;
static constexpr unsigned int n_local_dofs =
Utilities::pow(fe_degree + 1, dim);
static constexpr unsigned int n_q_points =
* Portable::SharedData<dim, Number> * shared_data,
* const Number * src,
* Number * dst) const;
- * static const unsigned int n_dofs_1d;
* static const unsigned int n_local_dofs;
* static const unsigned int n_q_points;
* \endcode
* DEAL_II_HOST_DEVICE void operator()(
* const unsigned int cell,
* const typename Portable::MatrixFree<dim, Number>::Data *gpu_data);
- * static const unsigned int n_dofs_1d;
* static const unsigned int n_local_dofs;
* static const unsigned int n_q_points;
* \endcode
const double *src,
double *dst) const;
- static const unsigned int n_dofs_1d = fe_degree + 1;
static const unsigned int n_local_dofs =
dealii::Utilities::pow(fe_degree + 1, dim);
static const unsigned int n_q_points =
class MatrixFreeTest
{
public:
- static const unsigned int n_dofs_1d = fe_degree + 1;
- static const unsigned int n_local_dofs = Utilities::pow(n_dofs_1d, dim);
+ static const unsigned int n_local_dofs = Utilities::pow(fe_degree + 1, dim);
static const unsigned int n_q_points = Utilities::pow(n_q_points_1d, dim);
MatrixFreeTest(const Portable::MatrixFree<dim, Number> &data_in)
const Portable::MatrixFree<dim, Number> &data;
};
-template <int dim, int fe_degree, int n_q_points_1d, typename Number>
-const unsigned int
- MatrixFreeTest<dim, fe_degree, n_q_points_1d, Number>::n_dofs_1d;
-
template <int dim, int fe_degree, int n_q_points_1d, typename Number>
const unsigned int
MatrixFreeTest<dim, fe_degree, n_q_points_1d, Number>::n_local_dofs;
class HelmholtzOperator
{
public:
- static const unsigned int n_dofs_1d = fe_degree + 1;
static const unsigned int n_local_dofs =
dealii::Utilities::pow(fe_degree + 1, dim);
static const unsigned int n_q_points =
phi.distribute_local_to_global(dst);
}
- static const unsigned int n_dofs_1d = fe_degree + 1;
static const unsigned int n_local_dofs =
Utilities::pow(fe_degree + 1, dim) * n_components;
static const unsigned int n_q_points = Utilities::pow(fe_degree + 1, dim);