[petsc-dev] Composing PetscSections for FieldSplit
Michael Lange
michael.lange at imperial.ac.uk
Wed Apr 2 08:14:50 CDT 2014
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
More information about the petsc-dev
mailing list