Chucui,

> I have a simple question: if I define two FESystem:
> [...]
>     FESystem<dim>        fe_1;
>     FESystem<dim>        fe_2;
> [...]
>     fe_1 (FE_Q<dim>(degree), 1,
>           FE_Q<dim>(degree), 1),
>     fe_2 (FE_RaviartThomas<dim>(degree), 1),
> [...]
>
> when I need to use  "FEValuesExtractors" separately, how to define which 
> FEValues are subscripts in operator[] expressions on? fe_1 or fe_2?
> if my code 
> FEValuesExtractors::Scalar fe_1_0(0);
> FEValuesExtractors::Scalar fe_1_1(1);
>
> FEValuesExtractors::Vector fe_2_vector(0);
>
> can "FEValuesExtractors" match to the corresponding FESystem (fe_1 or 
> fe_2)automatically?
>
As explained in the documentation 
(https://www.dealii.org/8.5.0/doxygen/deal.II/structFEValuesExtractors_1_1Vector.html)
 
the result of applying a
FEValuesExtractors object of this type to an FEValues object is a 
FEValuesViews::Vector object which is bound to the FEValues object given.
On the other hand, FEValuesExtractors objects themselves don't know 
anything about FiniteElement objects.
Hence, it is your responsibility to use an appropriate FEValues object for 
a given FEValues object yourself.
E.g. in your example it doesn't make sense to construct
fe_values_1[fe_2_vector]
in case dim=3 since fe_values only have two components. If both fe_1 and 
fe_2 have dim components
fe_values_1[fe_2_vector]
would return a valid object though.

Hence, the answer to your question is "No, the FEValuesExtractors objects 
don't carry any information which FiniteElement they belong to.".

Best,
Daniel

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