Skip to content

Commit

Permalink
Change solver parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
JDBetteridge committed Jul 24, 2024
1 parent 48cfd94 commit 3c9c361
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions gusto/solvers/linear_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,18 @@ class CompressibleSolver(TimesteppingSolver):
(3) Reconstruct theta
"""

solver_parameters = {'mat_type': 'matfree',
'ksp_type': 'preonly',
'pc_type': 'python',
'pc_python_type': 'firedrake.SCPC',
'pc_sc_eliminate_fields': '0, 1',
# The reduced operator is not symmetric
'condensed_field': {'ksp_type': 'fgmres',
'ksp_rtol': 1.0e-8,
'ksp_atol': 1.0e-8,
'ksp_max_it': 100,
'pc_type': 'gamg',
'pc_gamg_sym_graph': None,
'mg_levels': {'ksp_type': 'gmres',
'ksp_max_it': 5,
'pc_type': 'bjacobi',
'sub_pc_type': 'ilu'}}}
solver_parameters = {
'mat_type': 'matfree',
'ksp_type': 'preonly',
'pc_type': 'python',
'pc_python_type': 'firedrake.SCPC',
'pc_sc_eliminate_fields': '0, 1',
# The reduced operator is not symmetric
'condensed_field': {
'ksp_type': 'preonly',
'pc_type': 'lu'
}
}

def __init__(self, equations, alpha=0.5,
quadrature_degree=None, solver_parameters=None,
Expand Down Expand Up @@ -383,6 +379,7 @@ def solve(self, xrhs, dy):

# Solve the hybridized system
logger.info('Compressible linear solver: hybridized solve')
logger.debug('Hangs on this solve ??? :')
self.hybridized_solver.solve()

broken_u, rho1, _ = self.urhol0.subfunctions
Expand Down

0 comments on commit 3c9c361

Please sign in to comment.