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写道:
>
>
> 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 after phi.dofs_per_component never been 
> touched( the total is dofs_per_compoenent*n_component).*
> I have found an old discussion in 
> https://groups.google.com/forum/#!searchin/dealii/MatrixFreeOperators$3A$3ALaplaceOperator%7Csort:date/dealii/k133wjcKM70/Jw-reYrsAwAJ
> \
> but things change now.
>
> The code here should be correct, because we are looking at a 
> constant-coefficient Laplacian here, where all entries to the diagonal are 
> equal for the various components. So even though the local computation does 
> indeed compute all contributions (but with some spurious dummy entries in 
> the components higher than zero; which eventually are never used), but only 
> get the zero-th component of it and duplicate it over all entries. This is 
> done to save some work, given that we know that the entry is the same; in 
> case you do an operator that couples between the components, one of course 
> has to go over all phi.dofs_per_cell components both when zeroing entries 
> and in the loop over the columns i.
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2d484ddd-e268-426a-bcbb-ab44fa291cd3%40googlegroups.com.

Reply via email to