Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RocFracLoadModule.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53 SUBROUTINE rocfrac_load_module( module_name)
54  USE rocfracmain
56  USE integralcheck
57  IMPLICIT NONE
58  include 'roccomf90.h'
59  include 'rocmanf90.h'
60 
61  CHARACTER(*), INTENT(IN) :: module_name
62 
63  LOGICAL :: isdummy
64  INTEGER :: types(7)
65  TYPE(rocfrac_global), POINTER :: glb
66 
67  INTERFACE
68  SUBROUTINE com_set_pointer( attr, ptr, asso)
69  USE rocstar_rocfrac
70  CHARACTER(*), INTENT(IN) :: attr
71  TYPE(rocfrac_global), POINTER :: ptr
72  EXTERNAL asso
73  END SUBROUTINE com_set_pointer
74  END INTERFACE
75 
76  isdummy = trim(module_name) == "RocfracDummy"
77 
78  ALLOCATE( glb)
79  ! dummy rocfrac flag
80  glb%iDummyRocfrac = isdummy
81 
82  CALL com_new_window( module_name)
83 
84  CALL com_new_attribute( module_name//".global", 'w', com_f90pointer, 1, '')
85  CALL com_resize_array( module_name//".global")
86 
87  types(1) = com_f90pointer
88  types(2) = com_double_precision
89  types(3) = com_mpi_comm
90  types(4) = com_integer
91  types(5) = com_string
92  types(6) = com_string
93  types(7) = com_integer
94 
95  CALL com_set_member_function( module_name//".initialize", &
96  rocfracinitialize, module_name//".global", "biiiiii", types)
97 
98  CALL com_set_member_function( module_name//".finalize", &
99  rocfracfinalize, module_name//".global", "b", types)
100 
101  types(3) = com_double_precision
102  types(4) = com_integer
103  IF ( .NOT. isdummy) THEN
104  CALL com_set_member_function( module_name//".update_solution", &
105  rocfracsoln, module_name//".global", "biii", types)
106  ELSE
107  CALL com_set_member_function( module_name//".update_solution", &
108  rocfracinterfaceupdate, module_name//".global", "biii", types)
109  END IF
110 
111 !!! This is for running Rocfrac in standalone mode
112  CALL com_set_member_function( module_name//".update_inbuff_bc_solid", &
113  rocfracupdateinbuff, module_name//".global", "bi", types)
114 
115  types(1) = com_f90pointer
116  types(2) = com_double_precision
117 
118  CALL com_set_member_function( module_name//'.'//man_comp_integ_name, &
119  checkintegral, module_name//".global", "bo", types)
120  CALL com_window_init_done( module_name)
121 
122  CALL com_set_pointer( module_name//".global", glb, associate_pointer)
123 
124 END SUBROUTINE rocfrac_load_module
125 
126 SUBROUTINE rocfrac_unload_module( module_name)
127  USE rocstar_rocfrac
128  IMPLICIT NONE
129  include 'roccomf90.h'
130 
131  CHARACTER(*), INTENT(IN) :: module_name
132 
133  TYPE(rocfrac_global), POINTER :: glb
134 
135  INTERFACE
136  SUBROUTINE com_get_pointer( attr, ptr, asso)
137  USE rocfracmain
138  CHARACTER(*), INTENT(IN) :: attr
139  TYPE(rocfrac_global), POINTER :: ptr
140  EXTERNAL asso
141  END SUBROUTINE com_get_pointer
142  END INTERFACE
143 
144  CALL com_get_pointer( module_name//".global", glb, associate_pointer)
145  DEALLOCATE( glb)
146 
147  CALL com_delete_window( module_name)
148 
149 END SUBROUTINE rocfrac_unload_module
150 
subroutine, public rocfracinitialize(glb, InitialTime, MPI_COMM_ROCSTAR, MAN_init, surfIn, volIn, obtain_attr)
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, public rocfracinterfaceupdate(glb, CurrentTime, CurrentTimeStep, MAN_update_inbuff)
subroutine rocfracupdateinbuff(glb, alpha)
Aff_transformation_rep_baseS2< FT > * ptr() const
subroutine rocfrac_unload_module(module_name)
subroutine, public rocfracsoln(glb, CurrentTime, CurrentTimeStep, MAN_update_inbuff)
subroutine rocfrac_load_module(module_name)
subroutine, public rocfracfinalize(glb)
subroutine checkintegral(glb, IntegralArray)