From 836cfe06a48dd91da9887e69db53807c87c93491 Mon Sep 17 00:00:00 2001 From: Bryan Herman Date: Tue, 21 Feb 2012 08:12:35 -0800 Subject: [PATCH] added snes timer (temporary) and activated linear searching --- src/cmfd_snes_solver.F90 | 11 ++++++++--- src/global.F90 | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cmfd_snes_solver.F90 b/src/cmfd_snes_solver.F90 index 51a2a314e8..8eeba47535 100644 --- a/src/cmfd_snes_solver.F90 +++ b/src/cmfd_snes_solver.F90 @@ -34,6 +34,9 @@ contains subroutine cmfd_snes_execute() + use global, only: time_snes,master + use timing + ! call slepc solver call cmfd_slepc_execute() @@ -42,10 +45,12 @@ contains ! initialize solver call init_solver() - +call timer_reset(time_snes) +call timer_start(time_snes) ! solve the system call SNESSolve(snes,PETSC_NULL,xvec,ierr) - +call timer_stop(time_snes) +if(master) print *,'SNES Solution Time:',time_snes%elapsed ! extracts results to cmfd object call extract_results() @@ -145,7 +150,7 @@ contains call SNESSetFromOptions(snes,ierr) ! turn off line searching - call SNESLineSearchSet(snes,SNESLineSearchNo,PETSC_NULL,ierr) +! call SNESLineSearchSet(snes,SNESLineSearchNo,PETSC_NULL,ierr) ! get all types and print call SNESGetType(snes,snestype,ierr) diff --git a/src/global.F90 b/src/global.F90 index 3f416bfe24..6ee822588a 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -222,6 +222,7 @@ module global ! Timing objects type(Timer) :: time_cmfd ! timer for whole cmfd calculation + type(Timer) :: time_snes ! timer for just nonlinear calc ! Flag for CMFD only logical :: cmfd_only = .FALSE.