-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uploading the implicit12 solver files #101
base: dev
Are you sure you want to change the base?
Conversation
I have designed a new solver that is faster than the default Rosenbrock solvers. This new solver is inspired by the IMEX solver. I developed it using the standard BE and Sdirk2a because an explicit method would not work for stiff problems. This new solver gave me a 5X speed-up when I used it with the ICON-ART model. The speed-up outweighed the minor loss in accuracy. There are two files added: - implicit12.f90 - implicit12.def
Thanks @maqsoodrajput for this. I am at the International GEOS-Chem Conference this week so I may be slow to get to this PR. But this sounds like a great new feature for KPP. I can also try to set up the C-I tests for this integrator. Also tagging @RolfSander @obin1 @msl3v @jimmielin |
@maqsoodrajput excellent! |
Thanks @maqsoodrajput for providing the new KPP integrator! I will run |
#JACOBIAN SPARSE_LU_ROW | ||
|
||
#DOUBLE ON | ||
#INTFILE implicit12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intfile keyword is deprecated now. Tagging @RolfSander
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All integrators have the #INTFILE
command in their *.def
file.
That's okay. However, the #INTFILE
command should not be used in the
*.kpp
files of the users. For the users, we have the #INTEGRATOR
command. For example, in examples/rosenbrock90.kpp
, the command
#INTEGRATOR rosenbrock
is used.
@maqsoodrajput @RolfSander: I have been running into an issue where the updated time isn't getting passed back via RSTATUS. I set up a test case with the small_strato mechanism. 0.0%. T=0.432E+05 O1D= 0.9906E+02; O= 0.6624E+09; O3= 0.5326E+12; NO= 0.8725E+09; NO2= 0.2240E+09; O2= 0.1697E+17;
### TIN, TOUT, in main 43200.000000000000 44100.000000000000
### ierr:, in sdirk 0
### tinitial, tfinal, in sdirk before calling sdirk_integrator: 43200.000000000000 44100.000000000000
### RSTATUS in Sdirk: 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
### RSTATE in Main 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000
### T 0.0000000000000000 I'm still digging but this means that the simulation is basically stuck in an infinite loop on the same timestep. Feedback greatly appreciated! My updates are in the |
I've added the following code at the end of SDirk_Integrator, which solves the issue in the previous comment: !~~~> End of simplified Newton iterations
! Successful return
Ierr = 1
! Return updated time
RSTATUS(Ntexit) = Tfinal
RSTATUS(Nhexit) = H
END SUBROUTINE SDIRK_Integrator Let me know if you all think this isn't the right thing to do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now approve as I was able to get the C-I test for implicit 12 to work properly.
@maqsoodrajput: Would you like to write a few lines about your new |
I have designed a new solver that is faster than the default Rosenbrock solvers. This new solver is inspired by the IMEX solver. I developed it using the standard BE and Sdirk2a because an explicit method would not work for stiff problems. This new solver gave me a 5X speed-up when I used it with the ICON-ART model. The speed-up outweighed the minor loss in accuracy.
There are two files added: