Skip to content

Fixed a bug in Python source term with PETSc

wenqing requested to merge wenqing/ogs:fixing into master

For parallel computing with DDC, a partition may not have source term but a nullptr is assigned for it in the source term vector. That nullptr element of the source term vector causes ogs crashes when the follow function is called:

void SourceTermCollection::integrate(const double t, GlobalVector const& x,
                                     GlobalVector& b, GlobalMatrix* jac) const
{
    for (auto const& st : _source_terms)
    {
        st->integrate(t, x, b, jac);
    }
}

This MR fixes that bug.

  1. Feature description was added to the changelog
  2. Tests covering your feature were added?
  3. Any new feature or behavior change was documented?

Merge request reports