If my understanding of how dofs are numbered is correct. Essentially what I
want to do is
std::vector<bool> boundary_dofs (dof_handler.n_dofs(), false);
DoFTools::extract_boundary_dofs (dof_handler, ComponentMask(),
boundary_dofs);
constraints.clear();
for (unsigned int i = dofs_per_block[0] + dofs_per_block[1]; i <
dof_handler.n_dofs(); ++i)
{
if(boundary_dofs[i] == true)
{
constraints.add_line (i);
\\ find 'corresponding_U_dof' of 'W_dof' with index 'i' according
to above said criterion
constraints.add_entry (i, corresponding_U_dof, 1);
}
}
constraints.close ();
So I want a way to find 'corresponding_U_dof' from 'W_dof' with index 'i'.
Or please suggest any other way to achieve this.
Thanks,
Bhanu Teja.
On Friday, April 20, 2018 at 12:45:51 PM UTC+5:30, Bhanu Teja wrote:
>
> Thanks Prof Bangerth,
> I overlooked it. I had Q2 for U and Q1 for W in mind when I was building
> the code and writing the query. With this combination I guess the criterion
> satisfies as 'Q1, dim' has dofs present on geometric vertices and same
> with' Q2, dim' (along with mid points of edges and some in the interior
> depending on the dimension). I am planning to use this combination for some
> time. I will sure read the paper. In this case can you suggest how to build
> the constraints? Or should I necessarily use 'FE_Q_Hierarchical'? Can you
> direct me to any tutorial or any reading material in which
> 'FE_Q_Hierarchical' is used.
>
> Thanks,
> Bhanu Teja.
>
> On Friday, April 20, 2018 at 3:40:01 AM UTC+5:30, Wolfgang Bangerth wrote:
>>
>>
>> Bhanu,
>>
>> > In my application, the FESystem is 'fe(FE_Q<dim>(degree+1), dim,
>> > FE_Q<dim>(degree), 1, FE_Q<dim>(degree), dim)'. As you can see there
>> are
>> > three unknown solution variables(lets call them U, p and W), in which
>> > the first and last are vector valued with 'dim' components and the
>> first
>> > one is one degree higher than the last. The boundary
>> > condition/constraint I have is 'W = U' in every component at a
>> > particular boundary with boundary_id. (U dof is present at every W dof
>> > as U is one degree higher than W, but not the other way).
>>
>> This is not actually true, and it's going to make the algorithm you are
>> seeking substantially more complicated. Think about a Q3 element for U
>> and a Q2 element for W: U has nodes at 1/3 and 2/3 along each edge, but
>> W has nodes only at the midpoint of each edge.
>>
>> So the algorithm you're seeking cannot be as simple as set some degrees
>> of freedom equal to others, and the rest to zero. Rather, the problem
>> you want to solve is in essence what one does in hp finite element
>> methods where you have a Q3 and a Q2 element coming together at one
>> edge. You may want to read the paper I wrote with Oliver Kayser-Herold
>> many years ago about this.
>>
>> An alternative could be to use FE_Q_Hierarchical instead. That one,
>> truly, satisfies the property you describe and would make construction
>> of these constraints easier.
>>
>> Best
>> W.
>>
>> --
>> ------------------------------------------------------------------------
>> Wolfgang Bangerth email: [email protected]
>> www: http://www.math.colostate.edu/~bangerth/
>>
>
--
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.