Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_CalcRhsPosition.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 RHS for Lagrangian particle position field.
26 !
27 ! Description: none.
28 !
29 ! Input: region = data of current region.
30 !
31 ! Output: region%levels%plag%rhs
32 !
33 ! Notes: Use negative values of rhs for consistent RK Updating step.
34 !
35 !******************************************************************************
36 !
37 ! $Id: PLAG_CalcRhsPosition.F90,v 1.3 2008/12/06 08:44:33 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE plag_calcrhsposition( region )
44 
45  USE moddatatypes
46  USE moddatastruct, ONLY : t_region
47  USE modglobal, ONLY : t_global
48  USE modpartlag, ONLY : t_plag
49  USE moderror
50  USE modparameters
52  IMPLICIT NONE
53 
54 ! ... parameters
55  TYPE(t_region), INTENT(INOUT), TARGET :: region
56 
57 ! ... loop variables
58  INTEGER :: ipcls
59 
60 ! ... local variables
61  CHARACTER(CHRLEN) :: rcsidentstring
62 
63 #ifdef RFLO
64  INTEGER :: ilev
65 #endif
66  INTEGER :: npcls
67  REAL(RFREAL), POINTER, DIMENSION(:,:) :: pdv, prhs
68 
69  TYPE(t_plag) , POINTER :: pplag
70  TYPE(t_global), POINTER :: global
71 
72 !******************************************************************************
73 
74  rcsidentstring = '$RCSfile: PLAG_CalcRhsPosition.F90,v $ $Revision: 1.3 $'
75 
76  global => region%global
77 
78  CALL registerfunction( global, 'PLAG_calcRhsPosition',&
79  'PLAG_CalcRhsPosition.F90' )
80 
81 ! Get dimensions --------------------------------------------------------------
82 
83 #ifdef RFLO
84  ilev = region%currLevel
85  npcls = region%levels(ilev)%plag%nPcls
86 #endif
87 #ifdef RFLU
88  npcls = region%plag%nPcls
89 #endif
90 
91 ! Set pointers ----------------------------------------------------------------
92 
93 #ifdef RFLO
94  pplag => region%levels(ilev)%plag
95 #endif
96 #ifdef RFLU
97  pplag => region%plag
98 #endif
99  pdv => pplag%dv
100  prhs => pplag%rhs
101 
102 ! Calculate RHS for position vector field -------------------------------------
103 
104  DO ipcls = 1, npcls
105  prhs(cv_plag_xpos,ipcls) = -pdv(dv_plag_uvel,ipcls)
106  prhs(cv_plag_ypos,ipcls) = -pdv(dv_plag_vvel,ipcls)
107  prhs(cv_plag_zpos,ipcls) = -pdv(dv_plag_wvel,ipcls)
108  END DO ! iPcls
109 
110 ! finalize --------------------------------------------------------------------
111 
112  CALL deregisterfunction( global )
113 
114 END SUBROUTINE plag_calcrhsposition
115 
116 !******************************************************************************
117 !
118 ! RCS Revision history:
119 !
120 ! $Log: PLAG_CalcRhsPosition.F90,v $
121 ! Revision 1.3 2008/12/06 08:44:33 mtcampbe
122 ! Updated license.
123 !
124 ! Revision 1.2 2008/11/19 22:17:45 mtcampbe
125 ! Added Illinois Open Source License/Copyright
126 !
127 ! Revision 1.1 2004/12/01 20:57:03 fnajjar
128 ! Initial revision after changing case
129 !
130 ! Revision 1.2 2004/02/06 21:18:20 fnajjar
131 ! Initial Integration of Rocpart with Rocflu
132 !
133 ! Revision 1.1 2002/10/25 14:14:44 f-najjar
134 ! Initial Import of Rocpart
135 !
136 !
137 !******************************************************************************
138 
139 
140 
141 
142 
143 
144 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine plag_calcrhsposition(region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469