Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFLU_ModRocstarIO.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: Collection of routines related to GENX I/O.
26 !
27 ! Description: None
28 !
29 ! Notes: None.
30 !
31 ! ******************************************************************************
32 !
33 ! $Id: RFLU_ModGENXIO.F90,v 1.15 2008/12/06 08:44:21 mtcampbe Exp $
34 !
35 ! Copyright: (c) 2004-2005 by the University of Illinois
36 !
37 ! ******************************************************************************
38 
40 
41  USE moddatatypes
42  USE modparameters
43  USE moderror
44  USE modglobal, ONLY: t_global
45  USE modbndpatch, ONLY: t_patch
46  USE moddatastruct, ONLY: t_region
47  USE modgrid, ONLY: t_grid
48  USE modmpi
49 
51 
53 
55 
56  IMPLICIT NONE
57 
58  include 'roccomf90.h'
59 
60  PRIVATE
83 
84 ! ******************************************************************************
85 ! Declarations and definitions
86 ! ******************************************************************************
87 
88 ! ==============================================================================
89 ! Private
90 ! ==============================================================================
91 
92  CHARACTER(CHRLEN) :: &
93  RCSIdentString = '$RCSfile: RFLU_ModRocstarIO.F90,v $ $Revision: 1.15 $'
94 
95 ! ==============================================================================
96 ! Public
97 ! ==============================================================================
98 
99  INTEGER, PARAMETER, PUBLIC :: GENX_WINDOW_TYPE_SURF = 1, &
100  GENX_WINDOW_TYPE_VOL = 2
101 
102 ! ******************************************************************************
103 ! Contained routines
104 ! ******************************************************************************
105 
106  CONTAINS
107 
108 
109 
110 
111 
112 
113 
114 ! ******************************************************************************
115 !
116 ! Purpose: Build pane strings for Rocin control file.
117 !
118 ! Description: None.
119 !
120 ! Input:
121 ! pRegion Pointer to region data
122 !
123 ! Output:
124 ! paneStringVol String with pane ids of volume data
125 ! paneStringSurf String with pane ids of surface data
126 !
127 ! Notes: None.
128 !
129 ! ******************************************************************************
130 
131  SUBROUTINE rflu_genx_buildrocinpanestrings(pRegion,paneStringVol, &
132  panestringsurf)
133 
134  IMPLICIT NONE
135 
136 ! ******************************************************************************
137 ! Declarations and definitions
138 ! ******************************************************************************
139 
140 ! ==============================================================================
141 ! Arguments
142 ! ==============================================================================
143 
144  CHARACTER(*), INTENT(INOUT) :: panestringsurf,panestringvol
145  TYPE(t_region), POINTER :: pregion
146 
147 ! ==============================================================================
148 ! Locals
149 ! ==============================================================================
150 
151  CHARACTER(CHRLEN) :: tempstring
152  INTEGER :: ipatch,paneid
153  TYPE(t_global), POINTER :: global
154 
155 ! ******************************************************************************
156 ! Start
157 ! ******************************************************************************
158 
159  global => pregion%global
160 
161  CALL registerfunction(global,'RFLU_GENX_BuildRocinPaneStrings', &
162  'RFLU_ModRocstarIO.F90')
163 
164  IF ( global%myProcid == masterproc .AND. &
165  global%verbLevel >= verbose_high ) THEN
166  WRITE(stdout,'(A,1X,A)') solver_name,'Building Rocin pane strings...'
167  END IF ! global%verbLevel
168 
169  IF ( global%myProcid == masterproc .AND. &
170  global%verbLevel >= verbose_high ) THEN
171  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
172  pregion%iRegionGlobal
173  END IF ! global%myProcid
174 
175 ! ******************************************************************************
176 ! Write file
177 ! ******************************************************************************
178 
179  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,0,paneid)
180 
181  WRITE(tempstring,*) paneid
182  WRITE(panestringvol,'(A)') trim(panestringvol)//' '// &
183  adjustl(trim(tempstring))
184 
185  DO ipatch = 1,pregion%grid%nPatches
186  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,ipatch,paneid)
187 
188  WRITE(tempstring,*) paneid
189  WRITE(panestringsurf,'(A)') trim(panestringsurf)//' '// &
190  adjustl(trim(tempstring))
191  END DO ! iPatch
192 
193 ! ******************************************************************************
194 ! End
195 ! ******************************************************************************
196 
197  IF ( global%myProcid == masterproc .AND. &
198  global%verbLevel >= verbose_high ) THEN
199  WRITE(stdout,'(A,1X,A)') solver_name,'Building Rocin pane strings done.'
200  END IF ! global%verbLevel
201 
202  CALL deregisterfunction(global)
203 
204  END SUBROUTINE rflu_genx_buildrocinpanestrings
205 
206 
207 
208 
209 
210 
211 
212 ! ******************************************************************************
213 !
214 ! Purpose: Close control files for Rocin.
215 !
216 ! Description: None.
217 !
218 ! Input:
219 ! global Pointer to global data
220 !
221 ! Output: None.
222 !
223 ! Notes: None.
224 !
225 ! ******************************************************************************
226 
227  SUBROUTINE rflu_genx_closerocinctrlfiles(global)
228 
229  IMPLICIT NONE
230 
231 ! ******************************************************************************
232 ! Declarations and definitions
233 ! ******************************************************************************
234 
235 ! ==============================================================================
236 ! Arguments
237 ! ==============================================================================
238 
239  TYPE(t_global), POINTER :: global
240 
241 ! ==============================================================================
242 ! Locals
243 ! ==============================================================================
244 
245  CHARACTER(CHRLEN) :: ifilename
246  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
247  INTEGER :: errorflag
248 
249 ! ******************************************************************************
250 ! Start
251 ! ******************************************************************************
252 
253  CALL registerfunction(global,'RFLU_GENX_CloseRocinCtrlFiles', &
254  'RFLU_ModRocstarIO.F90')
255 
256  IF ( global%myProcid == masterproc .AND. &
257  global%verbLevel >= verbose_high ) THEN
258  WRITE(stdout,'(A,1X,A)') solver_name,'Closing Rocin control files...'
259  END IF ! global%verbLevel
260 
261 ! ******************************************************************************
262 ! Close files
263 ! ******************************************************************************
264 
265 ! ==============================================================================
266 ! Volume file
267 ! ==============================================================================
268 
269  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
270  ifilename = './Rocflu/Rocin/fluid_in_'//trim(timestring)//'.txt'
271 
272  CLOSE(if_ctrl_vol,iostat=errorflag)
273  global%error = errorflag
274  IF ( global%error /= err_none ) THEN
275  CALL errorstop(global,err_file_close,__line__,ifilename)
276  END IF ! global%error
277 
278 ! ==============================================================================
279 ! Surface file
280 ! ==============================================================================
281 
282  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
283  ifilename = './Rocflu/Rocin/ifluid_in_'//trim(timestring)//'.txt'
284 
285  CLOSE(if_ctrl_surf,iostat=errorflag)
286  global%error = errorflag
287  IF ( global%error /= err_none ) THEN
288  CALL errorstop(global,err_file_close,__line__,ifilename)
289  END IF ! global%error
290 
291 ! ******************************************************************************
292 ! End
293 ! ******************************************************************************
294 
295  IF ( global%myProcid == masterproc .AND. &
296  global%verbLevel >= verbose_high ) THEN
297  WRITE(stdout,'(A,1X,A)') solver_name,'Closing Rocin control files done.'
298  END IF ! global%verbLevel
299 
300  CALL deregisterfunction(global)
301 
302  END SUBROUTINE rflu_genx_closerocinctrlfiles
303 
304 
305 
306 
307 
308 
309 ! ******************************************************************************
310 !
311 ! Purpose: Decide whether GENX files should be read.
312 !
313 ! Description: None.
314 !
315 ! Input:
316 ! global Pointer to global data
317 !
318 ! Output: None.
319 !
320 ! Notes: None.
321 !
322 ! ******************************************************************************
323 
324  LOGICAL FUNCTION rflu_genx_decidereadfile(global)
325 
326  IMPLICIT NONE
327 
328 ! ******************************************************************************
329 ! Declarations and definitions
330 ! ******************************************************************************
331 
332 ! ==============================================================================
333 ! Arguments
334 ! ==============================================================================
335 
336  TYPE(t_global), POINTER :: global
337 
338 ! ******************************************************************************
339 ! Start
340 ! ******************************************************************************
341 
342  CALL registerfunction(global,'RFLU_GENX_DecideReadFile',&
343  'RFLU_ModRocstarIO.F90')
344 
345 ! ******************************************************************************
346 ! Decide whether need to read files
347 ! ******************************************************************************
348 
349  IF ( global%moduleType == module_type_part ) THEN
350  rflu_genx_decidereadfile = .true.
351  ELSE IF ( global%moduleType == module_type_solver ) THEN
352  rflu_genx_decidereadfile = .true.
353  ELSE IF ( global%moduleType == module_type_postproc ) THEN
354  rflu_genx_decidereadfile = .true.
355  ELSE IF ( global%moduleType == module_type_init ) THEN
356  rflu_genx_decidereadfile = .true.
357  ELSE
358  CALL errorstop(global,err_reached_default,__line__)
359  END IF ! global%moduleType
360 
361 ! ******************************************************************************
362 ! End
363 ! ******************************************************************************
364 
365  CALL deregisterfunction(global)
366 
367  END FUNCTION rflu_genx_decidereadfile
368 
369 
370 
371 
372 
373 
374 ! ******************************************************************************
375 !
376 ! Purpose: Decide whether files should be written.
377 !
378 ! Description: None.
379 !
380 ! Input:
381 ! global Pointer to global data
382 !
383 ! Output: None.
384 !
385 ! Notes: None.
386 !
387 ! ******************************************************************************
388 
389  LOGICAL FUNCTION rflu_genx_decidewritefile(global)
390 
391  IMPLICIT NONE
392 
393 ! ******************************************************************************
394 ! Declarations and definitions
395 ! ******************************************************************************
396 
397 ! ==============================================================================
398 ! Arguments
399 ! ==============================================================================
400 
401  TYPE(t_global), POINTER :: global
402 
403 ! ******************************************************************************
404 ! Start
405 ! ******************************************************************************
406 
407  CALL registerfunction(global,'RFLU_GENX_DecideWriteFile',&
408  'RFLU_ModRocstarIO.F90')
409 
410 ! ******************************************************************************
411 ! Decide whether need to write files
412 ! ******************************************************************************
413 
414  IF ( global%moduleType == module_type_part ) THEN
416  ELSE IF ( global%moduleType == module_type_solver ) THEN
417  rflu_genx_decidewritefile = .false.
418  ELSE IF ( global%moduleType == module_type_postproc ) THEN
419  rflu_genx_decidewritefile = .true.
420  ELSE IF ( global%moduleType == module_type_init ) THEN
421  rflu_genx_decidewritefile = .true.
422  ELSE
423  CALL errorstop(global,err_reached_default,__line__)
424  END IF ! global%moduleType
425 
426 ! ******************************************************************************
427 ! End
428 ! ******************************************************************************
429 
430  CALL deregisterfunction(global)
431 
432  END FUNCTION rflu_genx_decidewritefile
433 
434 
435 
436 
437 
438 
439 
440 ! ******************************************************************************
441 !
442 ! Purpose: Get flow data through Roccom.
443 !
444 ! Description: None.
445 !
446 ! Input:
447 ! pRegion Pointer to region
448 !
449 ! Output: None.
450 !
451 ! Notes: None.
452 !
453 ! ******************************************************************************
454 
455  SUBROUTINE rflu_genx_getdataflow(pRegion)
456 
457  IMPLICIT NONE
458 
459 ! ******************************************************************************
460 ! Declarations and definitions
461 ! ******************************************************************************
462 
463 ! ==============================================================================
464 ! Arguments
465 ! ==============================================================================
466 
467  TYPE(t_region), POINTER :: pregion
468 
469 ! ==============================================================================
470 ! Locals
471 ! ==============================================================================
472 
473  CHARACTER(CHRLEN) :: winname,winnamein
474  INTEGER :: handlein,handleobtain,handleout
475  TYPE(t_global), POINTER :: global
476  TYPE(t_grid), POINTER :: pgrid
477 
478 ! ******************************************************************************
479 ! Start, set pointers and variables
480 ! ******************************************************************************
481 
482  global => pregion%global
483 
484  handleobtain = global%handleObtain
485 
486  pregion%mixt%cvState = cv_mixt_state_cons
487 
488  IF ( global%myProcid == masterproc .AND. &
489  global%verbLevel >= verbose_high ) THEN
490  WRITE(stdout,'(A,1X,A)') solver_name,'Getting flow data...'
491  END IF ! global%verbLevel
492 
493  IF ( global%myProcid == masterproc .AND. &
494  global%verbLevel >= verbose_high) THEN
495  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
496  pregion%iRegionGlobal
497  END IF ! global%myProcid
498 
499 ! ******************************************************************************
500 ! Get flow data
501 ! ******************************************************************************
502 
503  winnamein = global%volWinNameInput
504  winname = global%volWinName
505 
506 ! ==============================================================================
507 ! Conserved variables
508 ! ==============================================================================
509 
510  handlein = com_get_attribute_handle_const(trim(winnamein)//'.rhof')
511  handleout = com_get_attribute_handle(trim(winname)//'.rhof')
512  CALL com_call_function(handleobtain,2,handlein,handleout)
513 
514  handlein = com_get_attribute_handle_const(trim(winnamein)//'.rhovf')
515  handleout = com_get_attribute_handle(trim(winname)//'.rhovf')
516  CALL com_call_function(handleobtain,2,handlein,handleout)
517 
518  handlein = com_get_attribute_handle_const(trim(winnamein)//'.rhoEf')
519  handleout = com_get_attribute_handle(trim(winname)//'.rhoEf')
520  CALL com_call_function(handleobtain,2,handlein,handleout)
521 
522 ! ==============================================================================
523 ! Dependent variables NOT obtained from Roccom because will be set later
524 ! ==============================================================================
525 
526 ! ******************************************************************************
527 ! End
528 ! ******************************************************************************
529 
530  IF ( global%myProcid == masterproc .AND. &
531  global%verbLevel >= verbose_high ) THEN
532  WRITE(stdout,'(A,1X,A)') solver_name,'Getting flow data done.'
533  END IF ! global%verbLevel
534 
535  END SUBROUTINE rflu_genx_getdataflow
536 
537 
538 
539 
540 
541 
542 
543 
544 ! ******************************************************************************
545 !
546 ! Purpose: Get surface grid speed data through Roccom.
547 !
548 ! Description: None.
549 !
550 ! Input:
551 ! pRegion Pointer to region
552 !
553 ! Output: None.
554 !
555 ! Notes: None.
556 !
557 ! ******************************************************************************
558 
559  SUBROUTINE rflu_genx_getdatagspeedssurf(pRegion)
560 
561  IMPLICIT NONE
562 
563 ! ******************************************************************************
564 ! Declarations and definitions
565 ! ******************************************************************************
566 
567 ! ==============================================================================
568 ! Arguments
569 ! ==============================================================================
570 
571  TYPE(t_region), POINTER :: pregion
572 
573 ! ==============================================================================
574 ! Locals
575 ! ==============================================================================
576 
577  CHARACTER(CHRLEN) :: winname,winnamein
578  INTEGER :: handlein,handleobtain,handleout
579  TYPE(t_global), POINTER :: global
580  TYPE(t_grid), POINTER :: pgrid
581 
582 ! ******************************************************************************
583 ! Start, set pointers and variables
584 ! ******************************************************************************
585 
586  global => pregion%global
587 
588  handleobtain = global%handleObtain
589 
590  IF ( global%myProcid == masterproc .AND. &
591  global%verbLevel >= verbose_high ) THEN
592  WRITE(stdout,'(A,1X,A)') solver_name,'Getting surface grid speeds...'
593  END IF ! global%verbLevel
594 
595  IF ( global%myProcid == masterproc .AND. &
596  global%verbLevel >= verbose_high) THEN
597  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
598  pregion%iRegionGlobal
599  END IF ! global%myProcid
600 
601 ! ******************************************************************************
602 ! Get grid speeds
603 ! ******************************************************************************
604 
605  winnamein = global%surfWinNameInput
606  winname = global%surfWinName
607 
608  handlein = com_get_attribute_handle_const(trim(winnamein)//'.gs')
609  IF ( handlein > 0 ) THEN
610  handleout = com_get_attribute_handle(trim(winname)//'.gs')
611  CALL com_call_function(handleobtain,2,handlein,handleout)
612  END IF ! handleIn
613 
614 ! ******************************************************************************
615 ! End
616 ! ******************************************************************************
617 
618  IF ( global%myProcid == masterproc .AND. &
619  global%verbLevel >= verbose_high ) THEN
620  WRITE(stdout,'(A,1X,A)') solver_name,'Getting surface grid speeds done.'
621  END IF ! global%verbLevel
622 
623  END SUBROUTINE rflu_genx_getdatagspeedssurf
624 
625 
626 
627 
628 
629 
630 
631 
632 ! ******************************************************************************
633 !
634 ! Purpose: Get volume grid speed data through Roccom.
635 !
636 ! Description: None.
637 !
638 ! Input:
639 ! pRegion Pointer to region
640 !
641 ! Output: None.
642 !
643 ! Notes: None.
644 !
645 ! ******************************************************************************
646 
647  SUBROUTINE rflu_genx_getdatagspeedsvol(pRegion)
648 
649  IMPLICIT NONE
650 
651 ! ******************************************************************************
652 ! Declarations and definitions
653 ! ******************************************************************************
654 
655 ! ==============================================================================
656 ! Arguments
657 ! ==============================================================================
658 
659  TYPE(t_region), POINTER :: pregion
660 
661 ! ==============================================================================
662 ! Locals
663 ! ==============================================================================
664 
665  CHARACTER(CHRLEN) :: winname,winnamein
666  INTEGER :: handlein,handleobtain,handleout
667  TYPE(t_global), POINTER :: global
668  TYPE(t_grid), POINTER :: pgrid
669 
670 ! ******************************************************************************
671 ! Start, set pointers and variables
672 ! ******************************************************************************
673 
674  global => pregion%global
675 
676  handleobtain = global%handleObtain
677 
678  IF ( global%myProcid == masterproc .AND. &
679  global%verbLevel >= verbose_high ) THEN
680  WRITE(stdout,'(A,1X,A)') solver_name,'Getting volume grid speeds...'
681  END IF ! global%verbLevel
682 
683  IF ( global%myProcid == masterproc .AND. &
684  global%verbLevel >= verbose_high) THEN
685  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
686  pregion%iRegionGlobal
687  END IF ! global%myProcid
688 
689 ! ******************************************************************************
690 ! Get grid speeds
691 ! ******************************************************************************
692 
693  winnamein = global%volWinNameInput
694  winname = global%volWinName
695 
696  handlein = com_get_attribute_handle_const(trim(winnamein)//'.gs')
697  IF ( handlein > 0 ) THEN
698  handleout = com_get_attribute_handle(trim(winname)//'.gs')
699  CALL com_call_function(handleobtain,2,handlein,handleout)
700  END IF ! handleIn
701 
702 ! ******************************************************************************
703 ! End
704 ! ******************************************************************************
705 
706  IF ( global%myProcid == masterproc .AND. &
707  global%verbLevel >= verbose_high ) THEN
708  WRITE(stdout,'(A,1X,A)') solver_name,'Getting volume grid speeds done.'
709  END IF ! global%verbLevel
710 
711  END SUBROUTINE rflu_genx_getdatagspeedsvol
712 
713 
714 
715 
716 
717 ! ******************************************************************************
718 !
719 ! Purpose: Get interface data through Roccom.
720 !
721 ! Description: None.
722 !
723 ! Input:
724 ! pRegion Pointer to region
725 !
726 ! Output: None.
727 !
728 ! Notes: None.
729 !
730 ! ******************************************************************************
731 
732  SUBROUTINE rflu_genx_getdatainterf(pRegion)
733 
734  IMPLICIT NONE
735 
736 ! ******************************************************************************
737 ! Declarations and definitions
738 ! ******************************************************************************
739 
740 ! ==============================================================================
741 ! Arguments
742 ! ==============================================================================
743 
744  TYPE(t_region), POINTER :: pregion
745 
746 ! ==============================================================================
747 ! Locals
748 ! ==============================================================================
749 
750  CHARACTER(CHRLEN) :: winname,winnamein
751  INTEGER :: handlein,handleobtain,handleout
752  TYPE(t_global), POINTER :: global
753  TYPE(t_grid), POINTER :: pgrid
754 
755 ! ******************************************************************************
756 ! Start, set pointers and variables
757 ! ******************************************************************************
758 
759  global => pregion%global
760 
761  handleobtain = global%handleObtain
762 
763  IF ( global%myProcid == masterproc .AND. &
764  global%verbLevel >= verbose_high ) THEN
765  WRITE(stdout,'(A,1X,A)') solver_name,'Getting interface data...'
766  END IF ! global%verbLevel
767 
768  IF ( global%myProcid == masterproc .AND. &
769  global%verbLevel >= verbose_high) THEN
770  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
771  pregion%iRegionGlobal
772  END IF ! global%myProcid
773 
774 ! ******************************************************************************
775 ! Get interface data
776 ! ******************************************************************************
777 
778  winnamein = global%surfWinNameInput
779  winname = global%surfWinName
780 
781 ! ==============================================================================
782 ! Input data
783 ! ==============================================================================
784 
785  handlein = com_get_attribute_handle_const(trim(winnamein)//'.du_alp')
786  IF ( handlein > 0 ) THEN
787  handleout = com_get_attribute_handle(trim(winname)//'.du_alp')
788  CALL com_call_function(handleobtain,2,handlein,handleout)
789  END IF ! handleIn
790 
791  handlein = com_get_attribute_handle_const(trim(winnamein)//'.rhofvf_alp')
792  IF ( handlein > 0 ) THEN
793  handleout = com_get_attribute_handle(trim(winname)//'.rhofvf_alp')
794  CALL com_call_function(handleobtain,2,handlein,handleout)
795  END IF ! handleIn
796 
797  handlein = com_get_attribute_handle_const(trim(winnamein)//'.mdot_alp')
798  IF ( handlein > 0 ) THEN
799  handleout = com_get_attribute_handle(trim(winname)//'.mdot_alp')
800  CALL com_call_function(handleobtain,2,handlein,handleout)
801  END IF ! handleIn
802 
803  handlein = com_get_attribute_handle_const(trim(winnamein)//'.Tflm_alp')
804  IF ( handlein > 0 ) THEN
805  handleout = com_get_attribute_handle(trim(winname)//'.Tflm_alp')
806  CALL com_call_function(handleobtain,2,handlein,handleout)
807  END IF ! handleIn
808 
809  handlein = com_get_attribute_handle_const(trim(winnamein)//'.Tb_alp')
810  IF ( handlein > 0 ) THEN
811  handleout = com_get_attribute_handle(trim(winname)//'.Tb_alp')
812  CALL com_call_function(handleobtain,2,handlein,handleout)
813  END IF ! handleIn
814 
815 ! ==============================================================================
816 ! Output data
817 ! ==============================================================================
818 
819  handlein = com_get_attribute_handle_const(trim(winnamein)//'.nfAlp')
820  IF ( handlein > 0 ) THEN
821  handleout = com_get_attribute_handle(trim(winname)//'.nfAlp')
822  CALL com_call_function(handleobtain,2,handlein,handleout)
823  END IF ! handleIn
824 
825  handlein = com_get_attribute_handle_const(trim(winnamein)//'.rhofAlp')
826  IF ( handlein > 0 ) THEN
827  handleout = com_get_attribute_handle(trim(winname)//'.rhofAlp')
828  CALL com_call_function(handleobtain,2,handlein,handleout)
829  END IF ! handleIn
830 
831  handlein = com_get_attribute_handle_const(trim(winnamein)//'.pf')
832  IF ( handlein > 0 ) THEN
833  handleout = com_get_attribute_handle(trim(winname)//'.pf')
834  CALL com_call_function(handleobtain,2,handlein,handleout)
835  END IF ! handleIn
836 
837  handlein = com_get_attribute_handle_const(trim(winnamein)//'.tf')
838  IF ( handlein > 0 ) THEN
839  handleout = com_get_attribute_handle(trim(winname)//'.tf')
840  CALL com_call_function(handleobtain,2,handlein,handleout)
841  END IF ! handleIn
842 
843  handlein = com_get_attribute_handle_const(trim(winnamein)//'.qc')
844  IF ( handlein > 0 ) THEN
845  handleout = com_get_attribute_handle(trim(winname)//'.qc')
846  CALL com_call_function(handleobtain,2,handlein,handleout)
847  END IF ! handleIn
848 
849  handlein = com_get_attribute_handle_const(trim(winnamein)//'.qr')
850  IF ( handlein > 0 ) THEN
851  handleout = com_get_attribute_handle(trim(winname)//'.qr')
852  CALL com_call_function(handleobtain,2,handlein,handleout)
853  END IF ! handleIn
854 
855  handlein = com_get_attribute_handle_const(trim(winnamein)//'.tempf')
856  IF ( handlein > 0 ) THEN
857  handleout = com_get_attribute_handle(trim(winname)//'.tempf')
858  CALL com_call_function(handleobtain,2,handlein,handleout)
859  END IF ! handleIn
860 
861  handlein = com_get_attribute_handle_const(trim(winnamein)//'.bFlag')
862  IF ( handlein > 0 ) THEN
863  handleout = com_get_attribute_handle(trim(winname)//'.bFlag')
864  CALL com_call_function(handleobtain,2,handlein,handleout)
865  END IF ! handleIn
866 
867 ! ******************************************************************************
868 ! End
869 ! ******************************************************************************
870 
871  IF ( global%myProcid == masterproc .AND. &
872  global%verbLevel >= verbose_high ) THEN
873  WRITE(stdout,'(A,1X,A)') solver_name,'Getting interface data done.'
874  END IF ! global%verbLevel
875 
876  END SUBROUTINE rflu_genx_getdatainterf
877 
878 
879 
880 
881 
882 
883 
884 ! ******************************************************************************
885 !
886 ! Purpose: Get dimensions through Roccom.
887 !
888 ! Description: None.
889 !
890 ! Input:
891 ! pRegion Pointer to region
892 !
893 ! Output: None.
894 !
895 ! Notes: None.
896 !
897 ! ******************************************************************************
898 
899  SUBROUTINE rflu_genx_getdimensions(pRegion)
900 
901  IMPLICIT NONE
902 
903 ! ******************************************************************************
904 ! Declarations and definitions
905 ! ******************************************************************************
906 
907 ! ==============================================================================
908 ! Arguments
909 ! ==============================================================================
910 
911  TYPE(t_region), POINTER :: pregion
912 
913 ! ==============================================================================
914 ! Locals
915 ! ==============================================================================
916 
917  CHARACTER(CHRLEN) :: conntable,winnamein
918  CHARACTER, DIMENSION(:), POINTER :: conntables
919  INTEGER :: handle,ibeg,iconntable,iend,ipane,ipatch,nchars,nconntables, &
920  nactual,ndummy,npanes,nvirtual,paneid
921  INTEGER, DIMENSION(:), POINTER :: panelist
922  TYPE(t_global), POINTER :: global
923  TYPE(t_grid), POINTER :: pgrid
924  TYPE(t_patch), POINTER :: ppatch
925 
926 ! ******************************************************************************
927 ! Start, set pointers and variables
928 ! ******************************************************************************
929 
930  global => pregion%global
931 
932  pgrid => pregion%grid
933 
934  IF ( global%myProcid == masterproc .AND. &
935  global%verbLevel >= verbose_high ) THEN
936  WRITE(stdout,'(A,1X,A)') solver_name,'Getting dimensions...'
937  END IF ! global%verbLevel
938 
939  IF ( global%myProcid == masterproc .AND. &
940  global%verbLevel >= verbose_high) THEN
941  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
942  pregion%iRegionGlobal
943  END IF ! global%myProcid
944 
945 ! ******************************************************************************
946 ! Get dimensions
947 ! ******************************************************************************
948 
949 ! ==============================================================================
950 ! Volume
951 ! ==============================================================================
952 
953  winnamein = global%volWinNameInput
954 
955  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,0,paneid)
956 
957 ! ------------------------------------------------------------------------------
958 ! Vertices
959 ! ------------------------------------------------------------------------------
960 
961  CALL com_get_size(trim(winnamein)//'.nc',paneid,pgrid%nVert,nvirtual)
962 
963  pgrid%nVertTot = pgrid%nVert + nvirtual
964 
965 ! ------------------------------------------------------------------------------
966 ! Connectivity tables
967 ! ------------------------------------------------------------------------------
968 
969  pgrid%nTets = 0
970  pgrid%nHexs = 0
971  pgrid%nPris = 0
972  pgrid%nPyrs = 0
973 
974  pgrid%nTetsTot = 0
975  pgrid%nHexsTot = 0
976  pgrid%nPrisTot = 0
977  pgrid%nPyrsTot = 0
978 
979  CALL com_get_connectivities(trim(winnamein),paneid,nconntables,conntables)
980 
981  ibeg = 1
982 
983  DO iconntable = 1,nconntables
984  iend = ibeg
985  nchars = 0
986 
987  DO
988  IF ( conntables(iend) /= ' ' ) THEN
989  nchars = nchars + 1
990  conntable(nchars:nchars) = conntables(iend)
991  iend = iend + 1
992  ELSE
993  EXIT
994  END IF ! connTables
995 
996  IF ( iend > ubound(conntables,1) ) THEN
997  EXIT
998  END IF ! iEnd
999  END DO ! <emptyLoop>
1000 
1001  SELECT CASE ( conntable(1:nchars) )
1002  CASE ( ':T4:real' )
1003  CALL com_get_size(trim(winnamein)//'.:T4:real',paneid,pgrid%nTets, &
1004  ndummy)
1005  CASE ( ':T4:virtual' )
1006  CALL com_get_size(trim(winnamein)//'.:T4:virtual',paneid, &
1007  pgrid%nTetsTot,ndummy)
1008  CASE ( ':H8:real' )
1009  CALL com_get_size(trim(winnamein)//'.:H8:real',paneid,pgrid%nHexs, &
1010  ndummy)
1011  CASE ( ':H8:virtual' )
1012  CALL com_get_size(trim(winnamein)//'.:H8:virtual',paneid, &
1013  pgrid%nHexsTot,ndummy)
1014  CASE ( ':W6:real' )
1015  CALL com_get_size(trim(winnamein)//'.:W6:real',paneid,pgrid%nPris, &
1016  ndummy)
1017  CASE ( ':W6:virtual' )
1018  CALL com_get_size(trim(winnamein)//'.:W6:virtual',paneid, &
1019  pgrid%nPrisTot,ndummy)
1020  CASE ( ':P5:real' )
1021  CALL com_get_size(trim(winnamein)//'.:P5:real',paneid,pgrid%nPyrs, &
1022  ndummy)
1023  CASE ( ':P5:virtual' )
1024  CALL com_get_size(trim(winnamein)//'.:P5:virtual',paneid, &
1025  pgrid%nPyrsTot,ndummy)
1026  CASE default
1027  CALL errorstop(global,err_reached_default,__line__)
1028  END SELECT ! connTable
1029  END DO ! iConnTable
1030 
1031  pgrid%nTetsTot = pgrid%nTetsTot + pgrid%nTets
1032  pgrid%nHexsTot = pgrid%nHexsTot + pgrid%nHexs
1033  pgrid%nPrisTot = pgrid%nPrisTot + pgrid%nPris
1034  pgrid%nPyrsTot = pgrid%nPyrsTot + pgrid%nPyrs
1035 
1036  CALL com_free_buffer(conntables)
1037 
1038 ! ==============================================================================
1039 ! Surface
1040 ! ==============================================================================
1041 
1042  winnamein = global%surfWinNameInput
1043 
1044 ! -----------------------------------------------------------------------------
1045 ! Get number of patches. NOTE get panes of surface window only.
1046 ! -----------------------------------------------------------------------------
1047 
1048  CALL com_get_panes(trim(winnamein),npanes,panelist)
1049 
1050 ! DEBUG
1051 ! WRITE(*,*) 'nPanes:',nPanes
1052 !
1053 ! pGrid%nPatches = nPanes
1054 !
1055 ! DO iPane = 1,nPanes
1056 ! WRITE(*,*) iPane,paneList(iPane)
1057 ! END DO ! iPane
1058 ! END DEBUG
1059 
1060  CALL com_free_buffer(panelist)
1061 
1062 ! -----------------------------------------------------------------------------
1063 ! Loop over patches
1064 ! -----------------------------------------------------------------------------
1065 
1066 ! DEBUG
1067 ! WRITE(*,*) 'nPatches:',pGrid%nPatches
1068 ! END DEBUG
1069 
1070  DO ipatch = 1,pgrid%nPatches
1071  pgrid%patchDimens(patch_dimens_nbtris ,ipatch) = 0
1072  pgrid%patchDimens(patch_dimens_nbtristot ,ipatch) = 0
1073  pgrid%patchDimens(patch_dimens_nbquads ,ipatch) = 0
1074  pgrid%patchDimens(patch_dimens_nbquadstot,ipatch) = 0
1075 
1076  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,ipatch,paneid)
1077 
1078  CALL com_get_connectivities(trim(winnamein),paneid,nconntables, &
1079  conntables)
1080 
1081 ! --- Connectivity tables -----------------------------------------------------
1082 
1083  ibeg = 1
1084 
1085  DO iconntable = 1,nconntables
1086  iend = ibeg
1087  nchars = 0
1088 
1089  DO
1090  IF ( conntables(iend) /= ' ' ) THEN
1091  nchars = nchars + 1
1092  conntable(nchars:nchars) = conntables(iend)
1093  iend = iend + 1
1094  ELSE
1095  EXIT
1096  END IF ! connTables
1097 
1098  IF ( iend > ubound(conntables,1) ) THEN
1099  EXIT
1100  END IF ! iEnd
1101  END DO ! <emptyLoop>
1102 
1103 ! DEBUG
1104 ! WRITE(*,*) connTable(1:nChars)
1105 ! END DEBUG
1106 
1107  SELECT CASE ( conntable(1:nchars) )
1108  CASE ( ':t3:real' )
1109  CALL com_get_size(trim(winnamein)//'.:t3:real',paneid,nactual, &
1110  ndummy)
1111  pgrid%patchDimens(patch_dimens_nbtris,ipatch) = nactual
1112  CASE ( ':t3:virtual' )
1113  CALL com_get_size(trim(winnamein)//'.:t3:virtual',paneid,nvirtual, &
1114  ndummy)
1115  pgrid%patchDimens(patch_dimens_nbtristot,ipatch) = nvirtual
1116  CASE ( ':q4:real' )
1117  CALL com_get_size(trim(winnamein)//'.:q4:real',paneid,nactual, &
1118  ndummy)
1119  pgrid%patchDimens(patch_dimens_nbquads,ipatch) = nactual
1120  CASE ( ':q4:virtual' )
1121  CALL com_get_size(trim(winnamein)//'.:q4:virtual',paneid,nvirtual, &
1122  ndummy)
1123  pgrid%patchDimens(patch_dimens_nbquadstot,ipatch) = nvirtual
1124  CASE default
1125  CALL errorstop(global,err_reached_default,__line__)
1126  END SELECT ! connTable
1127  END DO ! iConnTable
1128 
1129  pgrid%patchDimens(patch_dimens_nbtristot,ipatch) &
1130  = pgrid%patchDimens(patch_dimens_nbtris ,ipatch) &
1131  + pgrid%patchDimens(patch_dimens_nbtristot,ipatch)
1132 
1133  pgrid%patchDimens(patch_dimens_nbquadstot,ipatch) &
1134  = pgrid%patchDimens(patch_dimens_nbquads ,ipatch) &
1135  + pgrid%patchDimens(patch_dimens_nbquadstot,ipatch)
1136 
1137  CALL com_free_buffer(conntables)
1138 
1139 ! DEBUG
1140 ! WRITE(*,*) pGrid%patchDimens(PATCH_DIMENS_NBTRIS ,iPatch), &
1141 ! pGrid%patchDimens(PATCH_DIMENS_NBTRISTOT ,iPatch), &
1142 ! pGrid%patchDimens(PATCH_DIMENS_NBQUADS ,iPatch), &
1143 ! pGrid%patchDimens(PATCH_DIMENS_NBQUADSTOT,iPatch)
1144 ! END DEBUG
1145  END DO ! iPatch
1146 
1147 ! ******************************************************************************
1148 ! End
1149 ! ******************************************************************************
1150 
1151  IF ( global%myProcid == masterproc .AND. &
1152  global%verbLevel >= verbose_high ) THEN
1153  WRITE(stdout,'(A,1X,A)') solver_name,'Getting dimensions done.'
1154  END IF ! global%verbLevel
1155 
1156  END SUBROUTINE rflu_genx_getdimensions
1157 
1158 
1159 
1160 
1161 
1162 
1163 
1164 
1165 ! ******************************************************************************
1166 !
1167 ! Purpose: Get derived dimensions through Roccom.
1168 !
1169 ! Description: None.
1170 !
1171 ! Input:
1172 ! pRegion Pointer to region
1173 !
1174 ! Output: None.
1175 !
1176 ! Notes:
1177 ! 1. Need to get derived dimensions such as number of vertices on a given
1178 ! patch before registration.
1179 !
1180 ! ******************************************************************************
1181 
1183 
1184  IMPLICIT NONE
1185 
1186 ! ******************************************************************************
1187 ! Declarations and definitions
1188 ! ******************************************************************************
1189 
1190 ! ==============================================================================
1191 ! Arguments
1192 ! ==============================================================================
1193 
1194  TYPE(t_region), POINTER :: pregion
1195 
1196 ! ==============================================================================
1197 ! Locals
1198 ! ==============================================================================
1199 
1200  CHARACTER(CHRLEN) :: winnamein
1201  INTEGER :: ipatch,nverttot,nvertvirtual,paneid
1202  TYPE(t_global), POINTER :: global
1203  TYPE(t_grid), POINTER :: pgrid
1204  TYPE(t_patch), POINTER :: ppatch
1205 
1206 ! ******************************************************************************
1207 ! Start, set pointers and variables
1208 ! ******************************************************************************
1209 
1210  global => pregion%global
1211 
1212  pgrid => pregion%grid
1213 
1214  IF ( global%myProcid == masterproc .AND. &
1215  global%verbLevel >= verbose_high ) THEN
1216  WRITE(stdout,'(A,1X,A)') solver_name,'Getting derived dimensions...'
1217  END IF ! global%verbLevel
1218 
1219  IF ( global%myProcid == masterproc .AND. &
1220  global%verbLevel >= verbose_high) THEN
1221  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
1222  pregion%iRegionGlobal
1223  END IF ! global%myProcid
1224 
1225 ! ******************************************************************************
1226 ! Get dimensions
1227 ! ******************************************************************************
1228 
1229  winnamein = global%surfWinNameInput
1230 
1231 ! ==============================================================================
1232 ! Loop over patches
1233 ! ==============================================================================
1234 
1235  DO ipatch = 1,pgrid%nPatches
1236  ppatch => pregion%patches(ipatch)
1237 
1238  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,ipatch,paneid)
1239 
1240  CALL com_get_size(trim(winnamein)//'.nc',paneid,nverttot,nvertvirtual)
1241 
1242  ppatch%nBVert = nverttot - nvertvirtual
1243  ppatch%nBVertTot = nverttot
1244  END DO ! iPatch
1245 
1246 ! ******************************************************************************
1247 ! End
1248 ! ******************************************************************************
1249 
1250  IF ( global%myProcid == masterproc .AND. &
1251  global%verbLevel >= verbose_high ) THEN
1252  WRITE(stdout,'(A,1X,A)') solver_name,'Getting derived dimensions done.'
1253  END IF ! global%verbLevel
1254 
1255  END SUBROUTINE rflu_genx_getdimensionsderived
1256 
1257 
1258 
1259 
1260 
1261 
1262 
1263 
1264 
1265 
1266 ! ******************************************************************************
1267 !
1268 ! Purpose: Get grid through Roccom.
1269 !
1270 ! Description: None.
1271 !
1272 ! Input:
1273 ! pRegion Pointer to region
1274 !
1275 ! Output: None.
1276 !
1277 ! Notes: None.
1278 !
1279 ! ******************************************************************************
1280 
1281  SUBROUTINE rflu_genx_getgrid(pRegion)
1282 
1283  IMPLICIT NONE
1284 
1285 ! ******************************************************************************
1286 ! Declarations and definitions
1287 ! ******************************************************************************
1288 
1289 ! ==============================================================================
1290 ! Arguments
1291 ! ==============================================================================
1292 
1293  TYPE(t_region), POINTER :: pregion
1294 
1295 ! ==============================================================================
1296 ! Locals
1297 ! ==============================================================================
1298 
1299  CHARACTER(CHRLEN) :: winname,winnamein
1300  INTEGER :: handlein,handleobtain,handleout
1301  TYPE(t_global), POINTER :: global
1302  TYPE(t_grid), POINTER :: pgrid
1303 
1304 ! ******************************************************************************
1305 ! Start, set pointers and variables
1306 ! ******************************************************************************
1307 
1308  global => pregion%global
1309 
1310  pgrid => pregion%grid
1311 
1312  handleobtain = global%handleObtain
1313 
1314  IF ( global%myProcid == masterproc .AND. &
1315  global%verbLevel >= verbose_high ) THEN
1316  WRITE(stdout,'(A,1X,A)') solver_name,'Getting grid...'
1317  END IF ! global%verbLevel
1318 
1319  IF ( global%myProcid == masterproc .AND. &
1320  global%verbLevel >= verbose_high) THEN
1321  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
1322  pregion%iRegionGlobal
1323  END IF ! global%myProcid
1324 
1325 ! ******************************************************************************
1326 ! Get volume grid data
1327 ! ******************************************************************************
1328 
1329  winnamein = global%volWinNameInput
1330  winname = global%volWinName
1331 
1332 ! ==============================================================================
1333 ! Coordinates and connectivity
1334 ! ==============================================================================
1335 
1336  handlein = com_get_attribute_handle_const(trim(winnamein)//'.pmesh')
1337  handleout = com_get_attribute_handle(trim(winname)//'.pmesh')
1338  CALL com_call_function(handleobtain,2,handlein,handleout)
1339 
1340 ! ******************************************************************************
1341 ! Get surface grid data
1342 ! ******************************************************************************
1343 
1344  winnamein = global%surfWinNameInput
1345  winname = global%surfWinName
1346 
1347 ! ==============================================================================
1348 ! Coordinates and predefined connectivity
1349 ! ==============================================================================
1350 
1351  handlein = com_get_attribute_handle_const(trim(winnamein)//'.pmesh')
1352  handleout = com_get_attribute_handle(trim(winname)//'.pmesh')
1353  CALL com_call_function(handleobtain,2,handlein,handleout)
1354 
1355 ! ==============================================================================
1356 ! Other quantities. NOTE IF statement for cnstr_type to retain backward-
1357 ! compatibility.
1358 ! ==============================================================================
1359 
1360  IF ( pgrid%nPatches > 0 ) THEN
1361  handlein = com_get_attribute_handle_const(trim(winnamein)//'.bcflag')
1362  handleout = com_get_attribute_handle(trim(winname)//'.bcflag')
1363  CALL com_call_function(handleobtain,2,handlein,handleout)
1364 
1365  handlein = com_get_attribute_handle_const(trim(winnamein)//'.patchNo')
1366  handleout = com_get_attribute_handle(trim(winname)//'.patchNo')
1367  CALL com_call_function(handleobtain,2,handlein,handleout)
1368 
1369 ! Use MOVEDIR from the *.bc file to get cnstr_type; don't use HDF the values
1370 !
1371 ! handleIn = COM_get_attribute_handle_const(TRIM(winNameIn)//'.cnstr_type')
1372 ! IF ( handleIn > 0 ) THEN
1373 ! handleOut = COM_get_attribute_handle(TRIM(winName)//'.cnstr_type')
1374 ! CALL COM_call_function(handleObtain,2,handleIn,handleOut)
1375 ! END IF ! handleIn
1376 
1377  handlein = com_get_attribute_handle_const(trim(winnamein)//'.t3g:real')
1378  handleout = com_get_attribute_handle(trim(winname)//'.t3g:real')
1379  CALL com_call_function(handleobtain,2,handlein,handleout)
1380 
1381  handlein = com_get_attribute_handle_const(trim(winnamein)//'.t3g:virtual')
1382  handleout = com_get_attribute_handle(trim(winname)//'.t3g:virtual')
1383  CALL com_call_function(handleobtain,2,handlein,handleout)
1384 
1385  handlein = com_get_attribute_handle_const(trim(winnamein)//'.q4g:real')
1386  handleout = com_get_attribute_handle(trim(winname)//'.q4g:real')
1387  CALL com_call_function(handleobtain,2,handlein,handleout)
1388 
1389  handlein = com_get_attribute_handle_const(trim(winnamein)//'.q4g:virtual')
1390  handleout = com_get_attribute_handle(trim(winname)//'.q4g:virtual')
1391  CALL com_call_function(handleobtain,2,handlein,handleout)
1392  END IF ! pGrid%nPatches
1393 
1394 ! ******************************************************************************
1395 ! End
1396 ! ******************************************************************************
1397 
1398  IF ( global%myProcid == masterproc .AND. &
1399  global%verbLevel >= verbose_high ) THEN
1400  WRITE(stdout,'(A,1X,A)') solver_name,'Getting grid done.'
1401  END IF ! global%verbLevel
1402 
1403  END SUBROUTINE rflu_genx_getgrid
1404 
1405 
1406 
1407 
1408 
1409 
1410 
1411 ! ******************************************************************************
1412 !
1413 ! Purpose: Open control files for Rocin.
1414 !
1415 ! Description: None.
1416 !
1417 ! Input:
1418 ! global Pointer to global data
1419 !
1420 ! Output: None.
1421 !
1422 ! Notes: None.
1423 !
1424 ! ******************************************************************************
1425 
1426  SUBROUTINE rflu_genx_openrocinctrlfiles(global)
1427 
1428  IMPLICIT NONE
1429 
1430 ! ******************************************************************************
1431 ! Declarations and definitions
1432 ! ******************************************************************************
1433 
1434 ! ==============================================================================
1435 ! Arguments
1436 ! ==============================================================================
1437 
1438  TYPE(t_global), POINTER :: global
1439 
1440 ! ==============================================================================
1441 ! Locals
1442 ! ==============================================================================
1443 
1444  CHARACTER(CHRLEN) :: ifilename
1445  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
1446  INTEGER :: errorflag
1447 
1448 ! ******************************************************************************
1449 ! Start
1450 ! ******************************************************************************
1451  CALL registerfunction(global,'RFLU_GENX_OpenRocinCtrlFiles', &
1452  'RFLU_ModRocstarIO.F90')
1453 
1454  IF ( global%myProcid == masterproc .AND. &
1455  global%verbLevel >= verbose_low ) THEN
1456  WRITE(stdout,'(A,1X,A)') solver_name,'Opening Rocin control files...'
1457  END IF ! global%verbLevel
1458 
1459 ! ******************************************************************************
1460 ! Open files
1461 ! ******************************************************************************
1462 
1463 ! ==============================================================================
1464 ! Volume file
1465 ! ==============================================================================
1466 
1467  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
1468  ifilename = trim(global%outDirHDF)//'fluid_in_'//trim(timestring)//'.txt'
1469 
1470  OPEN(if_ctrl_vol,file=ifilename,form="FORMATTED",status="UNKNOWN", &
1471  iostat=errorflag)
1472  global%error = errorflag
1473  IF ( global%error /= err_none ) THEN
1474  CALL errorstop(global,err_file_open,__line__,ifilename)
1475  END IF ! global%error
1476 
1477 ! ==============================================================================
1478 ! Surface file
1479 ! ==============================================================================
1480 
1481  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
1482  ifilename = trim(global%outDirHDF)//'ifluid_in_'//trim(timestring)//'.txt'
1483 
1484  OPEN(if_ctrl_surf,file=ifilename,form="FORMATTED",status="UNKNOWN", &
1485  iostat=errorflag)
1486  global%error = errorflag
1487  IF ( global%error /= err_none ) THEN
1488  CALL errorstop(global,err_file_open,__line__,ifilename)
1489  END IF ! global%error
1490 
1491 ! ******************************************************************************
1492 ! End
1493 ! ******************************************************************************
1494 
1495  IF ( global%myProcid == masterproc .AND. &
1496  global%verbLevel >= verbose_high ) THEN
1497  WRITE(stdout,'(A,1X,A)') solver_name,'Opening Rocin control files done.'
1498  END IF ! global%verbLevel
1499 
1500  CALL deregisterfunction(global)
1501 
1502  END SUBROUTINE rflu_genx_openrocinctrlfiles
1503 
1504 
1505 
1506 
1507 
1508 
1509 
1510 ! ******************************************************************************
1511 !
1512 ! Purpose:
1513 !
1514 ! Description: None.
1515 !
1516 ! Input:
1517 ! pRegion Pointer to region
1518 !
1519 ! Output: None.
1520 !
1521 ! Notes: None.
1522 !
1523 ! ******************************************************************************
1524 
1525  SUBROUTINE rflu_genx_putdataflow(pRegion)
1526 
1527  IMPLICIT NONE
1528 
1529 ! ******************************************************************************
1530 ! Declarations and definitions
1531 ! ******************************************************************************
1532 
1533 ! ==============================================================================
1534 ! Arguments
1535 ! ==============================================================================
1536 
1537  TYPE(t_region), POINTER :: pregion
1538 
1539 ! ==============================================================================
1540 ! Locals
1541 ! ==============================================================================
1542 
1543  CHARACTER(CHRLEN) :: filenamemixt,filenamegrid,filestemmixt,filestemgrid, &
1544  matname,regidstring,winname
1545  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
1546  INTEGER :: communicator,handleattr,handlesetoption,handleaddattr, &
1547  handleputattr,nargs,paneid,sz,ng
1548  TYPE(t_global), POINTER :: global
1549 
1550 ! ******************************************************************************
1551 ! Start, set pointers
1552 ! ******************************************************************************
1553 
1554  global => pregion%global
1555 
1556 ! ******************************************************************************
1557 ! Set variables
1558 ! ******************************************************************************
1559 
1560  communicator = global%communicator
1561 
1562  winname = trim(global%volWinName)
1563  matname = 'fluid_vol'
1564 
1565  nargs = 7
1566 
1567 ! ******************************************************************************
1568 ! Build time and file strings
1569 ! ******************************************************************************
1570 
1571  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
1572  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,0,paneid)
1573  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
1574 
1575  CALL rflu_genx_getfilestemgridvol(filestemgrid)
1576  filenamegrid = trim(filestemgrid)//'_'//trim(timestring)//'_'// &
1577  trim(regidstring)
1578 
1579  CALL rflu_genx_getfilestemmixtvol(filestemmixt)
1580  filenamemixt = trim(global%outDirHDF)//trim(filestemmixt)//'_'// &
1581  trim(timestring)//'_'//trim(regidstring)
1582 
1583 ! ******************************************************************************
1584 ! Get function handles and set options
1585 ! ******************************************************************************
1586 
1587  handleputattr = com_get_function_handle(trim(global%winNameOut)// &
1588  '.put_attribute')
1589  handleaddattr = com_get_function_handle(trim(global%winNameOut)// &
1590  '.add_attribute')
1591  handlesetoption = com_get_function_handle(trim(global%winNameOut)// &
1592  '.set_option')
1593 
1594  CALL com_call_function(handlesetoption,2,'rankwidth','0')
1595  ! MS
1596  !CALL COM_call_function(handleSetOption,2,'format','HDF')
1597  ! MS End
1598 
1599 ! ******************************************************************************
1600 ! Write data through Rocout commands
1601 ! ******************************************************************************
1602 
1603 ! ==============================================================================
1604 ! Conserved variables
1605 ! ==============================================================================
1606 
1607  handleattr = com_get_attribute_handle(trim(winname)//'.rhof')
1608  CALL com_get_size(trim(winname)//'.rhof', paneid, sz, ng)
1609  CALL com_call_function(handleputattr,nargs,trim(filenamemixt), &
1610  handleattr,trim(matname),timestring, &
1611  trim(filenamegrid),communicator,paneid)
1612 
1613  handleattr = com_get_attribute_handle(trim(winname)//'.rhovf')
1614  CALL com_call_function(handleaddattr,nargs,trim(filenamemixt), &
1615  handleattr,trim(matname),timestring, &
1616  trim(filenamegrid),communicator,paneid)
1617 
1618  handleattr = com_get_attribute_handle(trim(winname)//'.rhoEf')
1619  CALL com_call_function(handleaddattr,nargs,trim(filenamemixt), &
1620  handleattr,trim(matname),timestring, &
1621  trim(filenamegrid),communicator,paneid)
1622 
1623 ! ==============================================================================
1624 ! Dependent variables
1625 ! ==============================================================================
1626 
1627  handleattr = com_get_attribute_handle(trim(winname)//'.pf')
1628  CALL com_call_function(handleaddattr,nargs,trim(filenamemixt), &
1629  handleattr,trim(matname),timestring, &
1630  trim(filenamegrid),communicator,paneid)
1631 
1632  handleattr = com_get_attribute_handle(trim(winname)//'.Tf')
1633  CALL com_call_function(handleaddattr,nargs,trim(filenamemixt), &
1634  handleattr,trim(matname),timestring, &
1635  trim(filenamegrid),communicator,paneid)
1636 
1637  handleattr = com_get_attribute_handle(trim(winname)//'.af')
1638  CALL com_call_function(handleaddattr,nargs,trim(filenamemixt), &
1639  handleattr,trim(matname),timestring, &
1640  trim(filenamegrid),communicator,paneid)
1641 
1642 ! ******************************************************************************
1643 ! End
1644 ! ******************************************************************************
1645 
1646  END SUBROUTINE rflu_genx_putdataflow
1647 
1648 
1649 
1650 
1651 
1652 
1653 
1654 
1655 
1656 ! ******************************************************************************
1657 !
1658 ! Purpose: Write surface grid speeds through Rocout.
1659 !
1660 ! Description: None.
1661 !
1662 ! Input:
1663 ! pRegion Pointer to region
1664 !
1665 ! Output: None.
1666 !
1667 ! Notes: None.
1668 !
1669 ! ******************************************************************************
1670 
1671  SUBROUTINE rflu_genx_putdatagspeedssurf(pRegion)
1672 
1673  IMPLICIT NONE
1674 
1675 ! ******************************************************************************
1676 ! Declarations and definitions
1677 ! ******************************************************************************
1678 
1679 ! ==============================================================================
1680 ! Arguments
1681 ! ==============================================================================
1682 
1683  TYPE(t_region), POINTER :: pregion
1684 
1685 ! ==============================================================================
1686 ! Locals
1687 ! ==============================================================================
1688 
1689  CHARACTER(CHRLEN) :: filenamegrid,filenamegsp,filestemgrid,filestemgsp, &
1690  matname,regidstring,winname
1691  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
1692  INTEGER :: communicator,handleattr,handlesetoption,handleaddattr, &
1693  handleputattr,handlewriteattr,ipatch,nargs,paneid
1694  TYPE(t_global), POINTER :: global
1695  TYPE(t_grid), POINTER :: pgrid
1696  TYPE(t_patch), POINTER :: ppatch
1697 
1698 ! ******************************************************************************
1699 ! Start, set pointers
1700 ! ******************************************************************************
1701 
1702  global => pregion%global
1703 
1704  pgrid => pregion%grid
1705 
1706  CALL registerfunction(global,'RFLU_GENX_PutDataGSpeedsSurf',&
1707  'RFLU_ModRocstarIO.F90')
1708 
1709  IF ( global%myProcid == masterproc .AND. &
1710  global%verbLevel >= verbose_high ) THEN
1711  WRITE(stdout,'(A,1X,A)') solver_name, &
1712  'Writing surface grid speeds through Rocout...'
1713  END IF ! global%myProcid
1714 
1715  IF ( global%myProcid == masterproc .AND. &
1716  global%verbLevel >= verbose_high) THEN
1717  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
1718  pregion%iRegionGlobal
1719  END IF ! global%myProcid
1720 
1721 ! ******************************************************************************
1722 ! Set variables
1723 ! ******************************************************************************
1724 
1725  communicator = global%communicator
1726 
1727  winname = trim(global%surfWinName)
1728  matname = 'fluid_surf'
1729 
1730  nargs = 7
1731 
1732 ! ******************************************************************************
1733 ! Build strings and file name
1734 ! ******************************************************************************
1735 
1736  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
1737  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
1738 
1739  CALL rflu_genx_getfilestemgridsurf(filestemgrid)
1740  filenamegrid = trim(filestemgrid)//'_'//trim(timestring)//'_'// &
1741  trim(regidstring)
1742 
1743  CALL rflu_genx_getfilestemgspsurf(filestemgsp)
1744  filenamegsp = trim(global%outDirHDF)//trim(filestemgsp)//'_'// &
1745  trim(timestring)//'_'//trim(regidstring)
1746 
1747 ! ******************************************************************************
1748 ! Get function handles and set options
1749 ! ******************************************************************************
1750 
1751  handleputattr = com_get_function_handle(trim(global%winNameOut)// &
1752  '.put_attribute')
1753  handleaddattr = com_get_function_handle(trim(global%winNameOut)// &
1754  '.add_attribute')
1755  handlesetoption = com_get_function_handle(trim(global%winNameOut)// &
1756  '.set_option')
1757 
1758  CALL com_call_function(handlesetoption,2,'rankwidth','0')
1759  ! MS
1760  !CALL COM_call_function(handleSetOption,2,'format','HDF')
1761  ! MS End
1762 
1763 ! ******************************************************************************
1764 ! Write grid file through Rocout commands
1765 ! ******************************************************************************
1766 
1767 ! ==============================================================================
1768 ! Loop over patches
1769 ! ==============================================================================
1770 
1771  DO ipatch = 1,pgrid%nPatches
1772  ppatch => pregion%patches(ipatch)
1773  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,ipatch,paneid)
1774 
1775  IF ( ipatch == 1 ) THEN
1776  handlewriteattr = handleputattr
1777  ELSE
1778  handlewriteattr = handleaddattr
1779  END IF ! iPatch
1780 
1781  handleattr = com_get_attribute_handle(trim(winname)//'.gs')
1782  CALL com_call_function(handlewriteattr,nargs,trim(filenamegsp), &
1783  handleattr,trim(matname),timestring, &
1784  trim(filenamegrid),communicator,paneid)
1785  END DO ! iPatch
1786 
1787 ! ******************************************************************************
1788 ! End
1789 ! ******************************************************************************
1790 
1791  IF ( global%myProcid == masterproc .AND. &
1792  global%verbLevel >= verbose_high ) THEN
1793  WRITE(stdout,'(A,1X,A)') solver_name, &
1794  'Writing surface grid speeds through Rocout done.'
1795  END IF ! global%myProcid
1796 
1797  CALL deregisterfunction(global)
1798 
1799  END SUBROUTINE rflu_genx_putdatagspeedssurf
1800 
1801 
1802 
1803 
1804 
1805 
1806 
1807 
1808 
1809 ! ******************************************************************************
1810 !
1811 ! Purpose:
1812 !
1813 ! Description: None.
1814 !
1815 ! Input:
1816 ! pRegion Pointer to region
1817 !
1818 ! Output: None.
1819 !
1820 ! Notes: None.
1821 !
1822 ! ******************************************************************************
1823 
1824  SUBROUTINE rflu_genx_putdatagspeedsvol(pRegion)
1825 
1826  IMPLICIT NONE
1827 
1828 ! ******************************************************************************
1829 ! Declarations and definitions
1830 ! ******************************************************************************
1831 
1832 ! ==============================================================================
1833 ! Arguments
1834 ! ==============================================================================
1835 
1836  TYPE(t_region), POINTER :: pregion
1837 
1838 ! ==============================================================================
1839 ! Locals
1840 ! ==============================================================================
1841 
1842  CHARACTER(CHRLEN) :: filenamegrid,filenamegsp,filestemgrid,filestemgsp, &
1843  matname,regidstring,winname
1844  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
1845  INTEGER :: communicator,handleattr,handleputattr,handlesetoption,nargs, &
1846  paneid
1847  TYPE(t_global), POINTER :: global
1848 
1849 ! ******************************************************************************
1850 ! Start, set pointers
1851 ! ******************************************************************************
1852 
1853  global => pregion%global
1854 
1855  CALL registerfunction(global,'RFLU_GENX_PutDataGSpeedsVol',&
1856  'RFLU_ModRocstarIO.F90')
1857 
1858  IF ( global%myProcid == masterproc .AND. &
1859  global%verbLevel >= verbose_high ) THEN
1860  WRITE(stdout,'(A,1X,A)') solver_name, &
1861  'Writing volume grid speeds through Rocout...'
1862  END IF ! global%myProcid
1863 
1864  IF ( global%myProcid == masterproc .AND. &
1865  global%verbLevel >= verbose_high) THEN
1866  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
1867  pregion%iRegionGlobal
1868  END IF ! global%myProcid
1869 
1870 ! ******************************************************************************
1871 ! Set variables
1872 ! ******************************************************************************
1873 
1874  communicator = global%communicator
1875 
1876  winname = trim(global%volWinName)
1877  matname = 'fluid_vol'
1878 
1879  nargs = 7
1880 
1881 ! ******************************************************************************
1882 ! Build time and file strings
1883 ! ******************************************************************************
1884 
1885  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
1886  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,0,paneid)
1887  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
1888 
1889  CALL rflu_genx_getfilestemgridvol(filestemgrid)
1890  filenamegrid = trim(filestemgrid)//'_'//trim(timestring)//'_'// &
1891  trim(regidstring)
1892 
1893  CALL rflu_genx_getfilestemgspvol(filestemgsp)
1894  filenamegsp = trim(global%outDirHDF)//trim(filestemgsp)//'_'// &
1895  trim(timestring)//'_'//trim(regidstring)
1896 
1897 ! ******************************************************************************
1898 ! Get function handles and set options
1899 ! ******************************************************************************
1900 
1901  handleputattr = com_get_function_handle(trim(global%winNameOut)// &
1902  '.put_attribute')
1903  handlesetoption = com_get_function_handle(trim(global%winNameOut)// &
1904  '.set_option')
1905 
1906  CALL com_call_function(handlesetoption,2,'rankwidth','0')
1907  ! MS
1908  !CALL COM_call_function(handleSetOption,2,'format','HDF')
1909  ! MS End
1910 
1911 ! ******************************************************************************
1912 ! Write data through Rocout commands
1913 ! ******************************************************************************
1914 
1915  handleattr = com_get_attribute_handle(trim(winname)//'.gs')
1916  CALL com_call_function(handleputattr,nargs,trim(filenamegsp), &
1917  handleattr,trim(matname),timestring, &
1918  trim(filenamegrid),communicator,paneid)
1919 
1920 ! ******************************************************************************
1921 ! End
1922 ! ******************************************************************************
1923 
1924  IF ( global%myProcid == masterproc .AND. &
1925  global%verbLevel >= verbose_high ) THEN
1926  WRITE(stdout,'(A,1X,A)') solver_name, &
1927  'Writing volume grid speeds through Rocout done.'
1928  END IF ! global%myProcid
1929 
1930  CALL deregisterfunction(global)
1931 
1932  END SUBROUTINE rflu_genx_putdatagspeedsvol
1933 
1934 
1935 
1936 
1937 
1938 
1939 
1940 
1941 ! ******************************************************************************
1942 !
1943 ! Purpose: Write interface data through Roccom.
1944 !
1945 ! Description: None.
1946 !
1947 ! Input:
1948 ! pRegion Pointer to region
1949 !
1950 ! Output: None.
1951 !
1952 ! Notes: None.
1953 !
1954 ! ******************************************************************************
1955 
1956  SUBROUTINE rflu_genx_putdatainterf(pRegion)
1957 
1958  IMPLICIT NONE
1959 
1960 ! ******************************************************************************
1961 ! Declarations and definitions
1962 ! ******************************************************************************
1963 
1964 ! ==============================================================================
1965 ! Arguments
1966 ! ==============================================================================
1967 
1968  TYPE(t_region), POINTER :: pregion
1969 
1970 ! ==============================================================================
1971 ! Locals
1972 ! ==============================================================================
1973 
1974  CHARACTER(CHRLEN) :: filenamegrid,filenamemixt,filestemgrid,filestemmixt, &
1975  matname,regidstring,winname
1976  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
1977  INTEGER :: communicator,handleaddattr,handleattr,handleputattr, &
1978  handlesetoption,handlewriteattr,ipatch,nargs,paneid
1979  TYPE(t_global), POINTER :: global
1980  TYPE(t_grid), POINTER :: pgrid
1981  TYPE(t_patch), POINTER :: ppatch
1982 
1983 ! ******************************************************************************
1984 ! Start, set pointers and variables
1985 ! ******************************************************************************
1986 
1987  global => pregion%global
1988 
1989  IF ( global%myProcid == masterproc .AND. &
1990  global%verbLevel >= verbose_high ) THEN
1991  WRITE(stdout,'(A,1X,A)') solver_name, &
1992  'Writing interface data through Roccom...'
1993  END IF ! global%verbLevel
1994 
1995  IF ( global%myProcid == masterproc .AND. &
1996  global%verbLevel >= verbose_high) THEN
1997  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
1998  pregion%iRegionGlobal
1999  END IF ! global%myProcid
2000 
2001 ! ******************************************************************************
2002 ! Set variables
2003 ! ******************************************************************************
2004 
2005  communicator = global%communicator
2006 
2007  winname = trim(global%surfWinName)
2008  matname = 'fluid_surf'
2009 
2010  nargs = 7
2011 
2012 ! ******************************************************************************
2013 ! Build strings and file name
2014 ! ******************************************************************************
2015 
2016  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
2017  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
2018 
2019  CALL rflu_genx_getfilestemgridsurf(filestemgrid)
2020  filenamegrid = trim(filestemgrid)//'_'//trim(timestring)//'_'// &
2021  trim(regidstring)
2022 
2023  CALL rflu_genx_getfilestemmixtsurf(filestemmixt)
2024  filenamemixt = trim(global%outDirHDF)//trim(filestemmixt)//'_'// &
2025  trim(timestring)//'_'//trim(regidstring)
2026 
2027 ! ******************************************************************************
2028 ! Get function handles and set options
2029 ! ******************************************************************************
2030 
2031  handleputattr = com_get_function_handle(trim(global%winNameOut)// &
2032  '.put_attribute')
2033  handleaddattr = com_get_function_handle(trim(global%winNameOut)// &
2034  '.add_attribute')
2035  handlesetoption = com_get_function_handle(trim(global%winNameOut)// &
2036  '.set_option')
2037 
2038  CALL com_call_function(handlesetoption,2,'rankwidth','0')
2039  ! MS
2040  !CALL COM_call_function(handleSetOption,2,'format','HDF')
2041  ! MS End
2042 
2043 ! ******************************************************************************
2044 ! Write data through Rocout commands
2045 ! ******************************************************************************
2046 
2047 ! ==============================================================================
2048 ! Loop over patches
2049 ! ==============================================================================
2050 
2051  DO ipatch = 1,pgrid%nPatches
2052  ppatch => pregion%patches(ipatch)
2053 
2054  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,ipatch,paneid)
2055 
2056  IF ( ipatch == 1 ) THEN
2057  handlewriteattr = handleputattr
2058  ELSE
2059  handlewriteattr = handleaddattr
2060  END IF ! iPatch
2061 
2062 ! ------------------------------------------------------------------------------
2063 ! Input data
2064 ! ------------------------------------------------------------------------------
2065 
2066  handleattr = com_get_attribute_handle(trim(winname)//'.du_alp')
2067  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2068  handleattr,trim(matname),timestring, &
2069  trim(filenamegrid),communicator,paneid)
2070 
2071  handleattr = com_get_attribute_handle(trim(winname)//'.rhofvf_alp')
2072  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2073  handleattr,trim(matname),timestring, &
2074  trim(filenamegrid),communicator,paneid)
2075 
2076  handleattr = com_get_attribute_handle(trim(winname)//'.mdot_alp')
2077  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2078  handleattr,trim(matname),timestring, &
2079  trim(filenamegrid),communicator,paneid)
2080 
2081  handleattr = com_get_attribute_handle(trim(winname)//'.Tflm_alp')
2082  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2083  handleattr,trim(matname),timestring, &
2084  trim(filenamegrid),communicator,paneid)
2085 
2086 ! ------------------------------------------------------------------------------
2087 ! Output data
2088 ! ------------------------------------------------------------------------------
2089 
2090  handleattr = com_get_attribute_handle(trim(winname)//'.nfAlp')
2091  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2092  handleattr,trim(matname),timestring, &
2093  trim(filenamegrid),communicator,paneid)
2094 
2095  handleattr = com_get_attribute_handle(trim(winname)//'.rhofAlp')
2096  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2097  handleattr,trim(matname),timestring, &
2098  trim(filenamegrid),communicator,paneid)
2099 
2100  handleattr = com_get_attribute_handle(trim(winname)//'.pf')
2101  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2102  handleattr,trim(matname),timestring, &
2103  trim(filenamegrid),communicator,paneid)
2104 
2105  handleattr = com_get_attribute_handle(trim(winname)//'.tf')
2106  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2107  handleattr,trim(matname),timestring, &
2108  trim(filenamegrid),communicator,paneid)
2109 
2110  handleattr = com_get_attribute_handle(trim(winname)//'.qc')
2111  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2112  handleattr,trim(matname),timestring, &
2113  trim(filenamegrid),communicator,paneid)
2114 
2115  handleattr = com_get_attribute_handle(trim(winname)//'.qr')
2116  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2117  handleattr,trim(matname),timestring, &
2118  trim(filenamegrid),communicator,paneid)
2119 
2120  handleattr = com_get_attribute_handle(trim(winname)//'.tempf')
2121  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2122  handleattr,trim(matname),timestring, &
2123  trim(filenamegrid),communicator,paneid)
2124 
2125  handleattr = com_get_attribute_handle(trim(winname)//'.bFlag')
2126  CALL com_call_function(handlewriteattr,nargs,trim(filenamemixt), &
2127  handleattr,trim(matname),timestring, &
2128  trim(filenamegrid),communicator,paneid)
2129  END DO ! iPatch
2130 
2131 ! ******************************************************************************
2132 ! End
2133 ! ******************************************************************************
2134 
2135  IF ( global%myProcid == masterproc .AND. &
2136  global%verbLevel >= verbose_high ) THEN
2137  WRITE(stdout,'(A,1X,A)') solver_name, &
2138  'Writing interface data through Roccom done.'
2139  END IF ! global%verbLevel
2140 
2141  END SUBROUTINE rflu_genx_putdatainterf
2142 
2143 
2144 
2145 
2146 
2147 
2148 
2149 
2150 ! ******************************************************************************
2151 !
2152 ! Purpose: Write volume and surface grids through Rocout.
2153 !
2154 ! Description: None.
2155 !
2156 ! Input:
2157 ! pRegion Pointer to region
2158 !
2159 ! Output: None.
2160 !
2161 ! Notes: None.
2162 !
2163 ! ******************************************************************************
2164 
2165  SUBROUTINE rflu_genx_putgrid(pRegion)
2166 
2167  IMPLICIT NONE
2168 
2169 ! ******************************************************************************
2170 ! Declarations and definitions
2171 ! ******************************************************************************
2172 
2173 ! ==============================================================================
2174 ! Arguments
2175 ! ==============================================================================
2176 
2177  TYPE(t_region), POINTER :: pregion
2178 
2179 ! ==============================================================================
2180 ! Locals
2181 ! ==============================================================================
2182 
2183  TYPE(t_grid), POINTER :: pgrid
2184 
2185 ! ******************************************************************************
2186 ! Start, set pointers and variables
2187 ! ******************************************************************************
2188 
2189  pgrid => pregion%grid
2190 
2191 ! ******************************************************************************
2192 ! Write volume and surface grid
2193 ! ******************************************************************************
2194 
2195  CALL rflu_genx_putgridvol(pregion)
2196 
2197  IF ( pgrid%nPatches > 0 ) THEN
2198  CALL rflu_genx_putgridsurf(pregion)
2199  END IF ! pGrid%nPatches
2200 
2201 ! ******************************************************************************
2202 ! End
2203 ! ******************************************************************************
2204 
2205  END SUBROUTINE rflu_genx_putgrid
2206 
2207 
2208 
2209 
2210 
2211 
2212 
2213 
2214 
2215 ! ******************************************************************************
2216 !
2217 ! Purpose: Write surface grid through Rocout.
2218 !
2219 ! Description: None.
2220 !
2221 ! Input:
2222 ! pRegion Pointer to region
2223 !
2224 ! Output: None.
2225 !
2226 ! Notes: None.
2227 !
2228 ! ******************************************************************************
2229 
2230  SUBROUTINE rflu_genx_putgridsurf(pRegion)
2231 
2232  IMPLICIT NONE
2233 
2234 ! ******************************************************************************
2235 ! Declarations and definitions
2236 ! ******************************************************************************
2237 
2238 ! ==============================================================================
2239 ! Arguments
2240 ! ==============================================================================
2241 
2242  TYPE(t_region), POINTER :: pregion
2243 
2244 ! ==============================================================================
2245 ! Locals
2246 ! ==============================================================================
2247 
2248  CHARACTER(CHRLEN) :: filename,filestem,matname,regidstring,winname
2249  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
2250  INTEGER :: communicator,handleattr,handlesetoption,handleaddattr, &
2251  handleputattr,handlewriteattr,ipatch,nargs,paneid, handlewrtattr
2252  TYPE(t_global), POINTER :: global
2253  TYPE(t_grid), POINTER :: pgrid
2254  TYPE(t_patch), POINTER :: ppatch
2255 
2256 ! ******************************************************************************
2257 ! Start, set pointers
2258 ! ******************************************************************************
2259 
2260  global => pregion%global
2261 
2262  pgrid => pregion%grid
2263 
2264  CALL registerfunction(global,'RFLU_GENX_PutGridSurf',&
2265  'RFLU_ModRocstarIO.F90')
2266 
2267  IF ( global%myProcid == masterproc .AND. &
2268  global%verbLevel >= verbose_high ) THEN
2269  WRITE(stdout,'(A,1X,A)') solver_name, &
2270  'Writing surface grid through Rocout...'
2271  END IF ! global%myProcid
2272 
2273  IF ( global%myProcid == masterproc .AND. &
2274  global%verbLevel >= verbose_high) THEN
2275  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
2276  pregion%iRegionGlobal
2277  END IF ! global%myProcid
2278 
2279 ! ******************************************************************************
2280 ! Set variables
2281 ! ******************************************************************************
2282 
2283  communicator = global%communicator
2284 
2285  winname = trim(global%surfWinName)
2286  matname = 'fluid_surf'
2287 
2288  nargs = 7
2289 
2290 ! ******************************************************************************
2291 ! Build strings and file name
2292 ! ******************************************************************************
2293 
2294  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
2295  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
2296  CALL rflu_genx_getfilestemgridsurf(filestem)
2297 
2298  filename = trim(global%outDirHDF)//trim(filestem)//'_'// &
2299  trim(timestring)//'_'//trim(regidstring)
2300 
2301 ! ******************************************************************************
2302 ! Get function handles and set options
2303 ! ******************************************************************************
2304 
2305  handleputattr = com_get_function_handle(trim(global%winNameOut)// &
2306  '.put_attribute')
2307  handleaddattr = com_get_function_handle(trim(global%winNameOut)// &
2308  '.add_attribute')
2309  handlewrtattr = com_get_function_handle(trim(global%winNameOut)// &
2310  '.write_attribute')
2311  handlesetoption = com_get_function_handle(trim(global%winNameOut)// &
2312  '.set_option')
2313 
2314  CALL com_call_function(handlesetoption,2,'rankwidth','0')
2315  ! MS
2316  !CALL COM_call_function(handleSetOption,2,'format','HDF')
2317  ! MS End
2318 
2319 ! ******************************************************************************
2320 ! Write grid file through Rocout commands
2321 ! ******************************************************************************
2322 
2323 ! ==============================================================================
2324 ! Loop over patches
2325 ! ==============================================================================
2326 
2327  DO ipatch = 1,pgrid%nPatches
2328  ppatch => pregion%patches(ipatch)
2329 
2330  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,ipatch,paneid)
2331 
2332 ! ------------------------------------------------------------------------------
2333 ! Coordinates, predefined connectivity lists, and pconn
2334 ! ------------------------------------------------------------------------------
2335 
2336  IF ( ipatch == 1 ) THEN
2337  handlewriteattr = handleputattr
2338  ELSE
2339  handlewriteattr = handleaddattr
2340  END IF ! iPatch
2341  !handleWriteAttr = handleWrtAttr
2342 
2343  handleattr = com_get_attribute_handle(trim(winname)//'.pmesh')
2344  CALL com_call_function(handlewriteattr,nargs,trim(filename), &
2345  handleattr,trim(matname),timestring, &
2346  '',communicator,paneid)
2347 
2348 ! ------------------------------------------------------------------------------
2349 ! Non-predefined connectivity lists. NOTE always need to be called, even if
2350 ! do not actually exist.
2351 ! ------------------------------------------------------------------------------
2352 
2353  handleattr = com_get_attribute_handle(trim(winname)//'.t3g:real')
2354  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2355  handleattr,trim(matname),timestring, &
2356  '',communicator,paneid)
2357 
2358  handleattr = com_get_attribute_handle(trim(winname)//'.t3g:virtual')
2359  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2360  handleattr,trim(matname),timestring, &
2361  '',communicator,paneid)
2362 
2363  handleattr = com_get_attribute_handle(trim(winname)//'.q4g:real')
2364  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2365  handleattr,trim(matname),timestring, &
2366  '',communicator,paneid)
2367 
2368  handleattr = com_get_attribute_handle(trim(winname)//'.q4g:virtual')
2369  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2370  handleattr,trim(matname),timestring, &
2371  '',communicator,paneid)
2372 
2373 ! ------------------------------------------------------------------------------
2374 ! Patch quantities
2375 ! ------------------------------------------------------------------------------
2376 
2377  handleattr = com_get_attribute_handle(trim(winname)//'.bcflag')
2378  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2379  handleattr,trim(matname),timestring, &
2380  '',communicator,paneid)
2381 
2382  handleattr = com_get_attribute_handle(trim(winname)//'.patchNo')
2383  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2384  handleattr,trim(matname),timestring, &
2385  '',communicator,paneid)
2386 
2387  handleattr = com_get_attribute_handle(trim(winname)//'.cnstr_type')
2388  CALL com_call_function(handleaddattr,nargs,trim(filename), &
2389  handleattr,trim(matname),timestring, &
2390  '',communicator,paneid)
2391  END DO ! iPatch
2392 
2393 ! ******************************************************************************
2394 ! End
2395 ! ******************************************************************************
2396 
2397  IF ( global%myProcid == masterproc .AND. &
2398  global%verbLevel >= verbose_high ) THEN
2399  WRITE(stdout,'(A,1X,A)') solver_name, &
2400  'Writing surface grid through Rocout done.'
2401  END IF ! global%myProcid
2402 
2403  CALL deregisterfunction(global)
2404 
2405  END SUBROUTINE rflu_genx_putgridsurf
2406 
2407 
2408 
2409 
2410 
2411 
2412 
2413 
2414 
2415 ! ******************************************************************************
2416 !
2417 ! Purpose: Write volume grid through Rocout.
2418 !
2419 ! Description: None.
2420 !
2421 ! Input:
2422 ! pRegion Pointer to region
2423 !
2424 ! Output: None.
2425 !
2426 ! Notes: None.
2427 !
2428 ! ******************************************************************************
2429 
2430  SUBROUTINE rflu_genx_putgridvol(pRegion)
2431 
2432  IMPLICIT NONE
2433 
2434 ! ******************************************************************************
2435 ! Declarations and definitions
2436 ! ******************************************************************************
2437 
2438 ! ==============================================================================
2439 ! Arguments
2440 ! ==============================================================================
2441 
2442  TYPE(t_region), POINTER :: pregion
2443 
2444 ! ==============================================================================
2445 ! Locals
2446 ! ==============================================================================
2447 
2448  CHARACTER(CHRLEN) :: filename,filestem,matname,regidstring,winname
2449  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
2450  INTEGER :: communicator,handleattr,handlesetoption,handleaddattr, &
2451  handleputattr,nargs,paneid
2452  TYPE(t_global), POINTER :: global
2453  TYPE(t_grid), POINTER :: pgrid
2454 
2455 ! ******************************************************************************
2456 ! Start
2457 ! ******************************************************************************
2458 
2459  global => pregion%global
2460 
2461  pgrid => pregion%grid
2462 
2463  CALL registerfunction(global,'RFLU_GENX_PutGridVol',&
2464  'RFLU_ModRocstarIO.F90')
2465 
2466  IF ( global%myProcid == masterproc .AND. &
2467  global%verbLevel >= verbose_high ) THEN
2468  WRITE(stdout,'(A,1X,A)') solver_name, &
2469  'Writing volume grid through Rocout...'
2470  END IF ! global%myProcid
2471 
2472  IF ( global%myProcid == masterproc .AND. &
2473  global%verbLevel >= verbose_high) THEN
2474  WRITE(stdout,'(A,3X,A,1X,I5.5)') solver_name,'Global region:', &
2475  pregion%iRegionGlobal
2476  END IF ! global%myProcid
2477 
2478 ! ******************************************************************************
2479 ! Set variables
2480 ! ******************************************************************************
2481 
2482  communicator = global%communicator
2483 
2484  winname = trim(global%volWinName)
2485  matname = 'fluid_vol'
2486 
2487  nargs = 7
2488 
2489 ! ******************************************************************************
2490 ! Build strings and file name
2491 ! ******************************************************************************
2492 
2493  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
2494  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,0,paneid)
2495  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
2496 
2497  CALL rflu_genx_getfilestemgridvol(filestem)
2498  filename = trim(global%outDirHDF)//trim(filestem)//'_'// &
2499  trim(timestring)//'_'//trim(regidstring)
2500 
2501 ! ******************************************************************************
2502 ! Get function handles and set options
2503 ! ******************************************************************************
2504 
2505  handleputattr = com_get_function_handle(trim(global%winNameOut)// &
2506  '.put_attribute')
2507  handleaddattr = com_get_function_handle(trim(global%winNameOut)// &
2508  '.add_attribute')
2509  handlesetoption = com_get_function_handle(trim(global%winNameOut)// &
2510  '.set_option')
2511 
2512  CALL com_call_function(handlesetoption,2,'rankwidth','0')
2513  ! MS
2514  !CALL COM_call_function(handleSetOption,2,'format','HDF')
2515  ! MS End
2516 
2517 ! ******************************************************************************
2518 ! Write grid file through Rocout commands
2519 ! ******************************************************************************
2520 
2521 ! ==============================================================================
2522 ! Coordinates and connectivity
2523 ! ==============================================================================
2524  handleattr = com_get_attribute_handle(trim(winname)//'.pmesh')
2525  ! MS
2526  CALL com_call_function(handleputattr,nargs,trim(filename),handleattr, &
2527  trim(matname),timestring,'', &
2528  communicator,paneid)
2529  ! MS End
2530  ! Original
2531  !CALL COM_call_function(handlePutAttr,nArgs,TRIM(fileName),handleAttr, &
2532  ! TRIM(matName),timeString,TRIM(fileName), &
2533  ! communicator,paneId)
2534  ! Original End
2535 
2536 ! ******************************************************************************
2537 ! End
2538 ! ******************************************************************************
2539 
2540  IF ( global%myProcid == masterproc .AND. &
2541  global%verbLevel >= verbose_high ) THEN
2542  WRITE(stdout,'(A,1X,A)') solver_name, &
2543  'Writing volume grid through Rocout done.'
2544  END IF ! global%myProcid
2545 
2546  CALL deregisterfunction(global)
2547 
2548  END SUBROUTINE rflu_genx_putgridvol
2549 
2550 
2551 
2552 
2553 
2554 
2555 
2556 
2557 ! ******************************************************************************
2558 !
2559 ! Purpose: Read window.
2560 !
2561 ! Description: None.
2562 !
2563 ! Input:
2564 ! pRegion Pointer to region
2565 ! windowType Window type
2566 !
2567 ! Output: None.
2568 !
2569 ! Notes: None.
2570 !
2571 ! ******************************************************************************
2572 
2573  SUBROUTINE rflu_genx_readwindow(pRegion,windowType)
2574 
2575  IMPLICIT NONE
2576 
2577 ! ******************************************************************************
2578 ! Declarations and definitions
2579 ! ******************************************************************************
2580 
2581 ! ==============================================================================
2582 ! Arguments
2583 ! ==============================================================================
2584 
2585  INTEGER, INTENT(IN) :: windowtype
2586  TYPE(t_region), POINTER :: pregion
2587 
2588 ! ==============================================================================
2589 ! Locals
2590 ! ==============================================================================
2591 
2592  CHARACTER(CHRLEN) :: filename,filestem,matname,regidstring,winname, &
2593  winnamein
2594  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
2595  INTEGER :: communicator,handlereadwin,paneid
2596  TYPE(t_global), POINTER :: global
2597  TYPE(t_grid), POINTER :: pgrid
2598 
2599 ! ******************************************************************************
2600 ! Start
2601 ! ******************************************************************************
2602 
2603  global => pregion%global
2604 
2605  pgrid => pregion%grid
2606 
2607  CALL registerfunction(global,'RFLU_GENX_ReadWindow',&
2608  'RFLU_ModRocstarIO.F90')
2609 
2610 ! ******************************************************************************
2611 ! Set variables
2612 ! ******************************************************************************
2613 
2614  communicator = global%communicator
2615 
2616 ! ******************************************************************************
2617 ! Build strings and file name
2618 ! ******************************************************************************
2619 
2620  CALL buildregionidstring(global,pregion%iRegionGlobal,regidstring)
2621  CALL rflu_genx_buildpaneid(pregion%iRegionGlobal,0,paneid)
2622  CALL rflu_genx_buildtimestring(global%currentTime,timestring)
2623 
2624  IF ( windowtype == genx_window_type_surf ) THEN
2625  winnamein = global%surfWinNameInput
2626  winname = global%surfWinName
2627 
2628  CALL rflu_genx_getfilestemgridsurf(filestem)
2629  ELSE IF ( windowtype == genx_window_type_vol ) THEN
2630  winnamein = global%volWinNameInput
2631  winname = global%volWinName
2632 
2633  CALL rflu_genx_getfilestemgridvol(filestem)
2634  ELSE
2635  CALL errorstop(global,err_reached_default,__line__)
2636  END IF ! windowType
2637 
2638  filename = trim(global%outDirHDF)//trim(filestem)//'_'// &
2639  trim(timestring)//'_'//trim(regidstring)//'*'
2640 
2641 ! ******************************************************************************
2642 ! Get function handles and set options
2643 ! ******************************************************************************
2644 
2645  handlereadwin = com_get_function_handle(trim(global%winNameIn)// &
2646  '.read_window')
2647 
2648 ! ******************************************************************************
2649 ! Read window
2650 ! ******************************************************************************
2651 
2652  CALL com_call_function(handlereadwin,2,trim(filename), &
2653  trim(winnamein))
2654 
2655 ! ******************************************************************************
2656 ! End
2657 ! ******************************************************************************
2658 
2659  CALL deregisterfunction(global)
2660 
2661  END SUBROUTINE rflu_genx_readwindow
2662 
2663 
2664 
2665 
2666 
2667 
2668 
2669 
2670 
2671 ! ******************************************************************************
2672 !
2673 ! Purpose: Write control file for Rocin.
2674 !
2675 ! Description: None.
2676 !
2677 ! Input:
2678 ! global Pointer to global data
2679 ! paneStringVol String with pane ids for volume data
2680 ! paneStringSurf String with pane ids for surface data
2681 !
2682 ! Output: None.
2683 !
2684 ! Notes: None.
2685 !
2686 ! ******************************************************************************
2687 
2688  SUBROUTINE rflu_genx_writerocinctrlfiles(global,iProc,paneStringVol, &
2689  panestringsurf)
2690 
2691  IMPLICIT NONE
2692 
2693 ! ******************************************************************************
2694 ! Declarations and definitions
2695 ! ******************************************************************************
2696 
2697 ! ==============================================================================
2698 ! Arguments
2699 ! ==============================================================================
2700 
2701  CHARACTER(*) :: panestringsurf,panestringvol
2702  INTEGER, INTENT(IN) :: iproc
2703  TYPE(t_global), POINTER :: global
2704 
2705 ! ==============================================================================
2706 ! Locals
2707 ! ==============================================================================
2708 
2709  CHARACTER(5) :: iregstring
2710  CHARACTER(CHRLEN) :: filename,filenames,filestem
2711  CHARACTER(GENX_TIME_STRING_LEN) :: timestring
2712  INTEGER :: ireg
2713  REAL(RFREAL) :: currenttime
2714 
2715 ! ******************************************************************************
2716 ! Start
2717 ! ******************************************************************************
2718 
2719  CALL registerfunction(global,'RFLU_GENX_WriteRocinCtrlFiles', &
2720  'RFLU_ModRocstarIO.F90')
2721 
2722  IF ( global%myProcid == masterproc .AND. &
2723  global%verbLevel >= verbose_low ) THEN
2724  WRITE(stdout,'(A,1X,A)') solver_name,'Writing Rocin control files...'
2725  END IF ! global%verbLevel
2726 
2727 ! ******************************************************************************
2728 ! Get time string
2729 ! ******************************************************************************
2730 
2731  currenttime = 0.0_rfreal ! Hardcoded, required by Rocin for correct starts
2732 
2733  CALL rflu_genx_buildtimestring(currenttime,timestring)
2734 
2735 ! ******************************************************************************
2736 ! Write file for volume data
2737 ! ******************************************************************************
2738 
2739 ! ==============================================================================
2740 ! Processor id
2741 ! ==============================================================================
2742 
2743  WRITE(if_ctrl_vol,'(A,1X,I6)') '@Proc:',iproc-1
2744 
2745 ! ==============================================================================
2746 ! File names
2747 ! ==============================================================================
2748 
2749  filenames = ''
2750 
2751  CALL rflu_genx_getfilestemvol(filestem)
2752 
2753  DO ireg = 1,global%nRegionsLocal
2754  WRITE(iregstring,'(I5.5)') global%regMap(ireg)
2755 
2756  filename = trim(filestem)//'*'//timestring//'_'//iregstring//'*'
2757  filenames = trim(filenames)//' '//trim(filename)
2758  END DO ! iReg
2759 
2760  WRITE(if_ctrl_vol,'(A,1X,A)') '@Files:',trim(filenames)
2761 
2762 ! ==============================================================================
2763 ! Pane list
2764 ! ==============================================================================
2765 
2766  WRITE(if_ctrl_vol,'(A,1X,A)') '@Panes:',trim(panestringvol)
2767 
2768 ! ******************************************************************************
2769 ! Write file for surface data
2770 ! ******************************************************************************
2771 
2772 ! ==============================================================================
2773 ! Processor id
2774 ! ==============================================================================
2775 
2776  WRITE(if_ctrl_surf,'(A,1X,I6)') '@Proc:',iproc-1
2777 
2778 ! ==============================================================================
2779 ! File names
2780 ! ==============================================================================
2781 
2782  filenames = ''
2783 
2784  CALL rflu_genx_getfilestemsurf(filestem)
2785 
2786  DO ireg = 1,global%nRegionsLocal
2787  WRITE(iregstring,'(I5.5)') global%regMap(ireg)
2788 
2789  filename = trim(filestem)//'*'//timestring//'_'//iregstring//'*'
2790  filenames = trim(filenames)//' '//trim(filename)
2791  END DO ! iReg
2792 
2793  WRITE(if_ctrl_surf,'(A,1X,A)') '@Files:',trim(filenames)
2794 
2795 ! ==============================================================================
2796 ! Pane list
2797 ! ==============================================================================
2798 
2799  WRITE(if_ctrl_surf,'(A,1X,A)') '@Panes:',trim(panestringsurf)
2800 
2801 ! ******************************************************************************
2802 ! End
2803 ! ******************************************************************************
2804 
2805  IF ( global%myProcid == masterproc .AND. &
2806  global%verbLevel >= verbose_high ) THEN
2807  WRITE(stdout,'(A,1X,A)') solver_name,'Writing Rocin control files done.'
2808  END IF ! global%verbLevel
2809 
2810  CALL deregisterfunction(global)
2811 
2812  END SUBROUTINE rflu_genx_writerocinctrlfiles
2813 
2814 
2815 
2816 
2817 
2818 
2819 
2820 ! ******************************************************************************
2821 !
2822 ! Purpose: Get Global data through Roccom.
2823 !
2824 ! Description: None.
2825 !
2826 ! Input:
2827 ! pGlobal Pointer to Global structure
2828 !
2829 ! Output: None.
2830 !
2831 ! Notes: None.
2832 !
2833 ! ******************************************************************************
2834 
2835  SUBROUTINE rflu_genx_getglobaldata(Global)
2836 
2837  IMPLICIT NONE
2838 
2839 ! ******************************************************************************
2840 ! Declarations and definitions
2841 ! ******************************************************************************
2842 
2843 ! ==============================================================================
2844 ! Arguments
2845 ! ==============================================================================
2846 
2847  TYPE(t_global), POINTER :: global
2848 
2849 ! ==============================================================================
2850 ! Locals
2851 ! ==============================================================================
2852 
2853  CHARACTER(CHRLEN) :: winname,winnamein
2854  Double Precision :: zoomlocal
2855 
2856 ! ******************************************************************************
2857 ! Start, set pointers and variables
2858 ! ******************************************************************************
2859 
2860 
2861  IF ( global%myProcid == masterproc .AND. &
2862  global%verbLevel >= verbose_high ) THEN
2863  WRITE(stdout,'(A,1X,A)') solver_name,'Getting Global data...'
2864  END IF ! global%verbLevel
2865 
2866 
2867  winnamein = global%surfWinNameInput
2868  winname = global%surfWinName
2869 
2870  CALL com_set_size( trim(winname)//'.zoomFact',0,1)
2871  CALL com_set_array( trim(winname)//'.zoomFact',0, global%Zoomfactor)
2872 
2873  RETURN
2874  END SUBROUTINE rflu_genx_getglobaldata
2875 
2876 
2877 END MODULE rflu_modrocstario
2878 
2879 ! ******************************************************************************
2880 !
2881 ! RCS Revision history:
2882 !
2883 ! $Log: RFLU_ModRocstarIO.F90,v $
2884 ! Revision 1.15 2008/12/06 08:44:21 mtcampbe
2885 ! Updated license.
2886 !
2887 ! Revision 1.14 2008/11/19 22:17:32 mtcampbe
2888 ! Added Illinois Open Source License/Copyright
2889 !
2890 ! Revision 1.13 2007/04/14 14:12:37 mtcampbe
2891 ! Mods for TZ
2892 !
2893 ! Revision 1.12 2006/11/07 18:13:12 mtcampbe
2894 ! Commented the line to obtain cntstr_type from Roccom
2895 !
2896 ! Revision 1.11 2006/08/08 17:23:35 rfiedler
2897 ! Use MOVEDIR from *.bc to get cnstr_type, not the HDF values.
2898 !
2899 ! Revision 1.10 2006/04/07 15:19:19 haselbac
2900 ! Removed tabs
2901 !
2902 ! Revision 1.9 2005/10/14 14:16:08 haselbac
2903 ! Added getting of Tb_alp
2904 !
2905 ! Revision 1.8 2005/06/17 21:31:23 haselbac
2906 ! Bug fix in RFLU_GENX_GetGrid: Added IF statement when getting patch data
2907 !
2908 ! Revision 1.7 2005/06/10 18:04:37 haselbac
2909 ! Bug fix for backward-compatibility in GENx with cnstr_type
2910 !
2911 ! Revision 1.6 2005/06/09 20:20:14 haselbac
2912 ! Added cnstr_type to IO routines
2913 !
2914 ! Revision 1.5 2005/04/15 15:06:56 haselbac
2915 ! Added routine to read window, cosmetics
2916 !
2917 ! Revision 1.4 2004/12/10 15:33:46 haselbac
2918 ! Added reading/writing of patchNo attribute
2919 !
2920 ! Revision 1.3 2004/11/03 17:02:48 haselbac
2921 ! Removal of vertex and cell flag IO
2922 !
2923 ! Revision 1.2 2004/10/22 14:01:29 haselbac
2924 ! Removed trailing dot to match new hdf file names
2925 !
2926 ! Revision 1.1 2004/10/19 19:27:26 haselbac
2927 ! Initial revision
2928 !
2929 ! ******************************************************************************
2930 
2931 
2932 
2933 
2934 
2935 
2936 
2937 
2938 
2939 
2940 
2941 
2942 
2943 
2944 
2945 
2946 
subroutine, public rflu_genx_buildrocinpanestrings(pRegion, paneStringVol, paneStringSurf)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ibeg
size_t handle(const msq_std::string &name, MsqError &err) const
Get tag index from name.
subroutine, public rflu_genx_getglobaldata(Global)
subroutine, public rflu_genx_getdatainterf(pRegion)
subroutine, public rflu_genx_getfilestemgspsurf(fileStem)
subroutine, public rflu_genx_getdataflow(pRegion)
subroutine, public rflu_genx_getfilestemsurf(fileStem)
subroutine, public rflu_genx_getdimensions(pRegion)
subroutine registerfunction(global, funName, fileName)
Definition: ModError.F90:449
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine, public rflu_genx_getfilestemgspvol(fileStem)
subroutine, public rflu_genx_buildtimestring(time, timeString)
MPI_Comm communicator() const
Definition: Function.h:119
subroutine, public rflu_genx_getgrid(pRegion)
subroutine, public buildregionidstring(global, regId, regIdString)
subroutine, public rflu_genx_getdatagspeedssurf(pRegion)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
subroutine, public rflu_genx_closerocinctrlfiles(global)
subroutine, public rflu_genx_getfilestemmixtvol(fileStem)
subroutine, public rflu_genx_getdimensionsderived(pRegion)
subroutine, public rflu_genx_getfilestemvol(fileStem)
subroutine, public rflu_genx_openrocinctrlfiles(global)
subroutine, public rflu_genx_putdatagspeedssurf(pRegion)
subroutine, public rflu_genx_getfilestemgridvol(fileStem)
subroutine, public rflu_genx_getdatagspeedsvol(pRegion)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE form
subroutine, public rflu_genx_putdataflow(pRegion)
LOGICAL function, public rflu_genx_decidereadfile(global)
LOGICAL function rflu_testisfirstregion(pRegion)
subroutine, public rflu_genx_getfilestemgridsurf(fileStem)
subroutine, public rflu_genx_putdatagspeedsvol(pRegion)
subroutine, public rflu_genx_readwindow(pRegion, windowType)
subroutine errorstop(global, errorCode, errorLine, addMessage)
Definition: ModError.F90:483
subroutine, public rflu_genx_putgridvol(pRegion)
subroutine deregisterfunction(global)
Definition: ModError.F90:469
subroutine, public rflu_genx_putdatainterf(pRegion)
subroutine, public rflu_genx_buildpaneid(iRegion, iPatch, paneId)
subroutine, public rflu_genx_getfilestemmixtsurf(fileStem)
subroutine, public rflu_genx_writerocinctrlfiles(global, iProc, paneStringVol, paneStringSurf)
subroutine, public rflu_genx_putgrid(pRegion)
LOGICAL function, public rflu_genx_decidewritefile(global)
subroutine, public rflu_genx_putgridsurf(pRegion)