Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reverendbedford committed Mar 22, 2024
1 parent 4f611f5 commit 65fcd41
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyoptmat/flowrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def g0(self):
"""
The intercept value
"""
return (self.C_scale.scale(self.C) - self.B_scale.scale(self.B)) / self.A_scale(
return (self.C_scale(self.C) - self.B_scale(self.B)) / self.A_scale(
self.A
)

Expand Down
18 changes: 14 additions & 4 deletions test/test_flowrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,18 @@ def setUp(self):
self.eps0 = 1.0
self.k = 1.0

self.g0 = 1.5
self.A = torch.tensor(-3.35)
self.B = torch.tensor(-3.23)
self.C = torch.tensor(-5.82)

self.sf = 10.0

self.model = flowrules.SoftKocksMeckingRegimeFlowRule(
self.model1,
self.model2,
self.g0,
self.A,
self.B,
self.C,
self.mu,
self.b,
self.eps0,
Expand Down Expand Up @@ -486,13 +491,18 @@ def setUp(self):
self.eps0 = 1.0
self.k = 1.0

self.g0 = 1.5
self.A = torch.tensor(-3.35)
self.B = torch.tensor(-3.23)
self.C = torch.tensor(-5.82)

self.sf = 10.0

self.model = flowrules.SoftKocksMeckingRegimeFlowRule(
self.model1,
self.model2,
self.g0,
self.A,
self.B,
self.C,
self.mu,
self.b,
self.eps0,
Expand Down

0 comments on commit 65fcd41

Please sign in to comment.