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(unsignedintcell=0;cell<n_cells;++cell)
{
                fe_eval.reinit(cell);
for(unsignedintq=0;q<n_q_points;++q)
// evaluate RHS functions and store results in values[q][i]

for(unsignedinti =0;i <n_rhs;++i)
{
for(unsignedintq=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/
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