Remove mode argument to GenericTensor::apply

Issue #398 new
Martin Sandve Alnæs created an issue

As discussed in issue#388, the mode argument to GenericTensor::apply is not actually used and should be removed.

Comments (9)

  1. Martin Sandve Alnæs reporter

    This is not true, the mode argument to GenericTensor::apply is used in petscmatrix. However it's not used in any of the other tensor classes. It's called with "add", "insert" and "flush" in various places in the code. Sounds like a potentially serious bug to me? @garth-wells: is there a reason why this is not a problem that I'm not seeing?

  2. Prof Garth Wells

    The flush option was added after apply was first added, and I'm not sure that flush should be performed via the apply function.

    We're planning to add a Tpetra backend in the next few weeks, which may well help clarify what the behaviour of GenericTensor::apply should be.

  3. Martin Sandve Alnæs reporter

    Ok. Even without flush, insert and add are fundamentally different behaviours though. Maybe just as well to make it functions 'apply_add' and 'apply_insert'.

  4. Jan Blechta

    According to PETSc model we don't need apply_insert and apply_add but rather apply_flush and apply_final. apply_flush serves for (collective) switching between add and insert during assembly.

  5. Log in to comment