Ghost update and scatter forward is covered in
https://scientificcomputing.github.io/mpi-tutorial/notebooks/dolfinx_MPI_tutorial.html
localForm
is a petsc4py function and is a way of accessing the part of a petsc vector on your process: petsc4py.PETSc._Vec_LocalForm also covered in Questions for Solving time-dependent problem - #2 by dokken