Hi Martin,

Cool, thanks for the prompt reply.

Kind regards,
Denis 

> On 15 Nov 2016, at 14:59, Martin Kronbichler <[email protected]> 
> wrote:
> 
> Hi Denis,
> 
> 
> 
>> I wonder if it possible to re-use FEEvaluation within each cell to calculate 
>> integrals of multiple right-hand-side like vectors.
> Yes, you can re-use an FEEvaluation object. As soon as you call 
> submit_value(), you will write into the data field that is used by 
> integrate(), which in turn writes the data field that is read in 
> distribute_local_to_global. Re-using the same evaluators (shape functions, 
> scratch arrays) is the reason why we did not tie the FEEvaluation object to 
> the vector.
> 
>> Something along these lines:
>> 
>>           for (unsigned int cell=0; cell<n_cells; ++cell)
>>             {
>>                 fe_eval.reinit(cell);
>>                 for (unsigned int q=0; q<n_q_points; ++q)
>>                   // evaluate RHS functions and store results in values[q][i]
>> 
>>                 for (unsigned int i = 0; i < n_rhs; ++i)
>>                  {
>>                       for (unsigned int q= 0; q < n_q_points; ++q)
>>                          fe_eval.submit_value(values[q][i], q);
>> 
>>                       fe_eval.integrate (true,false);
>>                       fe_eval.distribute_local_to_global (rhs_vectors[i]);
>>                  }
>>              }
>> 
> This is exactly written as intended.
> 
> Best,
> Martin
> 
> -- 
> The deal.II project is located at http://www.dealii.org/ 
> <http://www.dealii.org/>
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en 
> <https://groups.google.com/d/forum/dealii?hl=en>
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/dealii/VsIkogE1L40/unsubscribe 
> <https://groups.google.com/d/topic/dealii/VsIkogE1L40/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to