Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_ComputeDCUHREInfo.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: Compute information for proper use of DCUHRE
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! NDIM Number of dimensions
31 ! NF Number of functions
32 ! KEY Type of integration rule
33 ! MAXCLS Maximum number of calls allowed (NOTE also output argument)
34 !
35 ! Output:
36 ! MAXCLS Maximum number of calls allowed (NOTE also input argument)
37 ! NW Size of work array
38 !
39 ! Notes:
40 !
41 !******************************************************************************
42 !
43 ! $Id: RFLU_ComputeDCUHREInfo.F90,v 1.4 2008/12/06 08:44:12 mtcampbe Exp $
44 !
45 ! Copyright: (c) 2001 by the University of Illinois
46 !
47 !******************************************************************************
48 
49  SUBROUTINE rflu_computedcuhreinfo(global,NDIM,NF,KEY,MAXCLS,NW)
50 
51  USE modglobal, ONLY: t_global
52  USE moderror
53 
54  IMPLICIT NONE
55 
56 ! - parameters
57 
58  INTEGER, INTENT(IN) :: key,ndim,nf
59  INTEGER, INTENT(OUT) :: nw
60  INTEGER, INTENT(INOUT) :: maxcls
61  TYPE(t_global), POINTER :: global
62 
63 ! - locals
64 
65  INTEGER :: maxsub,num
66 
67 !******************************************************************************
68 
69  CALL registerfunction(global,'RFLU_ComputeDCUHREInfo',&
70  'RFLU_ComputeDCUHREInfo.F90')
71 
72 ! - Compute information ------------------------------------------------------
73 
74  SELECT CASE (key) ! Select according to integration rule
75  CASE (0)
76  num = 1 + 4*2*ndim + 2*ndim*(ndim-1) + 4*ndim*(ndim-1) &
77  + 4*ndim*(ndim-1)*(ndim-2)/3 + 2**ndim
78  CASE (4)
79  num = 1 + 3*2*ndim + 2*ndim*(ndim-1) + 2**ndim
80  CASE default
81  CALL errorstop(global,err_reached_default,__line__)
82  END SELECT ! KEY
83 
84  maxcls = max(maxcls,4*num) ! documentation recommends MAXCLS >= 3*NUM
85 
86  maxsub = (maxcls - num)/(2*num) + 1
87  nw = maxsub*(2*ndim+2*nf+2) + 17*nf + 1
88 
89  CALL deregisterfunction(global)
90 
91 !******************************************************************************
92 
93  END SUBROUTINE rflu_computedcuhreinfo
94 
95 !******************************************************************************
96 !
97 ! RCS Revision history:
98 !
99 ! $Log: RFLU_ComputeDCUHREInfo.F90,v $
100 ! Revision 1.4 2008/12/06 08:44:12 mtcampbe
101 ! Updated license.
102 !
103 ! Revision 1.3 2008/11/19 22:17:25 mtcampbe
104 ! Added Illinois Open Source License/Copyright
105 !
106 ! Revision 1.2 2002/09/09 14:15:01 haselbac
107 ! global now under regions
108 !
109 ! Revision 1.1 2002/07/25 14:34:59 haselbac
110 ! Initial revision
111 !
112 !******************************************************************************
113 
114 
115 
116 
117 
118 
119 
120 
subroutine rflu_computedcuhreinfo(global, NDIM, NF, KEY, MAXCLS, NW)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
static T_Key key
Definition: vinci_lass.c:76
subroutine deregisterfunction(global)
Definition: ModError.F90:469