This depends on the finite element. For FEQ, yes, for other finite elements,
definitely not (RaviarThomas, Nedelec, etc.).
Also, the code was wrong with the numbering, of course. On the left you should
put the global dof number associated to i, not i.
Even if the local matrix is identical, storing it with the correct numbering
into a big sparse matrix is only marginally expensive, while saving a lot in
extracting local dofs.
One vmult, followed by memory contiguous access at every cell, is much cheaper
than searching in the global vector for local dofs, then performing one local
multiplication (maybe with one identical Vandermonde matrix).
L.
> On 31 Dec 2017, at 6:09, Praveen C wrote:
>
>
>
>> On 30-Dec-2017, at 11:40 PM, luca.heltai wrote:
>>
>> I’m thinking of a matrix of size (n_quadrature_points x n_active_cells) x
>> n_dofs, and then you slice the results cellwise instead of repeatedly
>> calling get_function_values.
>>
>> once:
>>
>> M[q+active_cell_index*n_dofs_per_cell, i] = fe_values.shape_value(i,q);
>
> This looks like a Vandermonde matrix which would be identical on every cell.
> In that case, it is not necessary to store it for every cell.
>
> Thanks
> praveen
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.