Skip to content

LocalPattern always include all components

Summary

LocalPattern always include all components

Steps to reproduce

Run a simulation with two components or more with a jacobian that only sums to the diagonal.

What is the current bug behaviour?

Regardless of the jacobian entries in the ini file, all components are filled in the local pattern. This can be seen setting the logger to trace. This bug does not affect the correctness of the dune-copasi but its efficiency.

Ideas how to fix this?

The logic in the base local operator to set up the _component_pattern is wrong. The set up I have tested now and seem to work is:

        bool do_pattern = false;
        do_pattern |= (k == l);
        do_pattern |= (j_eq != "0") and (j_eq != "0.0") and (j_eq != ".0") and (j_eq != "0.");
        if (do_pattern)
          _component_pattern.insert(std::make_pair(k, l));