The abstract class Vector defines the method:
virtual void apply(std::string mode)
However, there is some inconsistency between the Trilinos and the PETSc backend.
In fact, the method apply in PETScVector does not check what mode is and simply calls VecAssemblyBegin(_x); and VecAssemblyEnd(_x);.
On the contrary the Trilinos backend does two different reduction operations depending on whether mode = "add" or mode = "insert".
Does PETScVector::apply("unused_string") perform the same reduction operation as `TPetraVector::apply("add")?
If this is the case, should one add an assert in PETScVector::apply that mode is indeed equal to "add"?
Best,
Umbe