Fixed a bug in Python source term with PETSc
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.
-
Feature description was added to the changelog -
Tests covering your feature were added? -
Any new feature or behavior change was documented?