I somehow didn't come up intuitively with the idea of taking a closer look
at the fe.component_mask parameter. I believe it would be helpful to have
an extension with an example in some of the tutorial steps.
Like in step-20 or so:
Depending on the type of the prescribed Dirichlet boundary conditions the
VectorTools::interpolate_boundary_values() class can be used to interpolate
boundary conditions as well on single boundary degrees of freedom. The
fe.component_mask inside VectorTools::interpolate_boundary_values()
specifies the desired components for selection.
For instance, we want to set only x and y displacement components on the
boundary with the id=3 to a certain value, according to the
BoundaryValue<dim>() function, then the
VectorTools::interpolate_boundary_values() class can be modified in the
following manner:
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
std::vector<bool> choice={true,true,false,false};
VectorTools::interpolate_boundary_values(dof_handler,
3,
BoundaryValue<dim>(),
constraints,
fe.component_mask(choice));
With kind regards,
Mariia
среда, 3 ноября 2021 г. в 20:34:02 UTC+1, Wolfgang Bangerth:
> On 11/3/21 12:45 PM, Мария Бронзова wrote:
> > Oh, logic, thank you a lot!
>
> Would you like to suggest edits to the documentation of that function
> that would have made that point clearer? Updating parts of the
> documentation often make for excellent first patches!
>
> 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/7b3e1c26-1aa3-4c5e-8ce3-a9a8514a2b21n%40googlegroups.com.