Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Rocflo_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 windoe to fluids code and register interface functions.
26 !
27 ! Description: none.
28 !
29 ! Input: winName = name of fluids window.
30 !
31 ! Output: registered functions.
32 !
33 ! Notes: none.
34 !
35 !******************************************************************************
36 !
37 ! $Id: Rocflo_load_module.F90,v 1.6 2008/12/06 08:44:01 mtcampbe Exp $
38 !
39 ! Copyright: (c) 2002 by the University of Illinois
40 !
41 !******************************************************************************
42 
43 SUBROUTINE rocflo_load_module( winName )
44 
50  IMPLICIT NONE
51 
52  include 'roccomf90.h'
53 
54  INTERFACE
55  SUBROUTINE com_set_pointer( attr,ptr,asso )
56  USE modrocstar, ONLY : t_globalgenx
57  CHARACTER(*), INTENT(IN) :: attr
58  TYPE(t_globalgenx), POINTER :: ptr
59  EXTERNAL asso
60  END SUBROUTINE com_set_pointer
61  END INTERFACE
62 
63 ! ... parameters
64  CHARACTER(*), INTENT(in) :: winname
65 
66 ! ... local variables
67  LOGICAL :: isdummy
68 
69  INTEGER :: types(7)
70 
71  TYPE(t_globalgenx), POINTER :: glb
72 
73 !******************************************************************************
74 
75  ALLOCATE( glb)
76  ALLOCATE( glb%global )
77 
78  isdummy = trim(winname) == "RocfloDummy"
79  glb%isDummy = isdummy
80  glb%global%winName = winname
81 
82 ! init fluids window
83 
84  CALL com_new_window( winname )
85 
86 ! create an attribute for global data
87 
88  CALL com_new_attribute( winname//'.global','w',com_f90pointer,1,'' )
89 
90  CALL com_allocate_array( winname//'.global')
91 
92 ! solver initialization
93 
94  types(1) = com_f90pointer
95  types(2) = com_double_precision
96  types(3) = com_mpi_comm
97  types(4) = com_integer
98  types(5) = com_string
99  types(6) = com_string
100  types(7) = com_integer
101 
102  CALL com_set_member_function( winname//'.initialize', &
103  rflo_initflowsolver,winname//'.global','biiiiii',types )
104 
105 ! solution update
106 
107  types(1) = com_f90pointer
108  types(2) = com_double_precision
109  types(3) = com_double_precision
110  types(4) = com_integer
111  types(5) = com_integer
112 
113  IF (isdummy) THEN
114  CALL com_set_member_function( winname//'.update_solution', &
115  rflo_flowsolverdummy,winname//'.global','biiii',types )
116  ELSE
117  CALL com_set_member_function( winname//'.update_solution', &
118  rflo_flowsolver,winname//'.global','biiii',types )
119  ENDIF
120 
121 ! standalone mode
122 
123  CALL com_set_member_function( winname//'.update_inbuff_gm_fluid', &
124  rflo_updateinbuffgm,winname//'.global','bi',types )
125 
126 ! shutdown
127 
128  CALL com_set_member_function( winname//'.finalize', &
129  fluid_finalize,winname//'.global','b',types )
130 
131 ! IO
132 
133  CALL com_set_member_function( winname//'.pre_hdf_output', &
134  fluid_prehdfoutput,winname//'.global','b',types )
135 
136  CALL com_set_member_function( winname//'.post_hdf_output', &
137  fluid_posthdfoutput,winname//'.global','b',types )
138 
139 ! finish
140 
141  CALL com_window_init_done( winname )
142 
143  CALL com_set_pointer( winname//'.global',glb,associate_pointer )
144 
145 END SUBROUTINE rocflo_load_module
146 
147 !******************************************************************************
148 !
149 ! RCS Revision history:
150 !
151 ! $Log: Rocflo_load_module.F90,v $
152 ! Revision 1.6 2008/12/06 08:44:01 mtcampbe
153 ! Updated license.
154 !
155 ! Revision 1.5 2008/11/19 22:17:15 mtcampbe
156 ! Added Illinois Open Source License/Copyright
157 !
158 ! Revision 1.4 2005/12/08 19:55:46 wasistho
159 ! added postHdfOutput
160 !
161 ! Revision 1.3 2005/12/08 00:19:06 wasistho
162 ! stored actual time averaged vars in hdf
163 !
164 ! Revision 1.2 2005/02/03 23:04:38 jiao
165 ! Changed the third argument to COM_MPI_COMM.
166 !
167 ! Revision 1.1 2004/12/01 21:23:56 haselbac
168 ! Initial revision after changing case
169 !
170 ! Revision 1.7 2004/06/29 23:53:34 wasistho
171 ! migrated to Roccom-3
172 !
173 ! Revision 1.6 2003/12/07 04:06:26 jiao
174 ! Changed the prototype of COM_set_pointer to be the same as COM_get_pointer,
175 ! so that it takes ASSOCIATE_POINTER as the third argument. This change is
176 ! needed to support PGI compilers.
177 !
178 ! Revision 1.5 2003/11/20 16:40:34 mdbrandy
179 ! Backing out RocfluidMP changes from 11-17-03
180 !
181 ! Revision 1.2 2002/10/18 16:49:19 jblazek
182 ! Changed parameter lists to some GenX routines.
183 !
184 ! Revision 1.1 2002/09/20 22:22:34 jblazek
185 ! Finalized integration into GenX.
186 !
187 !******************************************************************************
188 
189 
190 
191 
192 
193 
subroutine rflo_updateinbuffgm(globalGenx, dAlpha)
subroutine rflo_flowsolverdummy(globalGenx, timeSystem, dTimeSystem, genxHandleBc, genxHandleGm)
subroutine fluid_posthdfoutput(globalGenx)
subroutine rflo_flowsolver(dTimeSystem, dIterSystem, regions)
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)
Aff_transformation_rep_baseS2< FT > * ptr() const
subroutine rflo_initflowsolver(casename, verbLevel, global, regions)
subroutine fluid_finalize(globalGenx)
subroutine fluid_prehdfoutput(globalGenx)
subroutine rocflo_load_module(winName)