Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
scale.f90
Go to the documentation of this file.
1 !*********************************************************************
2 !* Illinois Open Source License *
3 !* *
4 !* University of Illinois/NCSA *
5 !* Open Source License *
6 !* *
7 !* Copyright@2008, University of Illinois. All rights reserved. *
8 !* *
9 !* Developed by: *
10 !* *
11 !* Center for Simulation of Advanced Rockets *
12 !* *
13 !* University of Illinois *
14 !* *
15 !* www.csar.uiuc.edu *
16 !* *
17 !* Permission is hereby granted, free of charge, to any person *
18 !* obtaining a copy of this software and associated documentation *
19 !* files (the "Software"), to deal with the Software without *
20 !* restriction, including without limitation the rights to use, *
21 !* copy, modify, merge, publish, distribute, sublicense, and/or *
22 !* sell copies of the Software, and to permit persons to whom the *
23 !* Software is furnished to do so, subject to the following *
24 !* conditions: *
25 !* *
26 !* *
27 !* @ Redistributions of source code must retain the above copyright *
28 !* notice, this list of conditions and the following disclaimers. *
29 !* *
30 !* @ Redistributions in binary form must reproduce the above *
31 !* copyright notice, this list of conditions and the following *
32 !* disclaimers in the documentation and/or other materials *
33 !* provided with the distribution. *
34 !* *
35 !* @ Neither the names of the Center for Simulation of Advanced *
36 !* Rockets, the University of Illinois, nor the names of its *
37 !* contributors may be used to endorse or promote products derived *
38 !* from this Software without specific prior written permission. *
39 !* *
40 !* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
41 !* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
42 !* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
43 !* NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
44 !* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
45 !* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
46 !* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
47 !* USE OR OTHER DEALINGS WITH THE SOFTWARE. *
48 !*********************************************************************
49 !* Please acknowledge The University of Illinois Center for *
50 !* Simulation of Advanced Rockets in works and publications *
51 !* resulting from this software or its derivatives. *
52 !*********************************************************************
53  PROGRAM scale_mesh
55 
56  IMPLICIT NONE
57 
58 
59  WRITE(6,'(A24,$)') "Enter generic filename: "
60 
61  READ(5,*) prefix
62 
63  CALL read_io_files
64 
65  CALL find_nodes
66 
67  WRITE(6,'(A24,$)') "ENTER THE SCALE FACTOR: "
68  READ(5,*) scale
69 
70  frontnode => first_front_node
71  backnode => first_back_node
72 
73  ALLOCATE(fileid(0:scale-1))
74  DO j = 0, scale-1
75  IF (j .EQ. 0) THEN
76  fileid(j)%num_sister_np = numscale_np/2
77  fileid(j)%comm(1) = -1
78  fileid(j)%comm(2) = 1
79  fileid(j)%numboundnp = numbmeshfirst + numboundfirst
80  ELSE IF (j .NE. (scale - 1)) THEN
81  fileid(j)%num_sister_np = numscale_np
82  fileid(j)%comm(1) = j-1
83  fileid(j)%comm(2) = j+1
84  fileid(j)%numboundnp = numbmeshmid + numboundmid
85  ELSE IF (j .EQ. (scale - 1)) THEN
86  fileid(j)%num_sister_np = numscale_np/2
87  fileid(j)%comm(1) = j - 1
88  fileid(j)%comm(2) = -1
89  fileid(j)%numboundnp = numbmeshmid + numboundmid
90  ENDIF
91  ENDDO
92 
93  ztrans = frontnode%coord(3) - backnode%coord(3)
94  WRITE(6,*) ztrans
95 
96  WRITE(6,*) "STARTING DUPLICATION OF MESH..."
97 
98  count = 1
99  DO i = 0, scale-1
100  OPEN(unit = 99, file = 'TEMP', status = 'UNKNOWN')
101  WRITE(99,*) i
102  CLOSE(99)
103  OPEN(unit = 99, file = 'TEMP', status = 'UNKNOWN')
104  READ(99,*) scaleid
105  CLOSE(99)
106 
107  CALL write_output_2
108 
109  CALL translate
110 
111  count = count + 1
112 
113  ENDDO
114 
115  print*, '...Reading Surface Meshes'
116 
117  CALL read_frac
118 
119  WRITE(6,*) "FINISHED WRITING ALL FILES"
120 
121  END PROGRAM scale_mesh
122 
123 
124 
125 
subroutine write_output_2
int status() const
Obtain the status of the attribute.
Definition: Attribute.h:240
subroutine read_io_files
subroutine find_nodes
Definition: FIND_NODES.f90:53
const std::string & unit() const
Obtain the unit of the attribute.
Definition: Attribute.h:200
subroutine translate
Definition: TRANSLATE.f90:53
void scale(const Real &a, Nodal_data &x)
blockLoc i
Definition: read.cpp:79
virtual std::ostream & print(std::ostream &os) const
j indices j
Definition: Indexing.h:6
subroutine read_frac
Definition: READ_FRAC.f90:53
program scale_mesh
Definition: scale.f90:53