Re: [deal.II] Is MatrixFreeOperators::LaplaceOperator::local_diagonal_cell() something wrong?

2019-11-15 Thread llf m
Dear Martin, I get the meaning, you are right. And in this case if VectorizedArrayType local_diagonal_vector[phi.static_dofs_per_cell]; change to VectorizedArrayType local_diagonal_vector[phi.static_dofs_per_component]; should also work, right? 在 2019年11月15日星期五 UTC+8下午3:27:44,Martin Kronbichler写

Re: [deal.II] Is MatrixFreeOperators::LaplaceOperator::local_diagonal_cell() something wrong?

2019-11-14 Thread Martin Kronbichler
I should add that you can set a variable coefficient, but it is still scalar and thus the same to all components, so the code is correct. It would be different if we allowed tensor-valued coefficients (which we do not at the moment); then, one would really need to go through all dofs_per_cell e

Re: [deal.II] Is MatrixFreeOperators::LaplaceOperator::local_diagonal_cell() something wrong?

2019-11-14 Thread Martin Kronbichler
> In the first loop inside the cell loop index i go through from 0 to > phi.dofs_per_component (highlighted) as well as the j index, > but the function phi.begin_dof_values()return a pointer whose index go > throught from 0 the phi.dofs_per_cell, that is said > *in n_component > 1 case the index a

[deal.II] Is MatrixFreeOperators::LaplaceOperator::local_diagonal_cell() something wrong?

2019-11-14 Thread llf m
Dear all, The function MatrixFreeOperators::LaplaceOperator::local_diagonal_cell() in matrixfree/operators.h line 2135-2153 FEEvaluation phi( data, this->selected_rows[0]); for (unsigned int cell = cell_range.first; cell < cell_range.second; ++cell) { phi.reinit(cell); Ve