Periodic boundary constraints with arbitrary transformation of field

30 views
Skip to first unread message

Lucas Myers

unread,
Jun 24, 2024, 6:12:53 PM (9 days ago) Jun 24
to deal.II User Group
Hi all,

Cutting to the chase: my problem involves using traceless, symmetric 3x3 tensor fields, and I represent these as 5-component vector finite element fields, where each vector-component is a degree of freedom of the tensor. My domain is a cylinder, and I'm trying to set up periodic boundary conditions on the ends, with one end rotated pi/2 with respect to the other. However, the `make_periodicity_constraints` function assumes an actual vector finite element field (in the sense of having the same dimension as space-dim) when applying the rotation matrix, and so I am unable to use periodic constraints in a straightforward way for my application.

Two questions on this: 1) how difficult would it be to accommodate this particular issue from outside the library? I've been looking through the code and seeing "this is a hack" and "we have to be careful" so I'm a bit wary to try to re-implement `make_periodicity_constraints` on my own. 2) Is it possible (in the future) to be able to apply arbitrary linear constraints between periodically-joined fields?

Thanks for any help!
- Lucas

Wolfgang Bangerth

unread,
Jun 25, 2024, 9:56:36 AM (9 days ago) Jun 25
to dea...@googlegroups.com

Lucas:

> Cutting to the chase: my problem involves using traceless, symmetric 3x3
> tensor fields, and I represent these as 5-component vector finite element
> fields, where each vector-component is a degree of freedom of the tensor. My
> domain is a cylinder, and I'm trying to set up periodic boundary conditions on
> the ends, with one end rotated pi/2 with respect to the other. However, the
> `make_periodicity_constraints` function assumes an actual vector finite
> element field (in the sense of having the same dimension as space-dim) when
> applying the rotation matrix, and so I am unable to use periodic constraints
> in a straightforward way for my application.

Yes, tough case :-(


> Two questions on this: 1) how difficult would it be to accommodate this
> particular issue from outside the library? I've been looking through the code
> and seeing "this is a hack" and "we have to be careful" so I'm a bit wary to
> try to re-implement `make_periodicity_constraints` on my own. 2) Is it
> possible (in the future) to be able to apply arbitrary linear constraints
> between periodically-joined fields?

It's definitely not an easy case, in particular because the way you discretize
your fields is just so non-standard (but not unreasonable). I think the way
one would generalize the existing function would be if the library identifies
matching sets of degrees of freedom (say from corresponding vertices on
periodic faces) and then instead of setting them equal as it does now call
back a user-defined function that then does what needs to be done. The
existing function already does the first part; it would then take an argument
of the kind

std::function<void (const std::vector<types::global_dof_index> &dof_indices_1,
const std::vector<types::global_dof_index> &dof_indices_2,
AffineConstraints<double> &constraints)

which for now is simply a loop adding constraints
U[dof_indices_1[i]]=U[dof_indices_2[i]] but which could do more complicated
things like in your case.

(The current function can actually do more complex things such as rotate
vectors as well, but you get the idea of the user-provided function object. I
think you should be able to generalize the existing function in this direction.)

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Reply all
Reply to author
Forward
0 new messages