Merge Jacobian coloring into PETSc solver#3161
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Takes the coloring code from the
snes/beulersolver, and merges it into thepetscsolver. This uses the PETScTSinterface, enabling use of many time-integration algorithms, including sundials/cvode.PETSc TS manual: https://petsc.org/release/manual/ts/
Use with e.g.
solver:type=petsc solver:ts_type=beulerOther
ts_typechoices includebdf,pseudo(https://petsc.org/release/manualpages/TS/TSPSEUDO/)See list of methods here: https://petsc.org/release/overview/integrator_table/#integrator-table
Other solver settings include:
adapt_type, that sets the adaptive timestep method https://petsc.org/release/manualpages/TS/TSAdaptType/snes_type, the nonlinear solver methodksp_type, the linear solver methodpc_type, the preconditioner methoduse e.g.
petsc:ts_monitor,petsc:snes_monitorto print diagnostics;petsc:helpto print the available PETSc options.The combination of
bdfmethod and STRUMPACK direct solver seems to be quite effective:That solves in 2 1/2 minutes a 2D transport problem that took CVODE (without preconditioning) 2 1/2 hours.
If PETSc is compiled with sundials (configure flag
--download-sundials) then the Jacobian coloring and PETSc preconditioners can be used with CVODE (2.5.0):This solved the same 2D transport problem in 1 1/2 minutes.
There are many (many!) settings to try and tune.