### Periodic boundary conditions for subspaces of mixed function space

280

views

3

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?

Maybe there is a more elegant way with PETSc, but works.
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.

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?

*edit:*

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

written
8 months ago by
David Nolte

Please login to add an answer/comment or follow this question.

A comment in the source for the FunctionSpace module reads

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