Hi Denis,

You are right, it all depends on how many components you have and where
you have coupling between the different components. In your case, I
definitely agree on writing the data out (or finding some other smart
way of combining things when you test by the test functions).

Best,
Martin


On 09/30/2016 05:08 PM, Denis Davydov wrote:
> Hi Martin,
>
>> On 30 Sep 2016, at 16:49, Martin Kronbichler
>> <kronbichler.mar...@gmail.com <mailto:kronbichler.mar...@gmail.com>>
>> wrote:
>>
>> There are two possibilities for doing things. One is like you say,
>> you loop over the components in the input vector or create two
>> FEEvaluation objects and let them do similar things. Note though that
>> you need to call both 'phi.read_dof_values()' and
>> 'phi.evaluate(true,false)' before you can query the data on
>> quadrature points.
>>
>>
>> The other possibility is to create a multi-component evaluator which
>> was along the lines of my last post. Say you have n_components
>> vectors you all want to read from, then you would set:
>>   FEEvaluation<dim,fe_degree,n_q_points_1d,n_components>
>> phi(matrix_free);
>>
>> When you call 'phi.read_dof_values(src, 0);', it reads n_components
>> vectors one after another. The call to phi.get_value(q) then returns
>> Tensor<1,n_components,VectorizedArray<double> > and you have all your
>> components sitting together.
>
> So if I understand it correctly, it’s essentially a trick to group
> several FE vectors and pretend that they form a vector-valued
> solution, then read from them at once and then access data as a Tensor
> object. I think this won’t work for me as the number of vectors could
> be 5 or 500.
>
> For now I will stick with looping over all vectors and doing something
> like:
>
>         for (unsigned int i = 0; i < n_vectors ; ++i)
>           {
>             fe_eval.read_dof_values (solution_vectors[i]);
>             fe_eval.evaluate (true, false, false);
>             for (unsigned int q = 0; q < n_q_points; ++q)
>               my_values(i,q) = fe_eval.get_value(q);
>           }
>
>
> Regards,
> 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
> <mailto: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.

Reply via email to