SFEMaNS  version 4.1 (work in progress)
Reference documentation for SFEMaNS
 All Classes Files Functions Variables Groups Pages
my_util.f90
Go to the documentation of this file.
1 MODULE my_util
2 CONTAINS
3 !
4 !Authors: Jean-Luc Guermond, Lugi Quartapelle, Copyright 1994
5 !
6 
7 FUNCTION user_time() RESULT(time)
8  IMPLICIT NONE
9  REAL(KIND=8) :: time
10  INTEGER :: count, count_rate, count_max
11  CALL system_clock(count, count_rate, count_max)
12  time = (1.d0*count)/count_rate
13 END FUNCTION user_time
14 
15  SUBROUTINE error_petsc(string)
16  IMPLICIT NONE
17  CHARACTER(LEN=*), INTENT(IN) :: string
18  INTEGER :: rank
19 #include "petsc/finclude/petsc.h"
20  petscerrorcode :: ierr
21  CALL mpi_comm_rank(petsc_comm_world,rank,ierr)
22  IF (rank==0) WRITE(*,*) string
23  CALL petscfinalize(ierr)
24  stop
25  END SUBROUTINE error_petsc
26 
27 END MODULE my_util
real(kind=8) function user_time()
Definition: my_util.f90:7
subroutine error_petsc(string)
Definition: my_util.f90:15