From 65fcd414ee99a38714be031ad141d57c48ba8bee Mon Sep 17 00:00:00 2001 From: Mark Messner Date: Thu, 21 Mar 2024 20:49:23 -0500 Subject: [PATCH] Fixed tests --- pyoptmat/flowrules.py | 2 +- test/test_flowrules.py | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pyoptmat/flowrules.py b/pyoptmat/flowrules.py index ee05536..cd873c9 100644 --- a/pyoptmat/flowrules.py +++ b/pyoptmat/flowrules.py @@ -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 ) diff --git a/test/test_flowrules.py b/test/test_flowrules.py index 1b8f735..ed8cc49 100644 --- a/test/test_flowrules.py +++ b/test/test_flowrules.py @@ -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, @@ -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,