Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_ComputeStencilSize.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 stencil size for given order.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! global Global pointer
31 ! factor Safety factor
32 ! order Polynomial order
33 !
34 ! Output:
35 ! RFLU_ComputeStencilSize (Minimum) number of points in stencil
36 !
37 ! Notes:
38 ! 1. Include additional support (+1) to allow for interpolation.
39 ! 2. Make larger than necessary to allow for least-squares if order > 1.
40 ! 3. If order = 0, do not include factor.
41 !
42 !******************************************************************************
43 !
44 ! $Id: RFLU_ComputeStencilSize.F90,v 1.4 2008/12/06 08:44:12 mtcampbe Exp $
45 !
46 ! Copyright: (c) 2003 by the University of Illinois
47 !
48 !******************************************************************************
49 
50 INTEGER FUNCTION rflu_computestencilsize(global,factor,order)
51 
52  USE moddatatypes
53  USE moderror
54  USE modparameters
55  USE modglobal, ONLY: t_global
56 
57  IMPLICIT NONE
58 
59 ! *****************************************************************************
60 ! Declarations and definitions
61 ! *****************************************************************************
62 
63 ! =============================================================================
64 ! Arguments
65 ! =============================================================================
66 
67  INTEGER, INTENT(IN) :: factor,order
68  TYPE(t_global), POINTER :: global
69 
70 ! =============================================================================
71 ! Locals
72 ! =============================================================================
73 
74  CHARACTER(CHRLEN) :: rcsidentstring
75 
76 ! *****************************************************************************
77 ! Start
78 ! *****************************************************************************
79 
80  rcsidentstring = '$RCSfile: RFLU_ComputeStencilSize.F90,v $ $Revision: 1.4 $'
81 
82  CALL registerfunction(global,'RFLU_ComputeStencilSize',&
83  'RFLU_ComputeStencilSize.F90')
84 
85 ! *****************************************************************************
86 ! Compute stencil size
87 ! *****************************************************************************
88 
89  IF ( order > 0 ) THEN
90  rflu_computestencilsize = factor*(order + 1)*(order + 2)*(order + 3)/6
91  ELSE
93  END IF ! order
94 
95 ! *****************************************************************************
96 ! End
97 ! *****************************************************************************
98 
99  CALL deregisterfunction(global)
100 
101 END FUNCTION rflu_computestencilsize
102 
103 !******************************************************************************
104 !
105 ! RCS Revision history:
106 !
107 ! $Log: RFLU_ComputeStencilSize.F90,v $
108 ! Revision 1.4 2008/12/06 08:44:12 mtcampbe
109 ! Updated license.
110 !
111 ! Revision 1.3 2008/11/19 22:17:25 mtcampbe
112 ! Added Illinois Open Source License/Copyright
113 !
114 ! Revision 1.2 2006/04/07 15:19:16 haselbac
115 ! Removed tabs
116 !
117 ! Revision 1.1 2003/12/04 03:23:34 haselbac
118 ! Initial revision
119 !
120 !******************************************************************************
121 
122 
123 
124 
125 
126 
127 
Size order() const
Degree of the element. 1 for linear and 2 for quadratic.
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
INTEGER function rflu_computestencilsize(global, factor, order)
subroutine deregisterfunction(global)
Definition: ModError.F90:469