This commit is contained in:
2023-05-17 16:47:15 -04:00
parent c9312c6d16
commit d069e8c94e
5 changed files with 131 additions and 3 deletions

View File

@@ -265,6 +265,9 @@ int print_params(
case ALGORITHM_RKF45:
fprintf(file,", algorithm=RKF45, tolerance=%.15e, factor=%.15e",parameters.adaptive_tolerance, parameters.adaptive_factor);
break;
case ALGORITHM_RKBS23:
fprintf(file,", algorithm=RKBS23, tolerance=%.15e, factor=%.15e",parameters.adaptive_tolerance, parameters.adaptive_factor);
break;
default:
fprintf(file,", algorithm=RK4");
break;
@@ -671,6 +674,9 @@ int set_parameter(
else if (strcmp(rhs,"RKF45")==0){
parameters->algorithm=ALGORITHM_RKF45;
}
else if (strcmp(rhs,"RKBS23")==0){
parameters->algorithm=ALGORITHM_RKBS23;
}
else{
fprintf(stderr, "error: unrecognized algorithm '%s'\n",rhs);
return(-1);