Skip to content

Commit

Permalink
WIP API and bindings unit testing; cleaning up #204, #162, #163, #184,
Browse files Browse the repository at this point in the history
  • Loading branch information
cbuahin committed Dec 22, 2024
1 parent 0a78d5e commit 3369838
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/solver/qualrout.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void findLinkQual(int i, double tStep)
if (cOut < 0.0)
{
cOut = -cOut * tStep / (v1 + qIn * tStep);
cOut = min(c2, max(0.0, cOut));
cOut = MIN(c2, MAX(0.0, cOut));
c2 -= cOut;

cOut = cOut * (v1 + qIn * tStep);
Expand Down Expand Up @@ -453,7 +453,7 @@ void findSFLinkQual(int i, double qSeep, double fEvap, double tStep)
if (cOut < 0.0)
{
cOut = -cOut * tStep / (v1 + qIn * tStep);
cOut = min(c2, max(0.0, cOut));
cOut = MIN(c2, MAX(0.0, cOut));
c2 -= cOut;

cOut = cOut * (v1 + qIn * tStep) ;
Expand Down Expand Up @@ -560,7 +560,7 @@ void findStorageQual(int j, double tStep)
// --- Calculate bounded externally provided api pollutant flux and update mass balance
// --- Positive fluxes are added in the addExternalInflow function in routing.c
cOut = -Node[j].apiExtQualMassFlux[p] * tStep / (v1 + qIn * tStep);
cOut = min(c2, max(0.0, cOut));
cOut = MIN(c2, MAX(0.0, cOut));
c2 -= cOut;
massbal_addOutflowQual(p, cOut * (v1 + qIn * tStep) / tStep, FALSE);
}
Expand Down

0 comments on commit 3369838

Please sign in to comment.