Skip to content

Commit 52594bb

Browse files
committed
fix sign of common denominator terms to be positive
1 parent c7cd764 commit 52594bb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

psctb/analyse/_symca/_symca.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from sympy import sympify
88
import sys
99

10+
from .ccobjects import CCBase
1011
from ...utils.misc import extract_model
1112
from ...utils.misc import get_filename_from_caller
1213
from ...modeltools import make_path, get_file_path
@@ -400,6 +401,15 @@ def do_symca_internals(self):
400401
self.species_dependent
401402
)
402403

404+
common_denom_object = CCBase(self.mod,
405+
'common_denominator',
406+
common_denom_expr,
407+
self._ltxe)
408+
if common_denom_object.value < 0:
409+
common_denom_expr *= -1
410+
cc_sol *= -1
411+
del common_denom_object
412+
403413
cc_names = SMCAtools.build_cc_matrix(
404414
self.fluxes,
405415
self.fluxes_independent,

0 commit comments

Comments
 (0)