template <int dim, int fe_degree, int n_q_points_1d, int n_components, typename VectorType>
void
CustomLaplaceOperator<dim, fe_degree, n_q_points_1d, n_components, VectorType>::
local_diagonal_cell (const MatrixFree<dim,typename dealii::MatrixFreeOperators::Base<dim,VectorType>::value_type> &data,
VectorType &dst,
const unsigned int &,
const std::pair<unsigned int,unsigned int> &cell_range) const
{
typedef typename dealii::MatrixFreeOperators::Base<dim,VectorType>::value_type Number;
FEEvaluation<dim,fe_degree,n_q_points_1d,n_components,Number> phi (data, this->selected_rows[0]);
for (unsigned int cell=cell_range.first; cell<cell_range.second; ++cell)
{
phi.reinit (cell);
VectorizedArray<Number> local_diagonal_vector[phi.tensor_dofs_per_cell* n_components];
for (unsigned int i=0; i<phi.dofs_per_cell* n_components; ++i)
{
for (unsigned int j=0; j<phi.dofs_per_cell* n_components; ++j)
//for (unsigned int j=0; j<phi.tensor_dofs_per_cell; ++j)
phi.begin_dof_values()[j] = VectorizedArray<Number>();
phi.begin_dof_values()[i] = 1.;
do_operation_on_cell(phi,cell);
local_diagonal_vector[i] = phi.begin_dof_values()[i];
}
for (unsigned int i=0; i<phi.tensor_dofs_per_cell* n_components; ++i){
phi.begin_dof_values()[i] = local_diagonal_vector[i];
}
phi.distribute_local_to_global (dst);
}
}
Dear Stephen,
You are absolutely right, the value of dofs_per_cell is simply wrong in the vector-valued case. I have been hesitant to fix it because there are some downstream projects using it (mostly mine, though), but I guess it is better to switch to the correct notation now rather than causing more trouble. You can use your fix right now - I will open an issue and fix it (probably next week).
Best,
Martin
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.