Boundary conditions on decoupled system

Dear @Meryem,

This code is far away from minimal, which means that it will take quite alot of time for anyone to debug this.
For the sake of clarity, could you:
Try to minimize the problem to: