Chucui,
 

> [...] 
>
1. Can FESystem countain 2 vectors and 2 scalars? If so, how to make 
> "dof_handler", "dofs_per_block", and "block_component (target_block)" 
> correctly matching? As above, I make some faults. For example, in 
> LittleCase0-4.cc, I use this defination for "block_component" 
> (target_block):
>     std::vector<unsigned int> block_component (2*dim+2,1);
>     block_component[0] = 0;
>     block_component[1] = 1;
>     block_component[dim+1] = 2;//=3-1
>     block_component[dim+2] = 3;
> and te result is
> Number of degrees of freedom: 54 (9+27|9+9)
> but it should be: " 54 (9+18 | 9+18) ", I don't know how to control it as 
> I cannot set  "std::vector<unsigned int> block_component (2*dim+2,1,3);", 
> where "1" and "3" means that the vector block should be in the first and 
> third block in the whole.
>
 
For the 2D case, the information you are setting in block_component is:
block_component[0] = 0;
block_component[1] = 1;
block_component[2] = 1;
block_component[2+1] = 2;
block_component[2+2] = 3;
block_component[2+3] = 1;

You likely want to add something like
for (unsigned int c=dim+2; c<2*dim+2)
  block_component[c] = 3;

to set the block for the last components correctly.
 

> 2. Can I use RT element by this way (in Block)? If so, how to correct the 
> LittleCase0-5.cc? If not, how to implement the original problem? Maybe use 
> 2 FESystem fe_1, fe_2, both of which contain only 1 vector (RT element) and 
> 1 scalar (DG element)?
>
 
>From the documentation of DoFRenumbering::component_wise 
<https://www.dealii.org/9.0.0/doxygen/deal.II/namespaceDoFRenumbering.html#a75c2e3cd2d4fe86e0ec209a41a005cb0>
:

> If one of the base finite elements from which the global finite element 
> under consideration here, is a non-primitive one, i.e. its shape functions 
> have more than one non-zero component, then it is not possible to associate 
> these degrees of freedom with a single vector component. In this case, they 
> are associated with the first vector component to which they belong.
>
Hence, your block_mask represents the identity with respect to 
DoFRenumbering::component_wise and you can omit the last argument in the 
function call.

Your FESystem has 4 blocks and 2*dim+2 components and you are asking via

DoFTools::count_dofs_per_block (dof_handler, dofs_per_block, 
block_component);

for the number of degrees of freedom in each of the four blocks (specified 
by block_component). This doesn't work since block_component contains 
component indices and not blocks indices.
Since you are trying to represent the identity, you can again just omit the 
last argument in the function call.
It is important to distinguish between blocks 
<https://www.dealii.org/9.0.0/doxygen/deal.II/DEALGlossary.html#GlossBlock> 
and components 
<https://www.dealii.org/9.0.0/doxygen/deal.II/DEALGlossary.html#GlossComponent>
.

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