Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
readsdv.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 PROGRAM readsdv
24 
25  IMPLICIT NONE
26 
27  include 'roccomf90.h'
28  include 'mpif.h'
29 
30  INTEGER,PARAMETER :: pid = 1 ! will change to input late
31 
32 
33  INTEGER :: hdl_read, hdl_obtain, hdl_all
34 
35  CHARACTER(*), PARAMETER :: overlaywin = "Overlay"
36 
37  INTEGER :: nsubn, nsubf, nn, nf
38 
39  INTEGER :: comm_self
40  CHARACTER(*), PARAMETER :: prefix = "A"
41 
42  CHARACTER(LEN=5) :: sdv_material, sdv_wname
43  CHARACTER(*), PARAMETER :: fname = 'A_101_sdv.hdf'
44 
45 ! obtain function handle ------------------------------------------------------
46 
47  print*,'Loading module'
48 
49  CALL com_init
50 
51  CALL rocin_load_module( "SDV_IN")
52 
53  print*,'before hdl_read '
54  hdl_read = com_get_function_handle( 'SDV_IN.read_windows')
55  print*,'after hdl_read'
56  hdl_obtain = com_get_function_handle( 'SDV_IN.obtain_attribute')
57 
58  print*,'after hdl_obtain'
59 
60 ! Define the base-window and sdv-window names
61 
62 
63  sdv_material = prefix//'_sdv'
64  sdv_wname = sdv_material
65 
66  CALL com_new_window( overlaywin )
67 
68 ! // Read the pane from the given file. Note that the file contains both
69 ! // the parent and the subdivided windows. Read only the subdivided one.
70 
71  comm_self = mpi_comm_self
72  CALL com_call_function( hdl_read, 4, fname, sdv_wname, &
73  sdv_material, comm_self)
74  hdl_all = com_get_attribute_handle( "A_sdv.all")
75  CALL com_call_function( hdl_obtain, 3, hdl_all, hdl_all, pid)
76 
77 ! // Obtain number of sub-nodes, sub-faces, nodes, and faces
78 
79  CALL com_get_size( overlaywin//'.sn_parent_fcID', pid, nsubn)
80 
81  print*,nsubn
82 
83 !!$ CALL COM_get_size( OverlayWin//'.:t3', pid, nsubf)
84 !!$
85 !!$ CALL COM_get_size( OverlayWin//'.sn_subID', pid, nn)
86 !!$ CALL COM_get_size( OverlayWin//'.sf_offset', pid, nf)
87 
88 
89  CALL com_finalize
90 
91 END PROGRAM readsdv
92 
93 
94 
95 
96 
97 
virtual std::ostream & print(std::ostream &os) const
program readsdv
Definition: readsdv.f90:23