From 56dd8846fbb384e8a653bad8d4a143003c2d5438 Mon Sep 17 00:00:00 2001 From: Yun Liu <39501585+yunliu01@users.noreply.github.com> Date: Mon, 5 Feb 2024 09:35:32 -0500 Subject: [PATCH] Update TY_YukawaSq.c Comment out the check function so that correct solution can be returned correctly. --- sasmodels/models/TY_YukawaSq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sasmodels/models/TY_YukawaSq.c b/sasmodels/models/TY_YukawaSq.c index 14c824af..75422fc8 100644 --- a/sasmodels/models/TY_YukawaSq.c +++ b/sasmodels/models/TY_YukawaSq.c @@ -29,7 +29,13 @@ void translate( } TY_SolveEquations(*z1, *z2, *k1, *k2, *volumefraction, a, b, c1, c2, d1, d2, debug ); - int checkFlags = TY_CheckSolution( *z1, *z2, *k1, *k2, *volumefraction, *a, *b, *c1, *c2, *d1, *d2 ); + + //Added by Yun Liu on 02/05/2024 + //When some numbers, such as d1 and d2, are very large number, the correct solution may not pass the checking function. + //It is recommended to comment out this line of code and simply assume that the TY_SolveEquation function returns a correct result. + //int checkFlags = TY_CheckSolution( *z1, *z2, *k1, *k2, *volumefraction, *a, *b, *c1, *c2, *d1, *d2 ); + int checkFlags = 1; + if (checkFlags != 0) { *a = NAN; // return;