'dmatrix' syntax


I am trying to build a matrix, called A, which consists of blocks of smaller matrices along the diagonal and near-zero elements in the off-diagonal, in FreeFem v4.11 using the syntax:

dmatrix A(MatLinOp, clean=1, columns=Ji);

where MatLinOp specifies the blocks going into the diagonal of A, clean=1 makes sure the near-zero elements are identically zero and Ji is just an index declaring the number of blocks going into matrix A.

If I execute this line in FreeFem v4.11, I get a compile error:

dmatrix The Identifier dmatrix does not exist
Compile error:
line number: 376, dmatrix

Is it because this syntax does no longer work in FreeFem v4.11?
Any help is greatly appreciated.

clean=1 does not do what you claim it is doing. dmatrix type has been deprecated/removed for at least 5 years. It is now simply Mat, as in PETSc.

1 Like