Skip to content

Commit

Permalink
Move output to Neko log
Browse files Browse the repository at this point in the history
  • Loading branch information
njansson committed Dec 16, 2024
1 parent 3526f28 commit 373db9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/multigrid/tree_amg_multigrid.f90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ subroutine tamg_mg_init(this, ax, Xh, coef, msh, gs_h, nlvls_in, blst, max_iter)
character(len=255) :: env_cheby_degree, env_mlvl
character(len=LOG_SIZE) :: log_buf

call neko_log%section('AMG')

call get_environment_variable("NEKO_TAMG_MAX_LVL", &
env_mlvl, env_len)
if (env_len .eq. 0) then
Expand All @@ -106,7 +108,8 @@ subroutine tamg_mg_init(this, ax, Xh, coef, msh, gs_h, nlvls_in, blst, max_iter)
read(env_mlvl(1:env_len), *) mlvl
nlvls = mlvl
end if
print *, "Creating AMG hierarchy with", nlvls, "levels"
write(log_buf, '(A27,I2,A7)') "Creating AMG hierarchy with", nlvls, " levels"
call neko_log%message(log_buf)
if (nlvls .gt. 4) then
call neko_error("Can not do more than four levels right now. I recommend two or three.")
end if
Expand Down Expand Up @@ -161,6 +164,9 @@ subroutine tamg_mg_init(this, ax, Xh, coef, msh, gs_h, nlvls_in, blst, max_iter)
!end do

call fill_lvl_map(this%amg)

call neko_log%end_section()

end subroutine tamg_mg_init


Expand Down

0 comments on commit 373db9d

Please sign in to comment.