Skip to content

Conversation

@mgyoo86
Copy link
Collaborator

@mgyoo86 mgyoo86 commented Jul 17, 2023

Extended the use of "pskip" (number of time steps between preconditioner updates) to multiple fields in time_step_split.f90:
s2_mat (Advancing Fields)
s8_mat (Advancing Density)
s9_mat (Advancing Pressure or Temperature)
s15_mat (Advancing runaway)

Avoiding frequent updates of preconditioners, which are very expensive,
the field solver's performance is greatly enhanced by a factor of 3 to 10.

The "pskip" value can be set in C1_input file, which is fixed during the simulation.
In the future, a more adaptive "pskip" determination could be implemented for better performance and stability of the simulation.

It is encouraged to use this pskip with the "initial_guess" feature to reduce the number of iterations in the field solver.

@bclyons12
Copy link
Collaborator

@mgyoo86 is this ready to merge?

@nferraro any concerns?

@mgyoo86
Copy link
Collaborator Author

mgyoo86 commented Dec 13, 2023

@bclyons12
I believe this pull request has no conflicts with the master branch.
One minor thing that can be improved is to change the if statement
from "if(mod(ntime,pskip)==0)" to "if(mod(ntime-1,pskip)==0)".

This will ensure that the preconditioner is updated at the first time step (when ntime=1).
Otherwise, during the initial time of simulation (ntime<pskip), the un-preconditioned solver needs a lot of iterations to converge until when the preconditioner is updated at ntime==pskip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants