Skip to content

Commit

Permalink
Merge pull request #623 from etmc/hotfix/mgsetup2kappamu
Browse files Browse the repository at this point in the history
only use MGSetup2KappaMu if it has actually been set
  • Loading branch information
kostrzewa authored Mar 2, 2025
2 parents fbaf220 + 55f7620 commit 3a0ac5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quda_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,8 @@ void _updateQudaMultigridPreconditioner(){

// if we have set an explicit mu value for the generation of our MG setup,
// we would like to use it here
if( fabs( fabs(quda_input.mg_setup_2kappamu/2.0/g_kappa) - fabs(quda_mg_param.invert_param->mu) ) > 2*DBL_EPSILON ){
if( fabs( quda_input.mg_setup_2kappamu ) > 2*DBL_EPSILON &&
fabs( fabs(quda_input.mg_setup_2kappamu/2.0/g_kappa) - fabs(quda_mg_param.invert_param->mu) ) > 2*DBL_EPSILON ){
double save_mu = quda_mg_param.invert_param->mu;
// note the minus sign
quda_mg_param.invert_param->mu = -quda_input.mg_setup_2kappamu/2.0/g_kappa;
Expand Down

0 comments on commit 3a0ac5a

Please sign in to comment.