Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLO_Tfint.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: grid generation based on the linear transfinite interpolation (TFI).
26 !
27 ! Description: file contains the following routines:
28 ! - RFLO_Tfint1d = 1-D TFI
29 ! - RFLO_Tfint2d = 2-D TFI
30 !
31 ! Input for Tfint1d: s = normalized arclength
32 ! p1 = coordinates of first edge point
33 ! p2 = coordinates of last edge point.
34 !
35 ! Input for Tfint2d: s1-4 = normalized arclength along edges 1-4
36 ! e1-4 = coordinates along edges 1-4
37 ! p1-4 = coordinates at corners 1-4.
38 !
39 ! Output: xyz = interpolated point.
40 !
41 ! Notes: the edges and corners for Tfint2d are enumbered as follows:
42 !
43 ! 4 4 (j=je) 3
44 ! ----------------
45 ! | |
46 ! 1 (i=is) | | 2 (i=ie)
47 ! | |
48 ! ----------------
49 ! 1 3 (j=js) 2
50 !
51 !******************************************************************************
52 !
53 ! $Id: RFLO_Tfint.F90,v 1.3 2008/12/06 08:44:07 mtcampbe Exp $
54 !
55 ! Copyright: (c) 2001 by the University of Illinois
56 !
57 !******************************************************************************
58 
59 SUBROUTINE rflo_tfint1d( s,p1,p2,xyz )
60 
61  USE moddatatypes
62  IMPLICIT NONE
63 
64 ! ... parameters
65  REAL(RFREAL) :: s, p1(3), p2(3), xyz(3)
66 
67 !******************************************************************************
68 
69  xyz(:) = (1._rfreal-s)*p1(:) + s*p2(:)
70 
71 END SUBROUTINE rflo_tfint1d
72 
73 ! #############################################################################
74 ! #############################################################################
75 
76 SUBROUTINE rflo_tfint2d( s1,s2,s3,s4,e1,e2,e3,e4,p1,p2,p3,p4,xyz )
77 
78  USE moddatatypes
79  IMPLICIT NONE
80 
81 ! ... parameters
82  REAL(RFREAL) :: s1, s2, s3, s4
83  REAL(RFREAL) :: e1(3), e2(3), e3(3), e4(3)
84  REAL(RFREAL) :: p1(3), p2(3), p3(3), p4(3)
85  REAL(RFREAL) :: xyz(3)
86 
87 ! ... local variables
88  REAL(RFREAL) :: a1, a2, phij1, phij2, phii1, phii2
89 
90 !******************************************************************************
91 
92  a1 = s1 - s2
93  a2 = s3 - s4
94  phij1 = (s1-a1*s3)/(1._rfreal-a1*a2)
95  phij2 = 1._rfreal - phij1
96  phii1 = (s3-a2*s1)/(1._rfreal-a1*a2)
97  phii2 = 1._rfreal - phii1
98  xyz(:) = phij2*e3(:) + phij1*e4(:) + &
99  phii2*e1(:) + phii1*e2(:) - &
100  phij2*phii2*p1(:) - phij1*phii1*p3(:) - &
101  phij2*phii1*p2(:) - phij1*phii2*p4(:)
102 
103 END SUBROUTINE rflo_tfint2d
104 
105 !******************************************************************************
106 !
107 ! RCS Revision history:
108 !
109 ! $Log: RFLO_Tfint.F90,v $
110 ! Revision 1.3 2008/12/06 08:44:07 mtcampbe
111 ! Updated license.
112 !
113 ! Revision 1.2 2008/11/19 22:17:21 mtcampbe
114 ! Added Illinois Open Source License/Copyright
115 !
116 ! Revision 1.1 2004/11/29 21:25:17 wasistho
117 ! lower to upper case
118 !
119 ! Revision 1.1 2002/08/15 19:48:05 jblazek
120 ! Implemented grid deformation capability.
121 !
122 !******************************************************************************
123 
124 
125 
126 
127 
128 
double s
Definition: blastest.C:80
NT p1
subroutine rflo_tfint2d(s1, s2, s3, s4, e1, e2, e3, e4, p1, p2, p3, p4, xyz)
Definition: RFLO_Tfint.F90:76
subroutine rflo_tfint1d(s, p1, p2, xyz)
Definition: RFLO_Tfint.F90:59