Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AverageVecVar.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: two point averaging of vector variable
26 !
27 ! Description: vector variable fvar is averaged from two reference values
28 ! at location ijkN1 and ijkN2, and the result is stored as
29 ! fvar at location ijkD
30 !
31 ! Input: ijkD = location where averaged vector is stored
32 ! ijkN1 = location of first referenced vector
33 ! ijkN2 = location of second referenced vector
34 ! iFBeg = begin index of vector variable component
35 ! iFEnd = end index of vector variable component
36 ! fvar = vector variable array to be averaged from ijkN1 and ijkN2
37 !
38 ! Output: fvar = averaged vector variable stored at ijkD
39 !
40 ! Notes: this routine is meant as service routine for RFLO_CopyEdgeFaceNorm
41 ! and RFLO_CopyEdgeFaceParal in rocflo/, but can be employed by
42 ! other routines if needed
43 !
44 !******************************************************************************
45 !
46 ! $Id: AverageVecVar.F90,v 1.3 2008/12/06 08:44:08 mtcampbe Exp $
47 !
48 ! Copyright: (c) 2001 by the University of Illinois
49 !
50 !******************************************************************************
51 
52 SUBROUTINE averagevecvar( ijkD,ijkN1,ijkN2,iFBeg,iFEnd,fvar )
53 
54  USE moddatatypes
55  IMPLICIT NONE
56 
57 ! ... parameters
58  INTEGER :: ijkd, ijkn1, ijkn2, ifbeg, ifend
59  REAL(RFREAL), POINTER :: fvar(:,:)
60 
61 !******************************************************************************
62 
63  fvar(ifbeg:ifend,ijkd) = 0.5_rfreal*(fvar(ifbeg:ifend,ijkn1)+ &
64  fvar(ifbeg:ifend,ijkn2))
65 
66 END SUBROUTINE averagevecvar
67 
68 !******************************************************************************
69 !
70 ! RCS Revision history:
71 !
72 ! $Log: AverageVecVar.F90,v $
73 ! Revision 1.3 2008/12/06 08:44:08 mtcampbe
74 ! Updated license.
75 !
76 ! Revision 1.2 2008/11/19 22:17:22 mtcampbe
77 ! Added Illinois Open Source License/Copyright
78 !
79 ! Revision 1.1 2004/12/01 16:47:51 haselbac
80 ! Initial revision after changing case
81 !
82 ! Revision 1.4 2002/08/30 01:47:58 jblazek
83 ! Added support for moving grids.
84 !
85 ! Revision 1.3 2002/08/22 01:45:53 jblazek
86 ! And also removed ModError ...
87 !
88 ! Revision 1.2 2002/08/22 01:43:04 jblazek
89 ! Removed RegisterFunction and DeregisterFunction to speed things up.
90 !
91 ! Revision 1.1 2002/07/30 02:41:34 wasistho
92 ! promoted from contained routine to own file
93 !
94 !******************************************************************************
95 
96 
97 
98 
99 
100 
subroutine averagevecvar(ijkD, ijkN1, ijkN2, iFBeg, iFEnd, fvar)