psmile_print_3d_coord_dble.F90

Go to the documentation of this file.
00001 !-----------------------------------------------------------------------
00002 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00003 ! All rights reserved. Use is subject to OASIS4 license terms.
00004 !-----------------------------------------------------------------------
00005 !BOP
00006 !
00007 ! !ROUTINE: PSMILe_Print_3d_coord_dble
00008 !
00009 ! !INTERFACE:
00010 
00011       subroutine psmile_print_3d_coord_dble (x, y, z, shape,     &
00012                                              ind, nloc, message)
00013 !
00014 ! !USES:
00015 !
00016       use PRISM_constants
00017 !
00018       use PSMILe, dummy_interface => PSMILe_Print_3d_coord_dble
00019 !
00020       implicit none
00021 !
00022 ! !INPUT PARAMETERS:
00023 !
00024       Integer, Intent (In)          :: shape (2, ndim_3d)
00025 !
00026 !     Shape of coordinates
00027 !
00028       Double Precision, Intent (In) :: x (shape(1,1):shape(2,1), 
00029                                           shape(1,2):shape(2,2), 
00030                                           shape(1,3):shape(2,3))
00031       Double Precision, Intent (In) :: y (shape(1,1):shape(2,1), 
00032                                           shape(1,2):shape(2,2), 
00033                                           shape(1,3):shape(2,3))
00034       Double Precision, Intent (In) :: z (shape(1,1):shape(2,1), 
00035                                           shape(1,2):shape(2,2), 
00036                                           shape(1,3):shape(2,3))
00037 !     Coords to be printed out
00038 !
00039       Integer, Intent(In)           :: nloc
00040 !
00041 !     Number of indices to be printed out
00042 
00043       Integer, Intent(In)           :: ind (ndim_3d, nloc)
00044 !
00045 !     Indices of coords to be printed out
00046 !
00047       Character(len=*), Intent(In)  :: message
00048 
00049 !     Additional string to be printed out
00050 !
00051 ! !LOCAL VARIABLES
00052 !
00053       Integer                       :: i
00054 !
00055 ! !DESCRIPTION:
00056 !
00057 ! Subroutine "PSMILe_Print_3d_coord_dble" prints the coordinate values
00058 ! of indices (i,j,k).
00059 !
00060 !
00061 ! !REVISION HISTORY:
00062 !
00063 !   Date      Programmer    Description
00064 ! ----------  -----------   -----------
00065 ! 01.12.03    H. Ritzdorf   created
00066 !
00067 !EOP
00068 !----------------------------------------------------------------------
00069 !
00070 ! $Id: psmile_print_3d_coord_dble.F90 2325 2010-04-21 15:00:07Z valcke $
00071 ! $Author: valcke $
00072 !
00073    Character(len=len_cvs_string), save :: mycvs = 
00074        '$Id: psmile_print_3d_coord_dble.F90 2325 2010-04-21 15:00:07Z valcke $'
00075 !
00076 !----------------------------------------------------------------------
00077 !
00078       write (*, 9000) trim(ch_id), message
00079 !
00080 !  Check
00081 !
00082          do i = 1, nloc
00083          if (shape(1,1) <= ind(1,i) .and. ind(1,i) <= shape(2,1) .and. &
00084              shape(1,2) <= ind(2,i) .and. ind(2,i) <= shape(2,2) .and. &
00085              shape(1,3) <= ind(3,i) .and. ind(3,i) <= shape(2,3)) then
00086             print 9010, ind (:, i), x (ind(1,i), ind(2,i), ind(3,i)), &
00087                                     y (ind(1,i), ind(2,i), ind(3,i)), &
00088                                     z (ind(1,i), ind(2,i), ind(3,i))
00089          else
00090             print 9020, ind (:, i), shape
00091          end if
00092          end do ! i
00093 !
00094 !  FLush output
00095 !
00096       call psmile_flushstd ()
00097 !
00098 !-----------------------------------------------------------------------
00099 !  Formats
00100 !-----------------------------------------------------------------------
00101 !
00102 9000  format (/1x, a, ': ', a)
00103 9010  format (1x, 'ind =', 3i6, '; coord =', 1p, 3d16.9)
00104 9020  format (1x, 'ind =', 3i6, 'out of shape', 6i6)
00105 !
00106       end subroutine PSMILe_Print_3d_coord_dble

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1