Hi Matt,

We are trying to implement fieldsplit for mixed function spaces in Firedrake. For this we want to compose a set of sections with one field each into one section with several fields. The is to add a PetscSectionSetField() function and then use this to build a container section with something like:

sec_offset = 0
msec = PETSc.Section().create()
for i, s in enumerate(spaces):
    sec = shift_offsets(s.clone(), sec_offset)
    msec.setField(i, sec)
    sec_offset += s.getStorageSize()

We have tried setting this as the DefaultSection in our DM and then passing this to SNES via SNESSetDM(), but the problem we encountered is that we get an empty global section, because PetscSectionCreateGlobalSection() can currently not handle multiple fields.

Do you agree with this approach? And if so, can we make PetscSectionCreateGlobalSection() aware of fields?

Thanks,

Michael

Reply via email to