Periodic boundary conditions for subspaces of mixed function space

8 months ago by
Dear community,

is it possible to define periodic boundary conditions only for a subspace of a mixed function space, and not the mixed FS as a whole?

I used the following workaround: instead of a mixed FS, use separate FS (in my case, one with periodic constraint), assemble the blocks separately. Retrieve the entries from the "submatrices" with mat.getValuesCSR(), manipulate the indices of the matrices which are not going to be in the "A00"-block, add boundary conditions (zero-rows in the off-diagonal matrices). Create matrices with the size of the total system for each block from the CSR data (PETSc.Mat().createAIJ(size, csr)), add everything together (axpy).
Maybe there is a more elegant way with PETSc, but works.
Community: FEniCS Project
After a quick search, it seems to me that this is not possible, cf. the last tiny post here. In the 2016.1.0 version at least.

A comment in the source for the FunctionSpace module reads
# Not allowing some to have constrained domain and some not to.​

But this is just what I found. I don't know for sure...

written 8 months ago by klunkean  
Thanks for your comment. Resorting to cbc.block seems to be an option. Unfortunately apparently it's not possible to solve the complete block system with LU (but only iterative methods, of course I understand why...), which is a complication in my case.
written 8 months ago by David Nolte  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »