Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PLAG_InitSolution.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: initialize memory for all variables associated with the Lagrangian
26 ! particles (PLAG) for all active regions on current processor.
27 !
28 ! Description: none.
29 !
30 ! Input: iReg = current region number
31 ! region = current region
32 !
33 ! Output: region%plag = plag variables
34 !
35 ! Notes: none.
36 !
37 !******************************************************************************
38 !
39 ! $Id: PLAG_InitSolution.F90,v 1.3 2008/12/06 08:44:33 mtcampbe Exp $
40 !
41 ! Copyright: (c) 2002 by the University of Illinois
42 !
43 !******************************************************************************
44 
45 SUBROUTINE plag_initsolution( iReg, region )
46 
47  USE moddatatypes
48  USE moddatastruct, ONLY : t_region, t_level
49  USE modglobal, ONLY : t_global
50  USE modpartlag, ONLY : t_plag, t_plag_input
51  USE moderror
52  USE modparameters
53  USE modmpi
57  IMPLICIT NONE
58 
59 ! ... parameters
60  TYPE(t_region) :: region
61 
62  INTEGER :: ireg
63 
64 ! ... loop variables
65  INTEGER :: ilev, ipcls
66 
67 ! ... local variables
68  CHARACTER(CHRLEN) :: rcsidentstring
69 
70  TYPE(t_level), POINTER :: plevel
71  TYPE(t_plag), POINTER :: pplag
72  TYPE(t_global), POINTER :: global
73 
74 !******************************************************************************
75 
76  rcsidentstring = '$RCSfile: PLAG_InitSolution.F90,v $ $Revision: 1.3 $'
77 
78  global => region%global
79 
80  CALL registerfunction( global, 'PLAG_InitSolution',&
81  'PLAG_InitSolution.F90' )
82 
83  IF ( global%myProcid == masterproc .AND. &
84  global%verbLevel > verbose_none .AND. ireg == 1 ) THEN
85  WRITE(stdout,'(A,3X,A)') solver_name,'Initializing Solution for PLAG...'
86  END IF ! global%verbLevel
87 
88 ! Loop over all grid levels ---------------------------------------------------
89 
90  DO ilev=1,region%nGridLevels
91 
92  plevel => region%levels(ilev)
93  pplag => region%levels(ilev)%plag
94 
95  IF ( pplag%nPcls > 0 ) THEN
96 
97 ! - Load aivOld variables -----------------------------------------------------
98 
99  DO ipcls = 1, pplag%nPcls
100  pplag%aivOld(1:pplag%nAiv,ipcls) = pplag%aiv(1:pplag%nAiv,ipcls)
101  END DO ! iPcls
102 
103 ! - Get derived variables -----------------------------------------------------
104 
105  CALL plag_calcderivedvariables( region )
106 
107 ! - Invoke interpolation for mixture properties -------------------------------
108 
109  CALL plag_intrpmixtproperties( region )
110  END IF ! nPcls
111 
112  ENDDO ! iLev
113 
114 ! finalize --------------------------------------------------------------------
115 
116  CALL deregisterfunction( global )
117 
118 END SUBROUTINE plag_initsolution
119 
120 !******************************************************************************
121 !
122 ! RCS Revision history:
123 !
124 ! $Log: PLAG_InitSolution.F90,v $
125 ! Revision 1.3 2008/12/06 08:44:33 mtcampbe
126 ! Updated license.
127 !
128 ! Revision 1.2 2008/11/19 22:17:46 mtcampbe
129 ! Added Illinois Open Source License/Copyright
130 !
131 ! Revision 1.1 2004/12/01 20:57:39 fnajjar
132 ! Initial revision after changing case
133 !
134 ! Revision 1.3 2003/04/17 00:04:30 fnajjar
135 ! Included iReg=1 clause for verbosity
136 !
137 ! Revision 1.2 2002/12/04 15:35:53 f-najjar
138 ! Recoded to fill appropriate datastructure after PLAG_ReadSolution
139 !
140 ! Revision 1.1 2002/10/25 14:16:31 f-najjar
141 ! Initial Import of Rocpart
142 !
143 !
144 !******************************************************************************
145 
146 
147 
148 
149 
150 
151 
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
subroutine plag_intrpmixtproperties(region)
subroutine plag_calcderivedvariables(region)
subroutine plag_initsolution(iReg, region)
subroutine deregisterfunction(global)
Definition: ModError.F90:469