# SNES for bordered block matrix

**URL:** <https://community.freefem.org/t/snes-for-bordered-block-matrix/2193>\
**Category:** General Discussion\
**Created:** [December 16, 2022, 4:24pm UTC](https://community.freefem.org/t/snes-for-bordered-block-matrix/2193 "2022-12-16T16:24:48Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)\
**Post date:** [December 18, 2022, 8:15am UTC](https://community.freefem.org/t/snes-for-bordered-block-matrix/2193/16 "2022-12-18T08:15:48Z")

</div>

Ok, I’ve taken a step in a different (hopefully simpler) direction to try to work this out. I’m trying to write a (crude) Moore-Penrose numerical continuation scheme that uses SNESSolve. The crux of this problem leads to a bordered matrix of the form:

```auto
A = [[J, Jl],[yq',yl]];

```

where again `J` is a sparse matrix, `Jl` and `yq` are vectors, and `yl` is a scalar. (all are `Mat` objects).

Since this is only a 2x2 block system, I wanted to solve this directly using the Schur factorization. However, I am having trouble telling PETSc how to handle the scalar `yl` in the fieldsplit. Any suggestions?  
[continueSNES\_MWE.edp](https://community.freefem.org/uploads/short-url/sFkxgXsys27lbJI1vTc6R3q09Nw.edp) (6.1 KB)

---

_[View the full topic](https://community.freefem.org/t/snes-for-bordered-block-matrix/2193)._
