!****h* General/Constants ! ! SYNOPSIS ! Module defining common constants ! ! COPYRIGHT ! (C) 2004 by WL|Delft Hydraulics ! ! AUTHOR ! Arjen Markus ! ! DESCRIPTION ! This module contains integer and real parameters: ! - kind parameters for single (sp) and double (dp) precision ! - definitions for pi (3.14...) and compi (imaginary unit) ! ! SOURCE ! ! wwvv never used ! this would be a nice place to hold things as pi, twopi ! and so on module constants #ifdef USEMPI use mpi #endif implicit none save private public rKind,tKind,pKind,spKind,dpKind,iKind,pi,compi #ifdef USEMPI public mpiRealDataType #endif integer, parameter :: dpKind = kind(1.0d0) integer, parameter :: spKind = kind(1.0) #ifdef BUILDSP integer, parameter :: rKind = spKind !kind(1.0) integer, parameter :: tKind = dpKind !kind(1.0d0) integer, parameter :: pKind = dpKind !kind(1.0d0) #ifdef USEMPI integer, parameter :: mpiRealDataType = MPI_REAL #endif #else integer, parameter :: rKind = dpKind integer, parameter :: tKind = dpKind integer, parameter :: pKind = dpKind !kind(1.0d0) #ifdef USEMPI integer, parameter :: mpiRealDataType = MPI_DOUBLE_PRECISION #endif #endif integer, parameter :: iKind = kind(1) real(kind=rkind), parameter :: pi = 4*atan(1.0_rkind) complex(kind=rkind), parameter :: compi = (0.0_rkind,1.0_rkind) end module constants !****