-
J(v, v)computes a scalar product according to the domain decomposition ofJ. It is basically a weighted local scalar product, followed by a reduction. See line 43 of this parallel example vs. line 28 of this sequential example. - Given one distributed matrix
Mat A, you can create a new distributed matrixBfollowing the same column and row distribution using a local matrixLocwith the syntaxMat B(A, Loc). If you have a different column and row distribution, hereAfor the rows,Cfor the columns, andLocis a rectangular matrix, you create a distributed rectangular matrix using the syntaxMat B(A, C, Loc). See this Stokes example where there is a different column and row distribution (for velocity and pressure unknowns).
Here is some more materials if you are interested: Pierre Jolivet introduction to parallel FreeFEM part 1 - YouTube + Pierre Jolivet introduction to parallel FreeFEM part 2 - YouTube.
Don’t hesitate if you have other questions.