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:                 [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/fbc85bd3-8020-4d30-9339-09014c109407%40colostate.edu.

Reply via email to