Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_ArcLengthBounds.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: calculate approximate arclengths for every grid line
26 ! between two oposite region boundaries (on the finest
27 ! grid only).
28 !
29 ! Description: none.
30 !
31 ! Input: region = grid dimensions
32 ! xyz = node coordinates.
33 !
34 ! Output: arcLen12 = arclength between i=const. boundaries for each j, k
35 ! arcLen34 = arclength between j=const. boundaries for each k, i
36 ! arcLen56 = arclength between k=const. boundaries for each i, j.
37 !
38 ! Notes: none.
39 !
40 !******************************************************************************
41 !
42 ! $Id: RFLO_ArcLengthBounds.F90,v 1.3 2008/12/06 08:44:06 mtcampbe Exp $
43 !
44 ! Copyright: (c) 2001 by the University of Illinois
45 !
46 !******************************************************************************
47 
48 SUBROUTINE rflo_arclengthbounds( region,xyz,arcLen12,arcLen34,arcLen56 )
49 
50  USE moddatatypes
51  USE moddatastruct, ONLY : t_region
53  USE moderror
54  USE modparameters
55  IMPLICIT NONE
56 
57 #include "Indexing.h"
58 
59 ! ... parameters
60  REAL(RFREAL), POINTER :: arclen12(:,:), arclen34(:,:), arclen56(:,:)
61  REAL(RFREAL), POINTER :: xyz(:,:)
62 
63  TYPE(t_region) :: region
64 
65 ! ... loop variables
66  INTEGER :: i, j, k
67 
68 ! ... local variables
69  INTEGER :: ilev, inoff, ijnoff, ijkn, ijkn1
70  INTEGER :: ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend
71 
72 !******************************************************************************
73 
74  CALL registerfunction( region%global,'RFLO_ArcLengthBounds',&
75  'RFLO_ArcLengthBounds.F90' )
76 
77 ! get pointers and dimensions
78 
79  ilev = 1
80  CALL rflo_getdimensphysnodes( region,ilev,ipnbeg,ipnend, &
81  jpnbeg,jpnend,kpnbeg,kpnend )
82  CALL rflo_getnodeoffset( region,ilev,inoff,ijnoff )
83 
84 ! zero out variables
85 
86  arclen12(:,:) = 0._rfreal
87  arclen34(:,:) = 0._rfreal
88  arclen56(:,:) = 0._rfreal
89 
90 ! boundaries 1 and 2 (i=const.)
91 
92  DO i=ipnbeg+1,ipnend
93  DO k=kpnbeg,kpnend
94  DO j=jpnbeg,jpnend
95  ijkn = indijk(i ,j,k,inoff,ijnoff)
96  ijkn1 = indijk(i-1,j,k,inoff,ijnoff)
97  arclen12(j,k) = arclen12(j,k) + &
98  sqrt((xyz(xcoord,ijkn)-xyz(xcoord,ijkn1))**2 + &
99  (xyz(ycoord,ijkn)-xyz(ycoord,ijkn1))**2 + &
100  (xyz(zcoord,ijkn)-xyz(zcoord,ijkn1))**2)
101  ENDDO
102  ENDDO
103  ENDDO
104 
105 ! boundaries 3 and 4 (j=const.)
106 
107  DO j=jpnbeg+1,jpnend
108  DO i=ipnbeg,ipnend
109  DO k=kpnbeg,kpnend
110  ijkn = indijk(i,j ,k,inoff,ijnoff)
111  ijkn1 = indijk(i,j-1,k,inoff,ijnoff)
112  arclen34(k,i) = arclen34(k,i) + &
113  sqrt((xyz(xcoord,ijkn)-xyz(xcoord,ijkn1))**2 + &
114  (xyz(ycoord,ijkn)-xyz(ycoord,ijkn1))**2 + &
115  (xyz(zcoord,ijkn)-xyz(zcoord,ijkn1))**2)
116  ENDDO
117  ENDDO
118  ENDDO
119 
120 ! boundarie 5 and 6 (k=const.)
121 
122  DO k=kpnbeg+1,kpnend
123  DO j=jpnbeg,jpnend
124  DO i=ipnbeg,ipnend
125  ijkn = indijk(i,j,k ,inoff,ijnoff)
126  ijkn1 = indijk(i,j,k-1,inoff,ijnoff)
127  arclen56(i,j) = arclen56(i,j) + &
128  sqrt((xyz(xcoord,ijkn)-xyz(xcoord,ijkn1))**2 + &
129  (xyz(ycoord,ijkn)-xyz(ycoord,ijkn1))**2 + &
130  (xyz(zcoord,ijkn)-xyz(zcoord,ijkn1))**2)
131  ENDDO
132  ENDDO
133  ENDDO
134 
135 ! finalize
136 
137  CALL deregisterfunction( region%global )
138 
139 END SUBROUTINE rflo_arclengthbounds
140 
141 !******************************************************************************
142 !
143 ! RCS Revision history:
144 !
145 ! $Log: RFLO_ArcLengthBounds.F90,v $
146 ! Revision 1.3 2008/12/06 08:44:06 mtcampbe
147 ! Updated license.
148 !
149 ! Revision 1.2 2008/11/19 22:17:19 mtcampbe
150 ! Added Illinois Open Source License/Copyright
151 !
152 ! Revision 1.1 2004/11/29 21:25:15 wasistho
153 ! lower to upper case
154 !
155 ! Revision 1.7 2003/11/20 16:40:34 mdbrandy
156 ! Backing out RocfluidMP changes from 11-17-03
157 !
158 ! Revision 1.4 2003/05/15 02:57:01 jblazek
159 ! Inlined index function.
160 !
161 ! Revision 1.3 2003/03/14 22:05:10 jblazek
162 ! Improved mesh motion algorithm - node movement exchaged between blocks.
163 !
164 ! Revision 1.2 2002/09/05 17:40:19 jblazek
165 ! Variable global moved into regions().
166 !
167 ! Revision 1.1 2002/08/15 19:48:04 jblazek
168 ! Implemented grid deformation capability.
169 !
170 !******************************************************************************
171 
172 
173 
174 
175 
176 
177 
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpnbeg
j indices k indices k
Definition: Indexing.h:6
subroutine rflo_arclengthbounds(region, xyz, arcLen12, arcLen34, arcLen56)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE kpnbeg
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
double sqrt(double d)
Definition: double.h:73
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE jpnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
blockLoc i
Definition: read.cpp:79
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipnbeg
subroutine rflo_getdimensphysnodes(region, iLev, ipnbeg, ipnend, jpnbeg, jpnend, kpnbeg, kpnend)
j indices j
Definition: Indexing.h:6
subroutine deregisterfunction(global)
Definition: ModError.F90:469
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ipnend