Skip to content

Commit

Permalink
Update TY_YukawaSq.c
Browse files Browse the repository at this point in the history
Comment out the check function so that correct solution can be returned correctly.
  • Loading branch information
yunliu01 authored Feb 5, 2024
1 parent 3d4be93 commit 56dd884
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sasmodels/models/TY_YukawaSq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56dd884

Please sign in to comment.