diff --git a/doc/pages/user-guide/case-file.md b/doc/pages/user-guide/case-file.md index 225572392f7..a84548a2401 100644 --- a/doc/pages/user-guide/case-file.md +++ b/doc/pages/user-guide/case-file.md @@ -517,6 +517,7 @@ The following keywords are used, with the corresponding options. - `jacobi`, a Jacobi preconditioner. Typically used for velocity. - `hsmg`, a hybrid-Schwarz multigrid preconditioner. Typically used for pressure. + - `phmg`, a hybrid ph multigrid preconditioner. Typically used for pressure. - `ident`, an identity matrix (no preconditioner). * `absolute_tolerance`, tolerance criterion for convergence. * `max_iterations`, maximum number of iterations before giving up. diff --git a/src/krylov/pc_hsmg.f90 b/src/krylov/pc_hsmg.f90 index eabfb1e79f6..c8302b6f6cd 100644 --- a/src/krylov/pc_hsmg.f90 +++ b/src/krylov/pc_hsmg.f90 @@ -254,8 +254,14 @@ subroutine hsmg_init(this, msh, Xh, coef, dof, gs_h, bclst, crs_pctype) ! Create a backend specific krylov solver if (present(crs_pctype)) then if (trim(crs_pctype) .eq. 'tamg') then + if (NEKO_BCKND_DEVICE .eq. 1) then + call neko_error('Tree-amg only supported for CPU') + end if + allocate(this%amg_solver) - call this%amg_solver%init(this%ax, this%grids(1)%e%Xh, this%grids(1)%coef, this%msh, this%grids(1)%gs_h, 4, & + + call this%amg_solver%init(this%ax, this%grids(1)%e%Xh, & + this%grids(1)%coef, this%msh, this%grids(1)%gs_h, 4, & this%grids(1)%bclst, 1) else call krylov_solver_factory(this%crs_solver, & diff --git a/src/krylov/precon_fctry.f90 b/src/krylov/precon_fctry.f90 index ec84e87f1f9..ff8ec2e9018 100644 --- a/src/krylov/precon_fctry.f90 +++ b/src/krylov/precon_fctry.f90 @@ -73,6 +73,9 @@ module subroutine precon_factory(pc, type_name) else if (type_name(1:4) .eq. 'hsmg') then allocate(hsmg_t::pc) else if (type_name(1:4) .eq. 'phmg') then + if (NEKO_BCKND_DEVICE .eq. 1) then + call neko_error('Hybrid ph multigrid only supported for CPU') + end if allocate(phmg_t::pc) else if(trim(type_name) .eq. 'ident') then if (NEKO_BCKND_DEVICE .eq. 1) then