Castro
Castro copied to clipboard
How to configure a composite solve with hypre's linear solvers?
Hi, I am new to Castro, and don't know how to use hypre for composite solve. By "composite", I mean that the unknowns on all AMR levels are solved simultaneously.
When I look into the executable cases, I found these comments in Castro/Exec/radiation_tests/RadSourceTest/inputs-cooling:
# solver flag values < 100 use HypreABec, support symmetric matrices only # solver flag values >= 100 use HypreMultiABec, support nonsymmetric matrices # 0 SMG # 1 PFMG # 100 AMG # 102 GMRES using ParCSR interface # 103 GMRES using SStruct interface # 104 GMRES using AMG as preconditioner radsolve.level_solver_flag = 0 # can be any supported hypre solver flag # if use_hypre_multilevel == 0, use CompSolver with an internal hypre # level solver determined by multilevel_solver_flag. # if use_hypre_multilevel == 1, use HypreMultiABec directly, # multilevel_solver_flag must then be >= 100. radsolve.use_hypre_multilevel = 0 radsolve.multilevel_solver_flag = 0
But no matter how I change these three parameters, the solvers are always on a single level. I verified it by printing the crse_level
, fine_level
and nparts
in the constructor function of HypreMultiABec (located at Line 613 of Castro/Source/radiation/HypreMultiABec.cpp). It showed that crse_level
==fine_level
and nparts
==1 all the time. I suppose that in a composite solve, nparts
should be the number of AMR levels. So I do not understand what configuration should be set in input files to do a composite solve. Could somebody help me to figure it out? Thanks!