Hi Martin,

both of your posts helped a lot to clarify things. Thanks a lot!
Would you mind adding the discussion on using MatrixFree with different 
operators to the documentation of MatrixFree class?
Essentially copy-pasting of what you wrote in the two e-mails related to update 
flags and alike so that the users know that
they should use a single MatrixFree object. Also mention the cases when the 
ordering of cells/quadrature points may not be the same.
I think it would be good to have this discussion in the documentation.


> On 30 Sep 2016, at 09:46, Martin Kronbichler <kronbichler.mar...@gmail.com> 
> wrote:
> 
>> (1) FEEvaluation has read_dof_values (const std::vector< VectorType > &src, 
>> const unsigned int first_index=0),
>> but i don’t see a function to get to values of each DoF vector at quadrature 
>> points.
> If you need to get the vector values at quadrature points, you would 
> typically call something along these lines:
>   phi.reinit(cell_index);
>   phi.read_dof_values(src, 0);
>   phi.evaluate(true, false); // only want values in quadrature points
>   for (unsigned int q=0; q<phi.n_q_points; ++q)
>     Tensor<1,n_components,VectorizedArray<double> > val = phi.get_value(q);
> 
> (There is an overload in case n_components is one, which gives you simply 
> VectorizedArray)

actually it’s not about components, it is about values at quadrature points for 
a vector of solution.
Say I have two vectors representing scalar FE field and I want to have their 
values at quadrature points.
That was my interpretation of the function below:

void FEEvaluationBase 
<https://www.dealii.org/developer/doxygen/deal.II/classFEEvaluationBase.html>< 
dim, n_components_, Number >::read_dof_values      (       const std::vector< 
VectorType > &       src, 
const unsigned int      first_index = 0 
)

since it takes a vector of VectorType.
So the desired answer would be something like
std::vector<VectorizedArray<double>> values = phi.get_value(q);

Of course I could loop over the input vector and do phi.read_dof_values(src[i]) 
followed by phi.get_value(q) for each vector separately.

Sincerely,
Denis.

-- 
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.

Reply via email to