Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
INRT_SetPermission.F90
Go to the documentation of this file.
1 ! *********************************************************************
2 ! * Rocstar Simulation Suite *
3 ! * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4 ! * *
5 ! * Illinois Rocstar LLC *
6 ! * Champaign, IL *
7 ! * www.illinoisrocstar.com *
8 ! * sales@illinoisrocstar.com *
9 ! * *
10 ! * License: See LICENSE file in top level of distribution package or *
11 ! * http://opensource.org/licenses/NCSA *
12 ! *********************************************************************
13 ! *********************************************************************
14 ! * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15 ! * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16 ! * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17 ! * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18 ! * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19 ! * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20 ! * Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21 ! * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22 ! *********************************************************************
23 !******************************************************************************
24 !
25 ! Purpose: converts a real number input to a Permission level
26 !
27 ! Description: none.
28 !
29 ! Input: val = real number from a ReadSection call
30 !
31 ! Output: perm = integer used to designate Permission level
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: INRT_SetPermission.F90,v 1.3 2008/12/06 08:44:32 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2003 by the University of Illinois
40 !
41 !******************************************************************************
42 SUBROUTINE inrt_setpermission( global,val,perm )
43 
44  USE moddatatypes
45  USE modglobal, ONLY : t_global
46  USE moderror
48 
49  IMPLICIT NONE
50 
51 ! ... parameters
52  TYPE(t_global), POINTER :: global
53  REAL(RFREAL), INTENT(IN) :: val
54  INTEGER, INTENT(OUT) :: perm
55 
56 ! ... local variables
57  CHARACTER(CHRLEN) :: rcsidentstring
58 
59 !******************************************************************************
60 
61  rcsidentstring = '$RCSfile: INRT_SetPermission.F90,v $ $Revision: 1.3 $'
62 
63  CALL registerfunction( global,'INRT_SetPermission',&
64  'INRT_SetPermission.F90' )
65 
66 ! begin -----------------------------------------------------------------------
67 
68  SELECT CASE (nint(val))
69 
70  CASE (0) ! value used in input deck
71  perm = inrt_perm_block ! value used inside the code
72 
73  CASE (1) ! value used in input deck
74  perm = inrt_perm_pmass ! value used inside the code
75 
76  CASE (2) ! value used in input deck
77  perm = inrt_perm_pmome ! value used inside the code
78 
79  CASE (3) ! value used in input deck
80  perm = inrt_perm_pall ! value used inside the code
81 
82  CASE default
83  CALL errorstop( global,err_inrt_badperm,__line__ )
84 
85  END SELECT ! val
86 
87 ! finalize --------------------------------------------------------------------
88 
89  CALL deregisterfunction( global )
90 
91 END SUBROUTINE inrt_setpermission
92 
93 !******************************************************************************
94 !
95 ! RCS Revision history:
96 !
97 ! $Log: INRT_SetPermission.F90,v $
98 ! Revision 1.3 2008/12/06 08:44:32 mtcampbe
99 ! Updated license.
100 !
101 ! Revision 1.2 2008/11/19 22:17:44 mtcampbe
102 ! Added Illinois Open Source License/Copyright
103 !
104 ! Revision 1.1 2004/12/01 21:56:45 fnajjar
105 ! Initial revision after changing case
106 !
107 ! Revision 1.1 2003/04/02 22:32:04 jferry
108 ! codified Activeness and Permission structures for rocinteract
109 !
110 !******************************************************************************
111 
112 
113 
114 
115 
116 
117 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine inrt_setpermission(global, val, perm)