Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
INRT_SetActiveness.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 an Activeness
26 !
27 ! Description: none.
28 !
29 ! Input: val = real number from a ReadSection call
30 !
31 ! Output: actv = integer used to designate Activeness
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: INRT_SetActiveness.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 
43 SUBROUTINE inrt_setactiveness( global,val,actv )
44 
45  USE moddatatypes
46  USE modglobal, ONLY : t_global
47  USE moderror
49 
50  IMPLICIT NONE
51 
52 ! ... parameters
53  TYPE(t_global), POINTER :: global
54  REAL(RFREAL), INTENT(IN) :: val
55  INTEGER, INTENT(OUT) :: actv
56 
57 ! ... local variables
58  CHARACTER(CHRLEN) :: rcsidentstring
59 
60 !******************************************************************************
61 
62  rcsidentstring = '$RCSfile: INRT_SetActiveness.F90,v $ $Revision: 1.3 $'
63 
64  CALL registerfunction( global,'INRT_SetActiveness',&
65  'INRT_SetActiveness.F90' )
66 
67 ! begin -----------------------------------------------------------------------
68 
69 ! Convert input deck convention: Active means Activeness = 1
70 ! to code convention: Active means Activeness = INRT_ACT_ACTIVE
71 
72  actv = nint(val) - 1 + inrt_act_active
73 
74  IF (actv > inrt_act_active) &
75  CALL errorstop( global,err_inrt_badactv,__line__ )
76 
77 ! finalize --------------------------------------------------------------------
78 
79  CALL deregisterfunction( global )
80 
81 END SUBROUTINE inrt_setactiveness
82 
83 !******************************************************************************
84 !
85 ! RCS Revision history:
86 !
87 ! $Log: INRT_SetActiveness.F90,v $
88 ! Revision 1.3 2008/12/06 08:44:32 mtcampbe
89 ! Updated license.
90 !
91 ! Revision 1.2 2008/11/19 22:17:44 mtcampbe
92 ! Added Illinois Open Source License/Copyright
93 !
94 ! Revision 1.1 2004/12/01 21:56:41 fnajjar
95 ! Initial revision after changing case
96 !
97 ! Revision 1.2 2004/04/15 16:04:21 jferry
98 ! minor formatting (removed trailing spaces)
99 !
100 ! Revision 1.1 2003/04/02 22:32:04 jferry
101 ! codified Activeness and Permission structures for rocinteract
102 !
103 !******************************************************************************
104 
105 
106 
107 
108 
109 
110 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine inrt_setactiveness(global, val, actv)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine deregisterfunction(global)
Definition: ModError.F90:469