Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Rocflu_load_module.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: Open window to Rocflu and register interface functions.
26 !
27 ! Description: None.
28 !
29 ! Input:
30 ! winName Name of Rocflu window
31 !
32 ! Output: None.
33 !
34 ! Notes: None.
35 !
36 ! ******************************************************************************
37 !
38 ! $Id: Rocflu_load_module.F90,v 1.5 2008/12/06 08:44:01 mtcampbe Exp $
39 !
40 ! Copyright: (c) 2002-2004 by the University of Illinois
41 !
42 ! ******************************************************************************
43 
44 SUBROUTINE rocflu_load_module(winName)
45 
46  USE modrocstar, ONLY: t_globalgenx, &
48 
49  USE modinterfaces, ONLY : rflu_initflowsolver, &
57  IMPLICIT NONE
58 
59  include 'roccomf90.h'
60  include 'rocmanf90.h'
61 
62 ! ******************************************************************************
63 ! Declarations and definitions
64 ! ******************************************************************************
65 
66 ! ==============================================================================
67 ! Interface
68 ! ==============================================================================
69 
70  INTERFACE
71  SUBROUTINE com_set_pointer(attr,ptr,asso)
72  USE modrocstar, ONLY: t_globalgenx
73  CHARACTER(*), INTENT(IN) :: attr
74  TYPE(t_globalgenx), POINTER :: ptr
75  EXTERNAL asso
76  END SUBROUTINE com_set_pointer
77  END INTERFACE
78 
79 ! ==============================================================================
80 ! Arguments
81 ! ==============================================================================
82 
83  CHARACTER(*), INTENT(IN) :: winname
84 
85 ! ==============================================================================
86 ! Locals
87 ! ==============================================================================
88 
89  LOGICAL :: isdummy
90  INTEGER :: types(7)
91  TYPE(t_globalgenx), POINTER :: glb
92 
93 ! ******************************************************************************
94 ! Start
95 ! ******************************************************************************
96 
97  ALLOCATE(glb)
98  ALLOCATE(glb%global)
99 
100  isdummy = trim(winname) == "RocfluDummy"
101  glb%isDummy = isdummy
102  glb%global%winName = winname
103 
104 ! ******************************************************************************
105 ! Initialize fluids window
106 ! ******************************************************************************
107 
108  CALL com_new_window(winname)
109 
110 ! ******************************************************************************
111 ! Create an attribute for global data
112 ! ******************************************************************************
113 
114  CALL com_new_attribute(winname//'.global','w',com_f90pointer,1,'')
115  CALL com_allocate_array(winname//'.global')
116 
117 ! ******************************************************************************
118 ! Solver initialization
119 ! ******************************************************************************
120 
121  types(1) = com_f90pointer
122  types(2) = com_double_precision
123  types(3) = com_mpi_comm
124  types(4) = com_integer
125  types(5) = com_string
126  types(6) = com_string
127  types(7) = com_integer
128 
129  CALL com_set_member_function(winname//'.initialize',rflu_initflowsolver, &
130  winname//'.global','biiiiii',types)
131 
132 ! ******************************************************************************
133 ! Solution update
134 ! ******************************************************************************
135 
136  types(1) = com_f90pointer
137  types(2) = com_double_precision
138  types(3) = com_double_precision
139  types(4) = com_integer
140  types(5) = com_integer
141 
142  IF ( isdummy .EQV. .true. ) THEN
143  CALL com_set_member_function(winname//'.update_solution', &
144  rflu_flowsolverdummy,winname//'.global', &
145  'biiii',types)
146  ELSE
147  CALL com_set_member_function(winname//'.update_solution', &
148  rflu_flowsolver,winname//'.global','biiii', &
149  types)
150  END IF ! isDummy
151 
152 ! ******************************************************************************
153 ! Integral update
154 ! ******************************************************************************
155 
156  types(1) = com_f90pointer
157  types(2) = com_double_precision
158 
159  CALL com_set_member_function(winname//'.'//man_comp_integ_name, &
160  fluid_compute_integrals,winname//'.global', &
161  'bo',types)
162 
163 ! ******************************************************************************
164 ! Standalone mode
165 ! ******************************************************************************
166 
167  CALL com_set_member_function(winname//'.update_inbuff_gm_fluid', &
168  rflu_updateinbuffgm,winname//'.global','bi', &
169  types)
170 
171 ! ******************************************************************************
172 ! Shutdown
173 ! ******************************************************************************
174 
175  CALL com_set_member_function(winname//'.finalize',fluid_finalize, &
176  winname//'.global','b',types)
177 
178 ! ******************************************************************************
179 ! Pre and Post IO
180 ! ******************************************************************************
181 
182  CALL com_set_member_function(winname//'.pre_hdf_output', &
183  fluid_prehdfoutput,winname//'.global','b', &
184  types)
185 
186  CALL com_set_member_function(winname//'.post_hdf_output', &
187  fluid_posthdfoutput,winname//'.global','b', &
188  types)
189 
190 ! ******************************************************************************
191 ! Finish
192 ! ******************************************************************************
193 
194  CALL com_window_init_done(winname)
195 
196  CALL com_set_pointer(winname//'.global',glb,associate_pointer )
197 
198 ! ******************************************************************************
199 ! End
200 ! ******************************************************************************
201 
202 END SUBROUTINE rocflu_load_module
203 
204 
205 ! ******************************************************************************
206 !
207 ! RCS Revision history:
208 !
209 ! $Log: Rocflu_load_module.F90,v $
210 ! Revision 1.5 2008/12/06 08:44:01 mtcampbe
211 ! Updated license.
212 !
213 ! Revision 1.4 2008/11/19 22:17:15 mtcampbe
214 ! Added Illinois Open Source License/Copyright
215 !
216 ! Revision 1.3 2006/01/07 10:18:47 wasistho
217 ! added Fluid_pre/postHdfOutput
218 !
219 ! Revision 1.2 2005/02/03 23:06:58 jiao
220 ! Changed third argument to RFLU_InitFlowSolver to COM_MPI_COMM.
221 !
222 ! Revision 1.1 2004/12/01 21:23:58 haselbac
223 ! Initial revision after changing case
224 !
225 ! Revision 1.5 2004/10/19 19:23:17 haselbac
226 ! Cosmetics only
227 !
228 ! Revision 1.4 2003/12/07 04:06:26 jiao
229 ! Changed the prototype of COM_set_pointer to be the same as COM_get_pointer,
230 ! so that it takes ASSOCIATE_POINTER as the third argument. This change is
231 ! needed to support PGI compilers.
232 !
233 ! Revision 1.3 2002/11/15 21:23:01 haselbac
234 ! Added integral update routine registration
235 !
236 ! Revision 1.2 2002/10/17 19:57:15 haselbac
237 ! Adapted argument lists of solver routines
238 !
239 ! Revision 1.1 2002/10/05 18:28:58 haselbac
240 ! Initial revision
241 !
242 ! ******************************************************************************
243 
244 
245 
246 
247 
248 
subroutine rflu_flowsolver(dTimeSystem, dIterSystem, levels)
subroutine rflu_updateinbuffgm(globalGenx, dAlpha)
subroutine fluid_posthdfoutput(globalGenx)
const COM::Attribute * attr(const COM::Attribute *a) const
Obtain the attribute on the parent pane of the node.
Definition: Manifold_2.h:404
subroutine associate_pointer(attr, ptr)
subroutine rflu_flowsolverdummy(globalGenx, timeSystem, dTimeSystem, genxHandleBc, genxHandleGm)
Aff_transformation_rep_baseS2< FT > * ptr() const
subroutine fluid_compute_integrals(globalGenx, integ)
subroutine rocflu_load_module(winName)
subroutine fluid_finalize(globalGenx)
subroutine fluid_prehdfoutput(globalGenx)
subroutine rflu_initflowsolver(casename, verbLevel, global, levels)