Initial commit of GIt version of RMAGEN

master
Ian P King 6 years ago
parent aaeeee583a
commit 94dd74b226

@ -0,0 +1,129 @@
MESH2D
MESHNAME "default coverage"
E4Q 1 3 1 2 4 1
E4Q 2 4 2 5 9 1
E4Q 3 6 3 4 8 1
E4Q 4 8 4 9 13 1
E4Q 5 9 5 10 14 1
E3T 6 6 12 7 1
E3T 7 12 6 8 1
E4Q 8 18 11 7 12 1
E3T 9 8 13 12 1
E4Q 10 13 9 14 20 1
E4Q 11 14 10 15 21 1
E4Q 12 28 17 11 18 1
E3T 13 19 12 13 1
E4Q 14 29 18 12 19 1
E3T 15 20 19 13 1
E4Q 16 20 14 21 31 1
E4Q 17 21 15 16 22 1
E4Q 18 22 16 23 32 1
E3T 19 24 17 28 1
E4Q 20 37 28 18 29 1
E3T 21 30 19 20 1
E4Q 22 38 29 19 30 1
E3T 23 30 20 31 1
E3T 24 31 21 22 1
E4Q 25 31 22 32 40 1
E4Q 26 32 23 27 36 1
E3T 27 28 33 24 1
E3T 28 25 24 33 1
E4Q 29 42 34 26 35 1
E4Q 30 36 27 34 42 1
E3T 31 33 28 37 1
E4Q 32 46 37 29 38 1
E3T 33 30 31 39 1
E3T 34 39 38 30 1
E3T 35 39 31 40 1
E4Q 36 40 32 36 44 1
E3T 37 37 41 33 1
E4Q 38 50 42 35 43 1
E4Q 39 44 36 42 50 1
E3T 40 41 37 45 1
E3T 41 46 45 37 1
E3T 42 46 38 39 1
E3T 43 40 47 39 1
E3T 44 54 46 39 1
E3T 45 40 44 47 1
E3T 46 41 45 49 1
E3T 47 50 43 51 1
E3T 48 50 52 44 1
E3T 49 44 52 47 1
E3T 50 45 46 53 1
E3T 51 53 48 45 1
E3T 52 48 49 45 1
E3T 53 46 54 53 1
E3T 54 57 54 47 1
E3T 55 53 55 48 1
E3T 56 49 48 55 1
E3T 57 50 56 52 1
E3T 58 50 51 56 1
E3T 59 59 57 52 1
E3T 60 54 58 53 1
E3T 61 55 53 58 1
E3T 62 58 54 57 1
E3T 63 58 57 60 1
E3T 64 59 60 57 1
E3T 65 59 52 56 1
E3T 66 57 47 52 1
E3T 67 54 39 47 1
ND 1 6.83115000e+005 8.65270800e+006 0.00000000e+000
ND 2 6.82066000e+005 8.65270156e+006 0.00000000e+000
ND 3 6.82837136e+005 8.65185167e+006 0.00000000e+000
ND 4 6.81846398e+005 8.65182937e+006 0.00000000e+000
ND 5 6.81017000e+005 8.65269511e+006 0.00000000e+000
ND 6 6.82507000e+005 8.65101400e+006 0.00000000e+000
ND 7 6.82565000e+005 8.65029000e+006 0.00000000e+000
ND 8 6.81464500e+005 8.65096875e+006 0.00000000e+000
ND 9 6.80855661e+005 8.65180708e+006 0.00000000e+000
ND 10 6.79968000e+005 8.65268867e+006 0.00000000e+000
ND 11 6.82548810e+005 8.64951489e+006 0.00000000e+000
ND 12 6.81521500e+005 8.65018550e+006 0.00000000e+000
ND 13 6.80422000e+005 8.65092350e+006 0.00000000e+000
ND 14 6.79864924e+005 8.65178478e+006 0.00000000e+000
ND 15 6.78919000e+005 8.65268222e+006 0.00000000e+000
ND 16 6.77870000e+005 8.65267578e+006 0.00000000e+000
ND 17 6.82532619e+005 8.64873978e+006 0.00000000e+000
ND 18 6.81569158e+005 8.64945958e+006 0.00000000e+000
ND 19 6.80478000e+005 8.65008100e+006 0.00000000e+000
ND 20 6.79379500e+005 8.65087825e+006 0.00000000e+000
ND 21 6.78874186e+005 8.65176248e+006 0.00000000e+000
ND 22 6.77883449e+005 8.65174019e+006 0.00000000e+000
ND 23 6.76821000e+005 8.65266933e+006 0.00000000e+000
ND 24 6.82512810e+005 8.64779139e+006 0.00000000e+000
ND 25 6.82493000e+005 8.64684300e+006 0.00000000e+000
ND 26 6.73674000e+005 8.65265000e+006 0.00000000e+000
ND 27 6.75772000e+005 8.65266289e+006 0.00000000e+000
ND 28 6.81464183e+005 8.64873265e+006 0.00000000e+000
ND 29 6.80589507e+005 8.64940428e+006 0.00000000e+000
ND 30 6.79434500e+005 8.64997650e+006 0.00000000e+000
ND 31 6.78337000e+005 8.65083300e+006 0.00000000e+000
ND 32 6.76892712e+005 8.65171789e+006 0.00000000e+000
ND 33 6.81378000e+005 8.64685267e+006 0.00000000e+000
ND 34 6.74723000e+005 8.65265644e+006 0.00000000e+000
ND 35 6.73920500e+005 8.65165100e+006 0.00000000e+000
ND 36 6.75901975e+005 8.65169559e+006 0.00000000e+000
ND 37 6.80395746e+005 8.64872552e+006 0.00000000e+000
ND 38 6.79609856e+005 8.64934897e+006 0.00000000e+000
ND 39 6.78391000e+005 8.64987200e+006 0.00000000e+000
ND 40 6.77294500e+005 8.65078775e+006 0.00000000e+000
ND 41 6.80263000e+005 8.64686233e+006 0.00000000e+000
ND 42 6.74911237e+005 8.65167330e+006 0.00000000e+000
ND 43 6.74167000e+005 8.65065200e+006 0.00000000e+000
ND 44 6.76252000e+005 8.65074250e+006 0.00000000e+000
ND 45 6.79617734e+005 8.64780276e+006 0.00000000e+000
ND 46 6.79327310e+005 8.64871839e+006 0.00000000e+000
ND 47 6.77347500e+005 8.64976750e+006 0.00000000e+000
ND 48 6.79007180e+005 8.64752197e+006 0.00000000e+000
ND 49 6.79148000e+005 8.64687200e+006 0.00000000e+000
ND 50 6.75209500e+005 8.65069725e+006 0.00000000e+000
ND 51 6.74713750e+005 8.65010525e+006 0.00000000e+000
ND 52 6.76304000e+005 8.64966300e+006 0.00000000e+000
ND 53 6.78702478e+005 8.64803225e+006 0.00000000e+000
ND 54 6.78258873e+005 8.64871126e+006 0.00000000e+000
ND 55 6.78357934e+005 8.64727123e+006 0.00000000e+000
ND 56 6.75260500e+005 8.64955850e+006 0.00000000e+000
ND 57 6.77190437e+005 8.64870413e+006 0.00000000e+000
ND 58 6.77586972e+005 8.64770291e+006 0.00000000e+000
ND 59 6.76122000e+005 8.64869700e+006 0.00000000e+000
ND 60 6.76854486e+005 8.64819996e+006 0.00000000e+000

@ -0,0 +1,255 @@
MESH2D
MESHNAME "default coverage"
E8Q 1 3 61 1 62 2 63 4 64 1
E8Q 2 4 63 2 65 5 66 9 67 1
E8Q 3 6 68 3 64 4 69 8 70 1
E8Q 4 8 69 4 67 9 71 13 72 1
E8Q 5 9 66 5 73 10 74 14 75 1
E6T 6 6 76 12 77 7 78 1
E6T 7 12 76 6 70 8 79 1
E8Q 8 18 80 11 81 7 77 12 82 1
E6T 9 8 72 13 83 12 79 1
E8Q 10 13 71 9 75 14 84 20 85 1
E8Q 11 14 74 10 86 15 87 21 88 1
E8Q 12 28 89 17 90 11 80 18 91 1
E6T 13 19 92 12 83 13 93 1
E8Q 14 29 94 18 82 12 92 19 95 1
E6T 15 20 96 19 93 13 85 1
E8Q 16 20 84 14 88 21 97 31 98 1
E8Q 17 21 87 15 99 16 100 22 101 1
E8Q 18 22 100 16 102 23 103 32 104 1
E6T 19 24 105 17 89 28 106 1
E8Q 20 37 107 28 91 18 94 29 108 1
E6T 21 30 109 19 96 20 110 1
E8Q 22 38 111 29 95 19 109 30 112 1
E6T 23 30 110 20 98 31 113 1
E6T 24 31 97 21 101 22 114 1
E8Q 25 31 114 22 104 32 115 40 116 1
E8Q 26 32 103 23 117 27 118 36 119 1
E6T 27 28 120 33 121 24 106 1
E6T 28 25 122 24 121 33 123 1
E8Q 29 42 124 34 125 26 126 35 127 1
E8Q 30 36 118 27 128 34 124 42 129 1
E6T 31 33 120 28 107 37 130 1
E8Q 32 46 131 37 108 29 111 38 132 1
E6T 33 30 113 31 133 39 134 1
E6T 34 39 135 38 112 30 134 1
E6T 35 39 133 31 116 40 136 1
E8Q 36 40 115 32 119 36 137 44 138 1
E6T 37 37 139 41 140 33 130 1
E8Q 38 50 141 42 127 35 142 43 143 1
E8Q 39 44 137 36 129 42 141 50 144 1
E6T 40 41 139 37 145 45 146 1
E6T 41 46 147 45 145 37 131 1
E6T 42 46 132 38 135 39 148 1
E6T 43 40 149 47 150 39 136 1
E6T 44 54 151 46 148 39 152 1
E6T 45 40 138 44 153 47 149 1
E6T 46 41 146 45 154 49 155 1
E6T 47 50 143 43 156 51 157 1
E6T 48 50 158 52 159 44 144 1
E6T 49 44 159 52 160 47 153 1
E6T 50 45 147 46 161 53 162 1
E6T 51 53 163 48 164 45 162 1
E6T 52 48 165 49 154 45 164 1
E6T 53 46 151 54 166 53 161 1
E6T 54 57 167 54 168 47 169 1
E6T 55 53 170 55 171 48 163 1
E6T 56 49 165 48 171 55 172 1
E6T 57 50 173 56 174 52 158 1
E6T 58 50 157 51 175 56 173 1
E6T 59 59 176 57 177 52 178 1
E6T 60 54 179 58 180 53 166 1
E6T 61 55 170 53 180 58 181 1
E6T 62 58 179 54 167 57 182 1
E6T 63 58 182 57 183 60 184 1
E6T 64 59 185 60 183 57 176 1
E6T 65 59 178 52 174 56 186 1
E6T 66 57 169 47 160 52 177 1
E6T 67 54 152 39 150 47 168 1
ND 1 6.83115000e+005 8.65270800e+006 0.00000000e+000
ND 2 6.82066000e+005 8.65270156e+006 0.00000000e+000
ND 3 6.82837136e+005 8.65185167e+006 0.00000000e+000
ND 4 6.81846398e+005 8.65182937e+006 0.00000000e+000
ND 5 6.81017000e+005 8.65269511e+006 0.00000000e+000
ND 6 6.82507000e+005 8.65101400e+006 0.00000000e+000
ND 7 6.82565000e+005 8.65029000e+006 0.00000000e+000
ND 8 6.81464500e+005 8.65096875e+006 0.00000000e+000
ND 9 6.80855661e+005 8.65180708e+006 0.00000000e+000
ND 10 6.79968000e+005 8.65268867e+006 0.00000000e+000
ND 11 6.82548810e+005 8.64951489e+006 0.00000000e+000
ND 12 6.81521500e+005 8.65018550e+006 0.00000000e+000
ND 13 6.80422000e+005 8.65092350e+006 0.00000000e+000
ND 14 6.79864924e+005 8.65178478e+006 0.00000000e+000
ND 15 6.78919000e+005 8.65268222e+006 0.00000000e+000
ND 16 6.77870000e+005 8.65267578e+006 0.00000000e+000
ND 17 6.82532619e+005 8.64873978e+006 0.00000000e+000
ND 18 6.81569158e+005 8.64945958e+006 0.00000000e+000
ND 19 6.80478000e+005 8.65008100e+006 0.00000000e+000
ND 20 6.79379500e+005 8.65087825e+006 0.00000000e+000
ND 21 6.78874186e+005 8.65176248e+006 0.00000000e+000
ND 22 6.77883449e+005 8.65174019e+006 0.00000000e+000
ND 23 6.76821000e+005 8.65266933e+006 0.00000000e+000
ND 24 6.82512810e+005 8.64779139e+006 0.00000000e+000
ND 25 6.82493000e+005 8.64684300e+006 0.00000000e+000
ND 26 6.73674000e+005 8.65265000e+006 0.00000000e+000
ND 27 6.75772000e+005 8.65266289e+006 0.00000000e+000
ND 28 6.81464183e+005 8.64873265e+006 0.00000000e+000
ND 29 6.80589507e+005 8.64940428e+006 0.00000000e+000
ND 30 6.79434500e+005 8.64997650e+006 0.00000000e+000
ND 31 6.78337000e+005 8.65083300e+006 0.00000000e+000
ND 32 6.76892712e+005 8.65171789e+006 0.00000000e+000
ND 33 6.81378000e+005 8.64685267e+006 0.00000000e+000
ND 34 6.74723000e+005 8.65265644e+006 0.00000000e+000
ND 35 6.73920500e+005 8.65165100e+006 0.00000000e+000
ND 36 6.75901975e+005 8.65169559e+006 0.00000000e+000
ND 37 6.80395746e+005 8.64872552e+006 0.00000000e+000
ND 38 6.79609856e+005 8.64934897e+006 0.00000000e+000
ND 39 6.78391000e+005 8.64987200e+006 0.00000000e+000
ND 40 6.77294500e+005 8.65078775e+006 0.00000000e+000
ND 41 6.80263000e+005 8.64686233e+006 0.00000000e+000
ND 42 6.74911237e+005 8.65167330e+006 0.00000000e+000
ND 43 6.74167000e+005 8.65065200e+006 0.00000000e+000
ND 44 6.76252000e+005 8.65074250e+006 0.00000000e+000
ND 45 6.79617734e+005 8.64780276e+006 0.00000000e+000
ND 46 6.79327310e+005 8.64871839e+006 0.00000000e+000
ND 47 6.77347500e+005 8.64976750e+006 0.00000000e+000
ND 48 6.79007180e+005 8.64752197e+006 0.00000000e+000
ND 49 6.79148000e+005 8.64687200e+006 0.00000000e+000
ND 50 6.75209500e+005 8.65069725e+006 0.00000000e+000
ND 51 6.74713750e+005 8.65010525e+006 0.00000000e+000
ND 52 6.76304000e+005 8.64966300e+006 0.00000000e+000
ND 53 6.78702478e+005 8.64803225e+006 0.00000000e+000
ND 54 6.78258873e+005 8.64871126e+006 0.00000000e+000
ND 55 6.78357934e+005 8.64727123e+006 0.00000000e+000
ND 56 6.75260500e+005 8.64955850e+006 0.00000000e+000
ND 57 6.77190437e+005 8.64870413e+006 0.00000000e+000
ND 58 6.77586972e+005 8.64770291e+006 0.00000000e+000
ND 59 6.76122000e+005 8.64869700e+006 0.00000000e+000
ND 60 6.76854486e+005 8.64819996e+006 0.00000000e+000
ND 61 6.82976068e+005 8.65227984e+006 0.00000000e+000
ND 62 6.82590500e+005 8.65270478e+006 0.00000000e+000
ND 63 6.81956199e+005 8.65226547e+006 0.00000000e+000
ND 64 6.82341767e+005 8.65184052e+006 0.00000000e+000
ND 65 6.81541500e+005 8.65269833e+006 0.00000000e+000
ND 66 6.80936331e+005 8.65225109e+006 0.00000000e+000
ND 67 6.81351030e+005 8.65181823e+006 0.00000000e+000
ND 68 6.82672068e+005 8.65143284e+006 0.00000000e+000
ND 69 6.81655449e+005 8.65139906e+006 0.00000000e+000
ND 70 6.81985750e+005 8.65099138e+006 0.00000000e+000
ND 71 6.80638831e+005 8.65136529e+006 0.00000000e+000
ND 72 6.80943250e+005 8.65094613e+006 0.00000000e+000
ND 73 6.80492500e+005 8.65269189e+006 0.00000000e+000
ND 74 6.79916462e+005 8.65223672e+006 0.00000000e+000
ND 75 6.80360292e+005 8.65179593e+006 0.00000000e+000
ND 76 6.82014250e+005 8.65059975e+006 0.00000000e+000
ND 77 6.82043250e+005 8.65023775e+006 0.00000000e+000
ND 78 6.82536000e+005 8.65065200e+006 0.00000000e+000
ND 79 6.81493000e+005 8.65057713e+006 0.00000000e+000
ND 80 6.82058984e+005 8.64948724e+006 0.00000000e+000
ND 81 6.82556905e+005 8.64990244e+006 0.00000000e+000
ND 82 6.81545329e+005 8.64982254e+006 0.00000000e+000
ND 83 6.80971750e+005 8.65055450e+006 0.00000000e+000
ND 84 6.79622212e+005 8.65133152e+006 0.00000000e+000
ND 85 6.79900750e+005 8.65090088e+006 0.00000000e+000
ND 86 6.79443500e+005 8.65268544e+006 0.00000000e+000
ND 87 6.78896593e+005 8.65222235e+006 0.00000000e+000
ND 88 6.79369555e+005 8.65177363e+006 0.00000000e+000
ND 89 6.81998401e+005 8.64873621e+006 0.00000000e+000
ND 90 6.82540715e+005 8.64912733e+006 0.00000000e+000
ND 91 6.81516671e+005 8.64909612e+006 0.00000000e+000
ND 92 6.80999750e+005 8.65013325e+006 0.00000000e+000
ND 93 6.80450000e+005 8.65050225e+006 0.00000000e+000
ND 94 6.81079333e+005 8.64943193e+006 0.00000000e+000
ND 95 6.80533753e+005 8.64974264e+006 0.00000000e+000
ND 96 6.79928750e+005 8.65047963e+006 0.00000000e+000
ND 97 6.78605593e+005 8.65129774e+006 0.00000000e+000
ND 98 6.78858250e+005 8.65085563e+006 0.00000000e+000
ND 99 6.78394500e+005 8.65267900e+006 0.00000000e+000
ND 100 6.77876725e+005 8.65220798e+006 0.00000000e+000
ND 101 6.78378818e+005 8.65175134e+006 0.00000000e+000
ND 102 6.77345500e+005 8.65267256e+006 0.00000000e+000
ND 103 6.76856856e+005 8.65219361e+006 0.00000000e+000
ND 104 6.77388081e+005 8.65172904e+006 0.00000000e+000
ND 105 6.82522715e+005 8.64826558e+006 0.00000000e+000
ND 106 6.81988496e+005 8.64826202e+006 0.00000000e+000
ND 107 6.80929965e+005 8.64872908e+006 0.00000000e+000
ND 108 6.80492627e+005 8.64906490e+006 0.00000000e+000
ND 109 6.79956250e+005 8.65002875e+006 0.00000000e+000
ND 110 6.79407000e+005 8.65042738e+006 0.00000000e+000
ND 111 6.80099681e+005 8.64937663e+006 0.00000000e+000
ND 112 6.79522178e+005 8.64966274e+006 0.00000000e+000
ND 113 6.78885750e+005 8.65040475e+006 0.00000000e+000
ND 114 6.78110225e+005 8.65128659e+006 0.00000000e+000
ND 115 6.77093606e+005 8.65125282e+006 0.00000000e+000
ND 116 6.77815750e+005 8.65081038e+006 0.00000000e+000
ND 117 6.76296500e+005 8.65266611e+006 0.00000000e+000
ND 118 6.75836987e+005 8.65217924e+006 0.00000000e+000
ND 119 6.76397343e+005 8.65170674e+006 0.00000000e+000
ND 120 6.81421091e+005 8.64779266e+006 0.00000000e+000
ND 121 6.81945405e+005 8.64732203e+006 0.00000000e+000
ND 122 6.82502905e+005 8.64731719e+006 0.00000000e+000
ND 123 6.81935500e+005 8.64684783e+006 0.00000000e+000
ND 124 6.74817119e+005 8.65216487e+006 0.00000000e+000
ND 125 6.74198500e+005 8.65265322e+006 0.00000000e+000
ND 126 6.73797250e+005 8.65215050e+006 0.00000000e+000
ND 127 6.74415869e+005 8.65166215e+006 0.00000000e+000
ND 128 6.75247500e+005 8.65265967e+006 0.00000000e+000
ND 129 6.75406606e+005 8.65168445e+006 0.00000000e+000
ND 130 6.80886873e+005 8.64778909e+006 0.00000000e+000
ND 131 6.79861528e+005 8.64872195e+006 0.00000000e+000
ND 132 6.79468583e+005 8.64903368e+006 0.00000000e+000
ND 133 6.78364000e+005 8.65035250e+006 0.00000000e+000
ND 134 6.78912750e+005 8.64992425e+006 0.00000000e+000
ND 135 6.79000428e+005 8.64961049e+006 0.00000000e+000
ND 136 6.77842750e+005 8.65032988e+006 0.00000000e+000
ND 137 6.76076987e+005 8.65121905e+006 0.00000000e+000
ND 138 6.76773250e+005 8.65076513e+006 0.00000000e+000
ND 139 6.80329373e+005 8.64779393e+006 0.00000000e+000
ND 140 6.80820500e+005 8.64685750e+006 0.00000000e+000
ND 141 6.75060369e+005 8.65118527e+006 0.00000000e+000
ND 142 6.74043750e+005 8.65115150e+006 0.00000000e+000
ND 143 6.74688250e+005 8.65067463e+006 0.00000000e+000
ND 144 6.75730750e+005 8.65071988e+006 0.00000000e+000
ND 145 6.80006740e+005 8.64826414e+006 0.00000000e+000
ND 146 6.79940367e+005 8.64733255e+006 0.00000000e+000
ND 147 6.79472522e+005 8.64826057e+006 0.00000000e+000
ND 148 6.78859155e+005 8.64929519e+006 0.00000000e+000
ND 149 6.77321000e+005 8.65027763e+006 0.00000000e+000
ND 150 6.77869250e+005 8.64981975e+006 0.00000000e+000
ND 151 6.78793091e+005 8.64871482e+006 0.00000000e+000
ND 152 6.78324937e+005 8.64929163e+006 0.00000000e+000
ND 153 6.76799750e+005 8.65025500e+006 0.00000000e+000
ND 154 6.79382867e+005 8.64733738e+006 0.00000000e+000
ND 155 6.79705500e+005 8.64686717e+006 0.00000000e+000
ND 156 6.74440375e+005 8.65037863e+006 0.00000000e+000
ND 157 6.74961625e+005 8.65040125e+006 0.00000000e+000
ND 158 6.75756750e+005 8.65018013e+006 0.00000000e+000
ND 159 6.76278000e+005 8.65020275e+006 0.00000000e+000
ND 160 6.76825750e+005 8.64971525e+006 0.00000000e+000
ND 161 6.79014894e+005 8.64837532e+006 0.00000000e+000
ND 162 6.79160106e+005 8.64791750e+006 0.00000000e+000
ND 163 6.78854829e+005 8.64777711e+006 0.00000000e+000
ND 164 6.79312457e+005 8.64766237e+006 0.00000000e+000
ND 165 6.79077590e+005 8.64719699e+006 0.00000000e+000
ND 166 6.78480675e+005 8.64837175e+006 0.00000000e+000
ND 167 6.77724655e+005 8.64870769e+006 0.00000000e+000
ND 168 6.77803187e+005 8.64923938e+006 0.00000000e+000
ND 169 6.77268968e+005 8.64923581e+006 0.00000000e+000
ND 170 6.78530206e+005 8.64765174e+006 0.00000000e+000
ND 171 6.78682557e+005 8.64739660e+006 0.00000000e+000
ND 172 6.78752967e+005 8.64707161e+006 0.00000000e+000
ND 173 6.75235000e+005 8.65012788e+006 0.00000000e+000
ND 174 6.75782250e+005 8.64961075e+006 0.00000000e+000
ND 175 6.74987125e+005 8.64983188e+006 0.00000000e+000
ND 176 6.76656218e+005 8.64870056e+006 0.00000000e+000
ND 177 6.76747218e+005 8.64918356e+006 0.00000000e+000
ND 178 6.76213000e+005 8.64918000e+006 0.00000000e+000
ND 179 6.77922923e+005 8.64820709e+006 0.00000000e+000
ND 180 6.78144725e+005 8.64786758e+006 0.00000000e+000
ND 181 6.77972453e+005 8.64748707e+006 0.00000000e+000
ND 182 6.77388704e+005 8.64820352e+006 0.00000000e+000
ND 183 6.77022461e+005 8.64845204e+006 0.00000000e+000
ND 184 6.77220729e+005 8.64795143e+006 0.00000000e+000
ND 185 6.76488243e+005 8.64844848e+006 0.00000000e+000
ND 186 6.75691250e+005 8.64912775e+006 0.00000000e+000

@ -0,0 +1,33 @@
FILE FORMAT FOR GEOMETRY FILE
READ (IFILE,ERR=63,END=63)
1 N,M,((CORDS(J,K),K=1,2), ALFA(J),AO(J),J=1,N),
2 ((NOPS(J,K),K=1,8),IMAT(J),TH(J),NFIXHS(J),J=1,M),
+ (WIDTH(J),SS1(J),SS2(J),WIDS(J),J=1,N)
c
c Part 1 of the geo file contains
c
c 1 N Number of nodes on geo file INTEGER*4
c 2 M Number of elements on "geo" file INTEGER*4
c 3 CORD(J,1) x-coordinate - node J REAL*8 ARRAY SIZE (NUMBER OF NODES, 2)
C 4 CORD(J,2) y-coordinate - node J REAL*8 ARRAY SIZE (NUMBER OF NODES)
C 5 ALFA(J) Boundary slope - node j REAL*4 ARRAY SIZE (NUMBER OF NODES)
C 6 AO(J) Bed elevation - node j REAL*4 ARRAY SIZE (NUMBER OF NODES)
C 7 NOP(J,K) Nodal connections, counterclockwise - element j INTEGER*8 ARRAY SIZE (NUMBER OF ELEMENTS,8)
C 8 IMAT(J) Type number - element j INTEGER*2 ARRAY SIZE (NUMBER OF ELEMENTS)
C 9 TH(J) Principal direction for eddy viscosity - element j REAL*4 ARRAY SIZE (NUMBER OF ELEMENTS)
C 10 NFIXHS(J) Ordering sequence for equation formation and solution - counter j INTEGER*4 ARRAY SIZE (NUMBER OF ELEMENTS)
C 11 WIDTH(J) Nodal bed width for 1-D elements REAL*4 ARRAY SIZE (NUMBER OF NODES)
C 12 SS1(J) Nodal left side slope for 1-D elements REAL*4 ARRAY SIZE (NUMBER OF NODES)
C 13 SS2(J) Nodal right side slope for 1-D elements REAL*4 ARRAY SIZE (NUMBER OF NODES)
C 14 WIDS(J) Nodal storage width for 1-D elements REAL*4 ARRAY SIZE (NUMBER OF NODES)
The remainder of the file contains more information associated with 1-D elements
C 11 WIDTH(J) Nodal bed width ( for 1-D nodes) - node j
C 12 SS1(J) Nodal left side slope ( for 1-D nodes) - node j
C 13 SS2(J) Nodal right side slope ( for 1-D nodes) - node j
C 14 WIDS(J) Off channel storage width - node j (see appendix to documentation)

Binary file not shown.

@ -0,0 +1,29 @@
<!DOCTYPE HTML>
<html>
<head>
<meta name="google" value="notranslate" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Created by Camtasia Studio 8</title>
<style>
html, body {
margin: 0px;
padding: 0px;
font-family:Verdana, Geneva, sans-serif;
background-color: #1a1a1a;
text-align: center;
width: 100%;
height: 100%;
}
</style>
<link href="junctions_embed.css" rel="stylesheet" type="text/css">
</head>
<body>
<iframe class="tscplayer_inline" id="embeddedSmartPlayerInstance" src="junctions_player.html?embedIFrameId=embeddedSmartPlayerInstance" scrolling="no" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</body>
</html>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

@ -0,0 +1,36 @@
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/" xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/" xmlns:tsc="http://www.techsmith.com/xmp/tsc/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:tscDM="http://www.techsmith.com/xmp/tscDM/" xmlns:tscIQ="http://www.techsmith.com/xmp/tscIQ/" xmlns:tscHS="http://www.techsmith.com/xmp/tscHS/" xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#" xmlns:stFnt="http://ns.adobe.com/xap/1.0/sType/Font#" xmlns:exif="http://ns.adobe.com/exif/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description tsc:version="2.0.1" dc:date="2018-02-17 02:41:53 PM" dc:source="Camtasia Studio,8.5.1,enu" dc:title="junctions" tscDM:firstFrame="junctions_First_Frame.png" tscDM:originId="8B31DDA3-03CB-436E-AA29-8B6426F9E569" tscDM:project="junctions">
<xmpDM:duration xmpDM:scale="1/1000" xmpDM:value="289033"/>
<xmpDM:videoFrameSize stDim:unit="pixel" stDim:h="1080" stDim:w="1920"/>
<tsc:langName>
<rdf:Bag>
<rdf:li xml:lang="en-US">English</rdf:li></rdf:Bag>
</tsc:langName>
<xmpDM:Tracks>
<rdf:Bag>
</rdf:Bag>
</xmpDM:Tracks>
<tscDM:controller>
<rdf:Description xmpDM:name="tscplayer">
<tscDM:parameters>
<rdf:Bag>
<rdf:li xmpDM:name="autohide" xmpDM:value="true"/><rdf:li xmpDM:name="autoplay" xmpDM:value="false"/><rdf:li xmpDM:name="loop" xmpDM:value="false"/><rdf:li xmpDM:name="searchable" xmpDM:value="true"/><rdf:li xmpDM:name="captionsenabled" xmpDM:value="false"/><rdf:li xmpDM:name="sidebarenabled" xmpDM:value="false"/><rdf:li xmpDM:name="unicodeenabled" xmpDM:value="false"/><rdf:li xmpDM:name="backgroundcolor" xmpDM:value="000000"/><rdf:li xmpDM:name="sidebarlocation" xmpDM:value="left"/><rdf:li xmpDM:name="endaction" xmpDM:value="stop"/><rdf:li xmpDM:name="endactionparam" xmpDM:value="true"/><rdf:li xmpDM:name="locale" xmpDM:value="en-US"/></rdf:Bag>
</tscDM:parameters>
<tscDM:controllerText>
<rdf:Bag>
</rdf:Bag>
</tscDM:controllerText>
</rdf:Description>
</tscDM:controller>
<tscDM:contentList>
<rdf:Description>
<tscDM:files>
<rdf:Seq>
<rdf:li xmpDM:name="0" xmpDM:value="junctions.mp4"/><rdf:li xmpDM:name="1" xmpDM:value="junctions_First_Frame.png"/><rdf:li xmpDM:name="2" xmpDM:value="junctions_Thumbnails.png"/></rdf:Seq>
</tscDM:files>
</rdf:Description>
</tscDM:contentList>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>

@ -0,0 +1,28 @@
@charset "utf-8";
#tsc_player {
z-index: 9999;
}
.tscplayer_inline {
position:static;
margin: 30px;
width: 852px;
height: 480px;
z-index:auto;
}
.tscplayer_fullframe {
position:absolute;
top: 0px;
left: 0px;
margin: 0px;
padding: 0px;
z-index: 9999;
}
@media screen and (max-width: 852px) {
.tscplayer_inline {
width: 100%;
}
}

@ -0,0 +1,75 @@
<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<html>
<head>
<meta name="google" value="notranslate" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<link href='https://fonts.googleapis.com/css?family=Quicksand|Actor' rel='stylesheet' type='text/css'>
<link href="skins/overlay/techsmith-smart-player.min.css" rel="stylesheet" type="text/css" />
<style>
html, body {
background-color: #1a1a1a;
}
</style>
</head>
<body>
<div id="tscVideoContent">
<img width="32px" height="32px" style="position: absolute; top: 50%; left: 50%; margin: -16px 0 0 -16px"
src="data:image/gif;base64,R0lGODlhIAAgAPMAAAAAAP///zg4OHp6ekhISGRkZMjIyKioqCYmJhoaGkJCQuDg4Pr6+gAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ/V/nmOM82XiHRLYKhKP1oZmADdEAAAh+QQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY/CZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB+A4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6+Ho7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq+B6QDtuetcaBPnW6+O7wDHpIiK9SaVK5GgV543tzjgGcghAgAh+QQJCgAAACwAAAAAIAAgAAAE7hDISSkxpOrN5zFHNWRdhSiVoVLHspRUMoyUakyEe8PTPCATW9A14E0UvuAKMNAZKYUZCiBMuBakSQKG8G2FzUWox2AUtAQFcBKlVQoLgQReZhQlCIJesQXI5B0CBnUMOxMCenoCfTCEWBsJColTMANldx15BGs8B5wlCZ9Po6OJkwmRpnqkqnuSrayqfKmqpLajoiW5HJq7FL1Gr2mMMcKUMIiJgIemy7xZtJsTmsM4xHiKv5KMCXqfyUCJEonXPN2rAOIAmsfB3uPoAK++G+w48edZPK+M6hLJpQg484enXIdQFSS1u6UhksENEQAAIfkECQoAAAAsAAAAACAAIAAABOcQyEmpGKLqzWcZRVUQnZYg1aBSh2GUVEIQ2aQOE+G+cD4ntpWkZQj1JIiZIogDFFyHI0UxQwFugMSOFIPJftfVAEoZLBbcLEFhlQiqGp1Vd140AUklUN3eCA51C1EWMzMCezCBBmkxVIVHBWd3HHl9JQOIJSdSnJ0TDKChCwUJjoWMPaGqDKannasMo6WnM562R5YluZRwur0wpgqZE7NKUm+FNRPIhjBJxKZteWuIBMN4zRMIVIhffcgojwCF117i4nlLnY5ztRLsnOk+aV+oJY7V7m76PdkS4trKcdg0Zc0tTcKkRAAAIfkECQoAAAAsAAAAACAAIAAABO4QyEkpKqjqzScpRaVkXZWQEximw1BSCUEIlDohrft6cpKCk5xid5MNJTaAIkekKGQkWyKHkvhKsR7ARmitkAYDYRIbUQRQjWBwJRzChi9CRlBcY1UN4g0/VNB0AlcvcAYHRyZPdEQFYV8ccwR5HWxEJ02YmRMLnJ1xCYp0Y5idpQuhopmmC2KgojKasUQDk5BNAwwMOh2RtRq5uQuPZKGIJQIGwAwGf6I0JXMpC8C7kXWDBINFMxS4DKMAWVWAGYsAdNqW5uaRxkSKJOZKaU3tPOBZ4DuK2LATgJhkPJMgTwKCdFjyPHEnKxFCDhEAACH5BAkKAAAALAAAAAAgACAAAATzEMhJaVKp6s2nIkolIJ2WkBShpkVRWqqQrhLSEu9MZJKK9y1ZrqYK9WiClmvoUaF8gIQSNeF1Er4MNFn4SRSDARWroAIETg1iVwuHjYB1kYc1mwruwXKC9gmsJXliGxc+XiUCby9ydh1sOSdMkpMTBpaXBzsfhoc5l58Gm5yToAaZhaOUqjkDgCWNHAULCwOLaTmzswadEqggQwgHuQsHIoZCHQMMQgQGubVEcxOPFAcMDAYUA85eWARmfSRQCdcMe0zeP1AAygwLlJtPNAAL19DARdPzBOWSm1brJBi45soRAWQAAkrQIykShQ9wVhHCwCQCACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq+E71SRQeyqUToLA7VxF0JDyIQh/MVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiRMDjI0Fd30/iI2UA5GSS5UDj2l6NoqgOgN4gksEBgYFf0FDqKgHnyZ9OX8HrgYHdHpcHQULXAS2qKpENRg7eAMLC7kTBaixUYFkKAzWAAnLC7FLVxLWDBLKCwaKTULgEwbLA4hJtOkSBNqITT3xEgfLpBtzE/jiuL04RGEBgwWhShRgQExHBAAh+QQJCgAAACwAAAAAIAAgAAAE7xDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfZiCqGk5dTESJeaOAlClzsJsqwiJwiqnFrb2nS9kmIcgEsjQydLiIlHehhpejaIjzh9eomSjZR+ipslWIRLAgMDOR2DOqKogTB9pCUJBagDBXR6XB0EBkIIsaRsGGMMAxoDBgYHTKJiUYEGDAzHC9EACcUGkIgFzgwZ0QsSBcXHiQvOwgDdEwfFs0sDzt4S6BK4xYjkDOzn0unFeBzOBijIm1Dgmg5YFQwsCMjp1oJ8LyIAACH5BAkKAAAALAAAAAAgACAAAATwEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq+E71SRQeyqUToLA7VxF0JDyIQh/MVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GGl6NoiPOH16iZKNlH6KmyWFOggHhEEvAwwMA0N9GBsEC6amhnVcEwavDAazGwIDaH1ipaYLBUTCGgQDA8NdHz0FpqgTBwsLqAbWAAnIA4FWKdMLGdYGEgraigbT0OITBcg5QwPT4xLrROZL6AuQAPUS7bxLpoWidY0JtxLHKhwwMJBTHgPKdEQAACH5BAkKAAAALAAAAAAgACAAAATrEMhJaVKp6s2nIkqFZF2VIBWhUsJaTokqUCoBq+E71SRQeyqUToLA7VxF0JDyIQh/MVVPMt1ECZlfcjZJ9mIKoaTl1MRIl5o4CUKXOwmyrCInCKqcWtvadL2SYhyASyNDJ0uIiUd6GAULDJCRiXo1CpGXDJOUjY+Yip9DhToJA4RBLwMLCwVDfRgbBAaqqoZ1XBMHswsHtxtFaH1iqaoGNgAIxRpbFAgfPQSqpbgGBqUD1wBXeCYp1AYZ19JJOYgH1KwA4UBvQwXUBxPqVD9L3sbp2BNk2xvvFPJd+MFCN6HAAIKgNggY0KtEBAAh+QQJCgAAACwAAAAAIAAgAAAE6BDISWlSqerNpyJKhWRdlSAVoVLCWk6JKlAqAavhO9UkUHsqlE6CwO1cRdCQ8iEIfzFVTzLdRAmZX3I2SfYIDMaAFdTESJeaEDAIMxYFqrOUaNW4E4ObYcCXaiBVEgULe0NJaxxtYksjh2NLkZISgDgJhHthkpU4mW6blRiYmZOlh4JWkDqILwUGBnE6TYEbCgevr0N1gH4At7gHiRpFaLNrrq8HNgAJA70AWxQIH1+vsYMDAzZQPC9VCNkDWUhGkuE5PxJNwiUK4UfLzOlD4WvzAHaoG9nxPi5d+jYUqfAhhykOFwJWiAAAIfkECQoAAAAsAAAAACAAIAAABPAQyElpUqnqzaciSoVkXVUMFaFSwlpOCcMYlErAavhOMnNLNo8KsZsMZItJEIDIFSkLGQoQTNhIsFehRww2CQLKF0tYGKYSg+ygsZIuNqJksKgbfgIGepNo2cIUB3V1B3IvNiBYNQaDSTtfhhx0CwVPI0UJe0+bm4g5VgcGoqOcnjmjqDSdnhgEoamcsZuXO1aWQy8KAwOAuTYYGwi7w5h+Kr0SJ8MFihpNbx+4Erq7BYBuzsdiH1jCAzoSfl0rVirNbRXlBBlLX+BP0XJLAPGzTkAuAOqb0WT5AH7OcdCm5B8TgRwSRKIHQtaLCwg1RAAAOwAAAAAAAAAAAA==">
</div>
<script src="scripts/config_xml.js"></script>
<script type="text/javascript">
(function (window) {
function setup(TSC) {
TSC.playerConfiguration.setFlashPlayerSwf("junctions_controller.swf");
TSC.playerConfiguration.addMediaSrc("junctions.mp4");
TSC.playerConfiguration.setXMPSrc("junctions_config.xml");
TSC.playerConfiguration.setAutoHideControls(true);
TSC.playerConfiguration.setBackgroundColor("#000000");
TSC.playerConfiguration.setCaptionsEnabled(false);
TSC.playerConfiguration.setSidebarEnabled(false);
TSC.playerConfiguration.setAutoPlayMedia(false);
TSC.playerConfiguration.setPosterImageSrc("junctions_First_Frame.png");
TSC.playerConfiguration.setIsSearchable(true);
TSC.playerConfiguration.setEndActionType("stop");
TSC.playerConfiguration.setEndActionParam("true");
TSC.playerConfiguration.setAllowRewind(-1);
TSC.localizationStrings.setLanguage(TSC.languageCodes.ENGLISH);
// Uncomment to turn full frame mode on
//TSC.playerConfiguration.setDisableFullframeMode(false);
// Uncomment to set custom skin for Flash
//TSC.playerConfiguration.setConfigurationSrc("skins/configuration_present.xml");
// Use Fathom service
//TSC.playerConfiguration.setFathomId("666850b8c609432d8c465dbaab3702a7");
// Uncomment to see hotspot shapes
//TSC.playerConfiguration.setDebugHotspot(true);
// Uncomment to force flash player
//TSC.playerConfiguration.setForceFlashPlayer(true);
TSC.mediaPlayer.init("#tscVideoContent");
}
function loadScript(e,t){if(!e||!(typeof e==="string")){return}var n=document.createElement("script");if(typeof document.attachEvent==="object"){n.onreadystatechange=function(){if(n.readyState==="complete"||n.readyState==="loaded"){if(t){t()}}}}else{n.onload=function(){if(t){t()}}}n.src=e;document.getElementsByTagName("head")[0].appendChild(n)}
loadScript('scripts/techsmith-smart-player.min.js', function() {
setup(window["TSC"]);
});
}(window));
</script>
</body>
</html>

@ -0,0 +1,38 @@
var TSC = TSC || {};
TSC.embedded_config_xml = '<x:xmpmeta xmlns:x="adobe:ns:meta/">\
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/" xmlns:xmpG="http://ns.adobe.com/xap/1.0/g/" xmlns:tsc="http://www.techsmith.com/xmp/tsc/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:tscDM="http://www.techsmith.com/xmp/tscDM/" xmlns:tscIQ="http://www.techsmith.com/xmp/tscIQ/" xmlns:tscHS="http://www.techsmith.com/xmp/tscHS/" xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#" xmlns:stFnt="http://ns.adobe.com/xap/1.0/sType/Font#" xmlns:exif="http://ns.adobe.com/exif/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/">\
<rdf:Description tsc:version="2.0.1" dc:date="2018-02-17 02:41:53 PM" dc:source="Camtasia Studio,8.5.1,enu" dc:title="junctions" tscDM:firstFrame="junctions_First_Frame.png" tscDM:originId="8B31DDA3-03CB-436E-AA29-8B6426F9E569" tscDM:project="junctions">\
<xmpDM:duration xmpDM:scale="1/1000" xmpDM:value="289033"/>\
<xmpDM:videoFrameSize stDim:unit="pixel" stDim:h="1080" stDim:w="1920"/>\
<tsc:langName>\
<rdf:Bag>\
<rdf:li xml:lang="en-US">English</rdf:li></rdf:Bag>\
</tsc:langName>\
<xmpDM:Tracks>\
<rdf:Bag>\
</rdf:Bag>\
</xmpDM:Tracks>\
<tscDM:controller>\
<rdf:Description xmpDM:name="tscplayer">\
<tscDM:parameters>\
<rdf:Bag>\
<rdf:li xmpDM:name="autohide" xmpDM:value="true"/><rdf:li xmpDM:name="autoplay" xmpDM:value="false"/><rdf:li xmpDM:name="loop" xmpDM:value="false"/><rdf:li xmpDM:name="searchable" xmpDM:value="true"/><rdf:li xmpDM:name="captionsenabled" xmpDM:value="false"/><rdf:li xmpDM:name="sidebarenabled" xmpDM:value="false"/><rdf:li xmpDM:name="unicodeenabled" xmpDM:value="false"/><rdf:li xmpDM:name="backgroundcolor" xmpDM:value="000000"/><rdf:li xmpDM:name="sidebarlocation" xmpDM:value="left"/><rdf:li xmpDM:name="endaction" xmpDM:value="stop"/><rdf:li xmpDM:name="endactionparam" xmpDM:value="true"/><rdf:li xmpDM:name="locale" xmpDM:value="en-US"/></rdf:Bag>\
</tscDM:parameters>\
<tscDM:controllerText>\
<rdf:Bag>\
</rdf:Bag>\
</tscDM:controllerText>\
</rdf:Description>\
</tscDM:controller>\
<tscDM:contentList>\
<rdf:Description>\
<tscDM:files>\
<rdf:Seq>\
<rdf:li xmpDM:name="0" xmpDM:value="junctions.mp4"/><rdf:li xmpDM:name="1" xmpDM:value="junctions_First_Frame.png"/><rdf:li xmpDM:name="2" xmpDM:value="junctions_Thumbnails.png"/></rdf:Seq>\
</tscDM:files>\
</rdf:Description>\
</tscDM:contentList>\
</rdf:Description>\
</rdf:RDF>\
</x:xmpmeta>';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

File diff suppressed because one or more lines are too long

@ -0,0 +1,18 @@
SUBROUTINE ADDBEDLV
USE BLK1MOD
! process node with weighting values
DO N=1,NP
! IF(ICN(N) .EQ. 2) THEN
IF(NRIVCR1(N) .GT. 0) THEN
NC1=NRIVCR1(N)
NC2=NRIVCR2(N)
WT1=WTRIVCR1(N)
WT2=WTRIVCR2(N)
WD(N)=CRSDAT(NC1,1,1)*WT1+CRSDAT(NC2,1,1)*WT2
ENDIF
! ENDIF
ENDDO
RETURN
END

@ -0,0 +1,136 @@
SUBROUTINE ADDSLOT
! ADD SLOT TO 1-D
USE BLK1MOD
! GET SLOT PARAMETERS
CALL GETSLOTPARAM(ISLTYP,SLDEP,SLRNG,SLPOR)
IF(ISLTYP .EQ. -1) RETURN
! SEARCH FOR CROSS-SECTION REACH/TYPE
IF(ISLTYP .EQ. 0) THEN
DO N=1,MCRS
IF(IVMIL(N) .LT. 1) EXIT
MM=NRIVL(IVMIL(N))
IF(MM .GT. 0) THEN
CALL ADDSLOTDATA(IVMIL(N),MM,SLDEP,SLRNG,SLPOR)
ENDIF
NRIVL(IVMIL(N))=MM
ENDDO
ELSE
! SEARCH FOR CROSS-SECTION REACH/TYPE
!
! IVMIL = CROSS-SECTION NUMBER
! NRIVL = NUMBER OF POINTS IN SECTION
! NOREACH = REACH/TYPE NUMBER
! CRSDAT 1 = ELEVATION
! CRSDAT 2 = AREA
! CRSDAT 3 = WIDTH
DO N=1,MCRS
IF(ISLTYP .EQ. NOREACH(N)) THEN
MM=NRIVL(IVMIL(N))
CALL ADDSLOTDATA(IVMIL(N),MM,SLDEP,SLRNG,SLPOR)
NRIVL(IVMIL(N))=MM
ENDIF
ENDDO
ENDIF
! APPLY CHANGE
RETURN
END
SUBROUTINE GETSLOTPARAM(ISLTYP,SLDEP,SLRNG,SLPOR)
use winteracter
USE BLK1MOD
!-
include 'd.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: IERR,ISET,IBOX
REAL :: ASET
CHARACTER*1 :: IFLAG
call wdialogload(IDD_ADDSLOT)
ierr=infoerror(1)
CALL WDialogSelect(IDD_ADDSLOT)
ierr=infoerror(1)
ISLTYP=0
SLDEP=4.
SLRNG=0.5
SLPOR=0.1
100 continue
CALL WDialogPutINTEGER(IDF_INTEGER1,ISLTYP)
CALL WDialogPutReal(idf_real1,SLDEP)
CALL WDialogPutReal(idf_real2,SLRNG)
CALL WDialogPutReal(idf_real3,SLPOR)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
DO
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,ISLTYP)
CALL WDialogGetReal(idf_real1,SLDEP)
CALL WDialogGetReal(idf_real2,SLRNG)
CALL WDialogGetReal(idf_real3,SLPOR)
GO TO 200
else
ISLTYP=-1
RETURN
endif
ENDDO
200 CONTINUE
RETURN
END
SUBROUTINE ADDSLOTDATA(N,M,SLDEP,SLRNG,SLPOR)
USE BLK1MOD
BLEVL=CRSDAT(N,1,1)
BWIDT=CRSDAT(N,1,3)
IF(BWIDT .LT. 1) THEN
CRSDAT(N,1,3)=1.0
CRSDAT(N,0,1)=BLEVL-SLRNG
CRSDAT(N,0,3)=SLPOR
CRSDAT(N,-1,1)=CRSDAT(N,0,1)-SLDEP
CRSDAT(N,-1,3)=SLPOR
MLT=-1
ELSE
CRSDAT(N,0,1)=BLEVL-SLRNG
CRSDAT(N,0,3)=1.0
CRSDAT(N,-1,1)=BLEVL-2.*SLRNG
CRSDAT(N,-1,3)=SLPOR
CRSDAT(N,-2,1)=CRSDAT(N,0,1)-SLDEP
CRSDAT(N,-2,3)=SLPOR
MLT=-2
ENDIF
DO I=M,MLT,-1
DO J=1,3
CRSDAT(N,I+1-MLT,J)=CRSDAT(N,I,J)
ENDDO
ENDDO
M=M+1-MLT
DO I=2,M
if(i .gt. 1) then
CRSDAT(N,I,2)=CRSDAT(N,I-1,2)+&
(CRSDAT(N,I,1)-CRSDAT(N,I-1,1))*&
(CRSDAT(N,I,3)+CRSDAT(N,I-1,3))/2.
endif
ENDDO
RETURN
END

@ -74,7 +74,7 @@
NCSPTS,XELVP(50),YELVP(50),ZELVP(50),SELVP(50),&
ZREF,DFACTOR,ZMIN,IXNOD,LCROSS&
,IVMIL(MCRS),NRIVL(MCRS),NOREACH(MCRS)&
,CRSDAT(MCRS,MPTS,3),NCRSEC,XCRS(MCRS),YCRS(MCRS)
,CRSDAT(MCRS,-4:MPTS,3),NCRSEC,XCRS(MCRS),YCRS(MCRS)
ALLOCATABLE NRIVCR1(:),WTRIVCR1(:),NRIVCR2(:),WTRIVCR2(:)

@ -1,4 +1,4 @@
! Winteracter resource identifiers. Created : 03/Mar/2017 13:04:04
! Winteracter resource identifiers. Created : 19/Oct/2017 10:30:12
!
! This file is generated by the Winteracter resource editor.
! It should not be edited manually. It is also not advisable to load this
@ -403,3 +403,7 @@
INTEGER, PARAMETER :: IDF_GREEN = 1036
INTEGER, PARAMETER :: IDF_BLUE = 1038
INTEGER, PARAMETER :: IDD_DIALOG002 = 169
INTEGER, PARAMETER :: ID_ADDSLOT = 40150
INTEGER, PARAMETER :: IDF_CANCEL = 1088
INTEGER, PARAMETER :: IDD_ADDSLOT = 171
INTEGER, PARAMETER :: ID_ADDBEDLEV = 40151

@ -772,8 +772,8 @@
INQUIRE (FILE = fname, EXIST = exists)
IF (.NOT. exists) THEN
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'ORG file does not exist!!'//CHAR(13)// &
'Do you wish to create file and view image','Looking for ORG file')
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Location file does not exist!!'//CHAR(13)// &
'Do you wish to create file and view image','Looking for location file')
! If answer 'Yes' set ifrmel to 0
!
IF (WInfoDialog(4) .ne. 2) then
@ -1075,10 +1075,16 @@
IACTVFIL=IOLDACT
CALL ADDTOMESH(IFILADD,1)
GO TO 100
!ipk sep16 ADD MESH FROM POINTS
CASE (ID_ADDMESHTR)
CALL ADDMESHT
GO TO 100
!ipk sep16 ADD MESH FROM POINTS
CASE (ID_ADDBEDLEV)
CALL ADDBEDLV
GO TO 100
!ipk may03
CASE (ID_TRIANG) ! add a triangle of elements
CALL ADDTRIANG
@ -1201,6 +1207,11 @@
CASE (ID_SAVELTLD)
CALL SAVEEQ
GO TO 100
CASE (ID_ADDSLOT)
CALL ADDSLOT
GO TO 100
CASE (ID_ITEM17) ! Exit option
!IPK SEP02

@ -43,7 +43,15 @@
IF(ID1(1:3) .EQ. 'ICS') THEN
READ(DLIN1,'(2I8,8x,2f16.0)') IVMIL(N),NRIVL(IVMIL(N)),XCRS(IVMIL(N)),YCRS(IVMIL(N))
write(90,'(a)') 'ics',id1,dlin1
!
! IVMIL = CROSS-SECTION NUMBER
! NRIVL = NUMBER OF POINTS IN SECTION
! NOREACH = REACH/TYPE NUMBER
! CRSDAT 1 = ELEVATION
! CRSDAT 2 = AREA
! CRSDAT 3 = WIDTH
write(90,'(a)') 'ics',id1,dlin1
NOREACH(IVMIL(N))=NOREACHTMP
IF(NRIVL(IVMIL(N)) .GT. MPTS) THEN
CALL WMessageBox(0,3,1,'Allowable number of points in a cross-section (75) exceeded'//char(13)//&

@ -104,7 +104,8 @@
DO J=1,NEDGE
IF(IEDGE(J,1) .NE. 0) THEN
CALL FORMT(XMAP1,YMAP1,J,N,NGAP,KK)
!ipk dec17 add wd
CALL FORMT(XMAP1,YMAP1,J,N,NGAP,KK,wd)
ENDIF
END DO

@ -1702,6 +1702,12 @@
ELSEIF(ID .EQ. 'E4Q') THEN
ICOUNT=5
GO TO 90
ELSEIF(ID .EQ. 'E6T') THEN
ICOUNT=7
GO TO 90
ELSEIF(ID .EQ. 'E8Q') THEN
ICOUNT=9
GO TO 90
ENDIF
ENDDO
90 CONTINUE
@ -1723,6 +1729,14 @@
NTMP(4)=0
NTMP(6)=0
NTMP(8)=0
ELSEIF(ICOUNT .EQ. 7) THEN
READ(DLIN1,*) J, (NTMP(K),K=1,6),NTMP(9)
IF(NTMP(9) .EQ. 0) NTMP(9)=1
NTMP(7)=0
NTMP(8)=0
ELSEIF(ICOUNT .EQ. 9) THEN
READ(DLIN1,*) J, (NTMP(K),K=1,9)
IF(NTMP(9) .EQ. 0) NTMP(9)=1
ENDIF
ELSE
READ(DLIN1,*) J, (NTMP(K),K=1,9)

@ -700,8 +700,8 @@
ENDIF
INQUIRE (FILE = fname, EXIST = exists)
IF (.NOT. exists) THEN
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'ORG file does not exist!!'//CHAR(13)// &
'Do you wish to create file and view image','Looking for ORG file')
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Location file does not exist!!'//CHAR(13)// &
'Do you wish to create file and view image','Looking for location file')
! If answer 'Yes' set ifrmel to 0
!
IF (WInfoDialog(4) .ne. 2) then

@ -1537,14 +1537,24 @@
D2=CORD(NOP(N,1),2)
ELSE
DIR=ATAN2(DIRX,-DIRY)
D1=CORD(NOP(N,2),1)
D2=CORD(NOP(N,2),2)
IF(NOP(N,2) .NE. 0) THEN
D1=CORD(NOP(N,2),1)
D2=CORD(NOP(N,2),2)
ELSE
D1=(CORD(NOP(N,1),1)+CORD(NOP(N,3),1))/2.
D2=(CORD(NOP(N,1),2)+CORD(NOP(N,3),2))/2.
ENDIF
ENDIF
DIR1=DIR+2.35619
DIR2=DIR-2.35619
DIR1=DIR+2.35619
DIR2=DIR-2.35619
IF(IESKP(N) .EQ. 0) THEN
D1=CORD(NOP(N,2),1)
D2=CORD(NOP(N,2),2)
IF(NOP(N,2) .NE. 0) THEN
D1=CORD(NOP(N,2),1)
D2=CORD(NOP(N,2),2)
ELSE
D1=(CORD(NOP(N,1),1)+CORD(NOP(N,3),1))/2.
D2=(CORD(NOP(N,1),2)+CORD(NOP(N,3),2))/2.
ENDIF
DE1=D1+0.4*COS(DIR)
DE2=D2+0.4*SIN(DIR)
DEA1=DE1+0.1*COS(DIR1)

@ -592,7 +592,10 @@
!ipk sep99 add test for line element
if(ncn .eq. 3) go to 500
if(ncn .eq. 3) then
if(nef(i,2) .eq. nop(n,2)) go to 600
go to 500
endif
!
! Loop on sides
!
@ -665,7 +668,26 @@
!ipk sep99 add test for line element
if(ncn .eq. 3) go to 500
if(ncn .eq. 3) then
do i=1,nentry
if(nop(n,2) .eq. nef(i,2)) then
CALL GETELM(NEM)
NEUNDO=NEUNDO+1
IELDEL(NEUNDO)=NEM
nop(nem,1)=nef(I,2)
nop(nem,3)=nef(I,3)
imat(nem)=imat(n)
ncorn(nem)=3
IESKP(NEM)=0
IERC=0
CALL PLTELM(NEM,IERC)
nop(n,2)=0
nop(n,3)=nef(I,2)
go to 500
endif
enddo
go to 500
endif
!
! Loop on sides
!
@ -892,8 +914,10 @@
INTEGER*2 IRGEN
DIMENSION NTRAN(9),IRGEN(8,5,5)
!
DATA IRGEN /1,0,2,0,9,0,8,0,3,0,4,0,9,0,2,0,5,0,6,0,9,0,4,0, &
& 7,0,8,0,9,0,6,0,8*0, &
! DATA IRGEN /1,0,2,0,9,0,8,0,3,0,4,0,9,0,2,0,5,0,6,0,9,0,4,0, &
! & 7,0,8,0,9,0,6,0,8*0, &
DATA IRGEN /1,0,2,0,9,0,8,0,2,0,3,0,4,0,9,0,9,0,4,0,5,0,6,0, &
& 8,0,9,0,6,0,7,0,8*0, &
& 1,0,2,0,7,8,0,0,3,4,5,0,2,0,0,0,5,6,7,0,2,0,0,0,16*0, &
& 1,0,2,0,7,8,0,0,3,0,4,0,2,0,0,0,5,6,7,0,4,0,0,0, &
& 7,0,2,0,4,0,0,0,8*0, &
@ -948,7 +972,7 @@
!
DO 300 N=1,4
IF(ITGEN(1,N,NTYP) .EQ. 0) GO TO 310
CALL GETELM(NEM)
CALL GETELM(NEM)
NEUNDO=NEUNDO+1
IELDEL(NEUNDO)=NEM
DO 250 K=1,7,2

@ -8,7 +8,7 @@
//
// Winteracter resource script.
//
// Modified : 03/Mar/2017 13:04:04
// Modified : 19/Oct/2017 10:30:12
//
///////////////////////////////////////////////////
//
@ -413,6 +413,10 @@
#define IDF_GREEN 1036
#define IDF_BLUE 1038
#define IDD_DIALOG002 169
#define ID_ADDSLOT 40150
#define IDF_CANCEL 1088
#define IDD_ADDSLOT 171
#define ID_ADDBEDLEV 40151
///////////////////////////////////////////////////
//
@ -2208,6 +2212,30 @@ BEGIN
,0
END
IDD_ADDSLOT DIALOG 0, 0, 160, 139
STYLE WS_POPUP | WS_BORDER | WS_DLGFRAME | WS_SYSMENU | DS_3DLOOK | DS_MODALFRAME
FONT 8, "MS Sans Serif"
CAPTION "ADD SLOT TO 1-D"
BEGIN
CONTROL "0",IDF_INTEGER1,"INTEGERSPIN",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT | ES_RIGHT | ES_MULTILINE, 100, 17, 40, 14
CONTROL "Type Number",IDF_STRING1,"EDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT, 20, 18, 74, 14
CONTROL "OK",IDOK,"BUTTON",WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT, 20, 107, 40, 14
CONTROL "Cancel",IDF_CANCEL,"BUTTON",WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | BS_TEXT, 100, 107, 40, 14
CONTROL "Slot Depth",IDF_STRING2,"EDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT, 20, 40, 74, 14
CONTROL "0.0000",IDF_REAL1,"REALEDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT | ES_RIGHT | ES_MULTILINE, 100, 40, 40, 14
CONTROL "Slot Range",IDF_STRING3,"EDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT, 20, 60, 74, 14
CONTROL "0.0000",IDF_REAL2,"REALEDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT | ES_RIGHT | ES_MULTILINE, 100, 60, 40, 14
CONTROL "Slot Porosity",IDF_STRING4,"EDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT, 20, 80, 74, 14
CONTROL "0.0000",IDF_REAL3,"REALEDIT",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP | ES_LEFT | ES_RIGHT | ES_MULTILINE, 100, 80, 40, 14
END
IDD_ADDSLOT RCDATA
BEGIN
"[Ranges] \n"
"[Formats] \n"
,0
END
///////////////////////////////////////////////////
//
// Menus
@ -2385,6 +2413,7 @@ BEGIN
MENUITEM "Fill a Gap Between Elements", ID_FILLAGAP
MENUITEM "Set Type by Level", ID_SETTYPLEV
MENUITEM "Form a complex line of elements", ID_Complex
MENUITEM "Add bed levels from cross-sections", ID_ADDBEDLEV
MENUITEM "Interpolate Map File for Stress File", ID_GETSTRESSFIL
MENUITEM "Smooth Map Contours", ID_SMOOTHMAP
MENUITEM "Smooth Mesh Using Reversal", ID_RVSDIAG
@ -2395,6 +2424,7 @@ BEGIN
MENUITEM "Re-Show Element Loads", ID_RESHOWELTLD
MENUITEM "Save Element Load File", ID_SAVELTLD
MENUITEM "Form Elements from Map File", ID_FILLTR
MENUITEM "Add Slot to 1-D Sections", ID_ADDSLOT
END
MENUITEM "E&xit", ID_EXIT
END

Binary file not shown.

@ -975,6 +975,8 @@
ELSE
N1=NOP(IELEM,1)
N2=NOP(IELEM,3)
!ipk dec17
if(ncorn(ielem) .eq. 2) n2=nop(ielem,2)
IF(IPW1 .EQ. 1) THEN
wd11=width(n1)/txscal
wd2=width(n2)/txscal

@ -0,0 +1,487 @@
SUBROUTINE ADD999(ISWT9,NELC)
! add type 999 elements to all 1-d elements
USE BLK1MOD
USE BLK2MOD
COMMON ISEQ(4000,10),LIST1(2000),LIST2(2000)
INCLUDE 'TXFRM.COM'
IF(.NOT. ALLOCATED(IUSEDM)) THEN
ALLOCATE (IUSEDM(MAXE))
IUSEDM=0
ENDIF
IF(.NOT. ALLOCATED(HSET)) THEN
ISWTH=0
ELSE
ISWTH=1
ENDIF
! loop on elements looking for 1-d
PI2=3.14159/2.
NTEMPLC=0
NCM=MAXECON
NCMi=MAXECON
IUSEDM=0
DO N=1,NE
IF(IMAT(N) .NE. 999) CYCLE
CALL KCON(0)
GO TO 75
ENDDO
GO TO 90
75 CONTINUE
DO N=1,NE
IF(IMAT(N) .EQ. 999) THEN
DO J=1,NCMi
IF(NCORN(ICON(N,J)) .EQ. 3) THEN
M=ICON(N,J)
IF(NOP(M,1) .EQ. NOP(N,1) .AND. NOP(M,3) .EQ. NOP(N,3) .OR.&
NOP(M,1) .EQ. NOP(N,3) .AND. NOP(M,3) .EQ. NOP(N,1)) THEN
IUSEDM(ICON(N,J))=1
GO TO 80
ENDIF
ENDIF
ENDDO
ENDIF
80 CONTINUE
ENDDO
90 n=1
ICL=0
do k=1,10
iseqp=2000
iseqm=2000
do ns=n,ne
if(imat(ns) .eq. 0 .or. (imat(ns) .ge. 900 .and. imat(ns) .lt. 2000)) cycle
if(ncorn(ns) .gt. 3) cycle
if(IUSEDM(ns) .eq. 1) cycle
! renumber elements to put them in order
N=NS
N1=NOP(NS,1)
N3=NOP(NS,3)
iseq(iseqp,k)=ns
IUSEDM(n)=1
go to 100
enddo
go to 200
100 continue
! search for element connected to n1 or n3
do m=1,ne
if(imat(ns) .eq. 0 .or. (imat(ns) .ge. 900 .and. imat(ns) .lt. 2000)) cycle
! if(imat(m) .gt. 0 .and. imat(m) .lt. 900) then
if(ncorn(m) .lt. 4) then
if(IUSEDM(m) .eq. 1) cycle
if(nop(m,1) .eq. n3) then
IUSEDM(m)=1
iseqp=iseqp+1
iseq(iseqp,k)=m
! n1=nop(m,1)
n3=nop(m,3)
n=m
go to 100
elseif(nop(m,1) .eq. n1) then
nop(m,1)=nop(m,3)
nop(m,3)=n1
IUSEDM(m)=1
iseqm=iseqm-1
iseq(iseqm,k)=m
n1=nop(m,1)
! n3=nop(m,3)
n=m
go to 100
elseif(nop(m,3) .eq. n1) then
IUSEDM(m)=1
iseqm=iseqm-1
iseq(iseqm,k)=m
n1=nop(m,1)
! n3=nop(m,3)
n=m
go to 100
elseif(nop(m,3) .eq. n3) then
nop(m,3)=nop(m,1)
nop(m,1)=n3
IUSEDM(m)=1
iseqp=iseqp+1
iseq(iseqp,k)=m
! n1=nop(m,1)
n3=nop(m,3)
n=m
go to 100
endif
endif
! endif
enddo
enddo
200 continue
! do n=990,1005
! write(150,*) n,(iseq(n,m),m=1,5)
! enddo
NETEMP=NE
do k=1,10
nss=0
do ns=1,4000
if(iseq(ns,k) .eq. 0) cycle
n=iseq(ns,k)
N1=NOP(N,1)
N2=NOP(N,2)
N3=NOP(N,3)
if(nss .eq. 0) then
ELDIR=ATAN2(YUSR(N3)-YUSR(N1),XUSR(N3)-XUSR(N1))
CALL GETNOD(J1)
INEW(J1) = 1
INSKP(J1) =0
IF(ISWTH .EQ. 1) THEN
WD(J1)=HSET(N1,3)
ELSE
WD(J1)=-9999.
ENDIF
CALL GETNOD(J2)
INEW(J2) = 1
INSKP(J2) =0
IF(ISWTH .EQ. 1) THEN
WD(J2)=HSET(N1,1)
ELSE
WD(J2)=-9999.
ENDIF
! XUSR(J1)=+WIDTHD(N1)/2.*COS(ELDIR-PI2)+XUSR(N1)
! YUSR(J1)=+WIDTHD(N1)/2.*SIN(ELDIR-PI2)+YUSR(N1)
XUSR(J1)=+WIDTH(N1)/2.*COS(ELDIR-PI2)+XUSR(N1)
YUSR(J1)=+WIDTH(N1)/2.*SIN(ELDIR-PI2)+YUSR(N1)
CORD(J1,1)=(XUSR(J1)+XS)/TXSCAL
CORD(J1,2)=(YUSR(J1)+YS)/TXSCAL
IF(ISWT9 .EQ. 2) THEN
WD(J1)=WD(N1)
ENDIF
nnn=iseq(ns+1,k)
if(nnn .eq. 0) then
ELDIR=ATAN2(YUSR(N3)-YUSR(N1),XUSR(N3)-XUSR(N1))
else
n4=nop(nnn,3)
ELDIR=ATAN2(YUSR(N4)-YUSR(N1),XUSR(N4)-XUSR(N1))
endif
! XUSR(J2)=+WIDTHD(N1)/2.*COS(ELDIR+PI2)+XUSR(N1)
! YUSR(J2)=+WIDTHD(N1)/2.*SIN(ELDIR+PI2)+YUSR(N1)
XUSR(J2)=+WIDTH(N1)/2.*COS(ELDIR+PI2)+XUSR(N1)
YUSR(J2)=+WIDTH(N1)/2.*SIN(ELDIR+PI2)+YUSR(N1)
CORD(J2,1)=(XUSR(J2)+XS)/TXSCAL
CORD(J2,2)=(YUSR(J2)+YS)/TXSCAL
IF(ISWT9 .EQ. 2) THEN
WD(J2)=WD(N1)
ENDIF
nss=1
else
nnn=iseq(ns+1,k)
if(nnn .eq. 0) then
ELDIR=ATAN2(YUSR(N3)-YUSR(N1),XUSR(N3)-XUSR(N1))
else
n4=nop(nnn,3)
ELDIR=ATAN2(YUSR(N4)-YUSR(N1),XUSR(N4)-XUSR(N1))
endif
endif
N0=N1
! get two node numbers and store in ntempc
CALL GETNOD(J3)
INEW(J3) = 1
INSKP(J3) =0
IF(ISWTH .EQ. 1) THEN
WD(J3)=HSET(N3,3)
ELSE
WD(J3)=-9999.
ENDIF
CALL GETNOD(J4)
INEW(J4) = 1
INSKP(J4) =0
IF(ISWTH .EQ. 1) THEN
WD(J4)=HSET(N3,1)
ELSE
WD(J4)=-9999.
ENDIF
IF(J4 .GT. NP) NP=J4
nn= imat(n)
if(nn .gt. 1999) then
! XUSR(J3)=+WIDTHD(N3)/2.*COS(ELDIR-PI2)+XUSR(N3)
! YUSR(J3)=+WIDTHD(N3)/2.*SIN(ELDIR-PI2)+YUSR(N3)
! XUSR(J4)=+WIDTHD(N3)/2.*COS(ELDIR+PI2)+XUSR(N3)
! YUSR(J4)=+WIDTHD(N3)/2.*SIN(ELDIR+PI2)+YUSR(N3)
XUSR(J3)=+WIDTH(N3)/2.*COS(ELDIR-PI2)+XUSR(N3)
YUSR(J3)=+WIDTH(N3)/2.*SIN(ELDIR-PI2)+YUSR(N3)
XUSR(J4)=+WIDTH(N3)/2.*COS(ELDIR+PI2)+XUSR(N3)
YUSR(J4)=+WIDTH(N3)/2.*SIN(ELDIR+PI2)+YUSR(N3)
ELSEIF(KID(nn,1) .NE. 0) THEN
JR2=KID(IMAT(N),2)
JR1=KID(IMAT(N),3)
JR4=KID(IMAT(N),4)
JR3=KID(IMAT(N),5)
XUSR(J1)=XUSR(JR1)
YUSR(J1)=YUSR(JR1)
XUSR(J2)=XUSR(JR2)
YUSR(J2)=YUSR(JR2)
XUSR(J3)=XUSR(JR3)
YUSR(J3)=YUSR(JR3)
XUSR(J4)=XUSR(JR4)
YUSR(J4)=YUSR(JR4)
! nop(n-1,7)=jr3
ELSE
! XUSR(J3)=+WIDTHD(N3)/2.*COS(ELDIR-PI2)+XUSR(N3)
! YUSR(J3)=+WIDTHD(N3)/2.*SIN(ELDIR-PI2)+YUSR(N3)
! XUSR(J4)=+WIDTHD(N3)/2.*COS(ELDIR+PI2)+XUSR(N3)
! YUSR(J4)=+WIDTHD(N3)/2.*SIN(ELDIR+PI2)+YUSR(N3)
XUSR(J3)=+WIDTH(N3)/2.*COS(ELDIR-PI2)+XUSR(N3)
YUSR(J3)=+WIDTH(N3)/2.*SIN(ELDIR-PI2)+YUSR(N3)
XUSR(J4)=+WIDTH(N3)/2.*COS(ELDIR+PI2)+XUSR(N3)
YUSR(J4)=+WIDTH(N3)/2.*SIN(ELDIR+PI2)+YUSR(N3)
ENDIF
CORD(J3,1)=(XUSR(J3)+XS)/TXSCAL
CORD(J3,2)=(YUSR(J3)+YS)/TXSCAL
CORD(J4,1)=(XUSR(J4)+XS)/TXSCAL
CORD(J4,2)=(YUSR(J4)+YS)/TXSCAL
IF(ISWT9 .EQ. 2) THEN
WD(J3)=WD(N3)
WD(J4)=WD(N3)
ENDIF
350 CONTINUE
CALL GETELM(I3)
! RECORD IN LIST FOR FUTURE
ICL=ICL+1
LIST1(ICL)=I3
LIST2(I3)=icl
NCORN(I3) = 8
IESKP(I3) = 0
NOP(I3,1)=J1
NOP(I3,3)=J3
NOP(I3,5)=N3
NOP(I3,6)=N2
NOP(I3,7)=N1
IF(ISWT9 .EQ. 0) THEN
IMAT(I3)=999
ELSE
IMAT(I3)=IMAT(N)
ENDIF
CALL GETELM(I4)
! RECORD IN LIST FOR FUTURE
ICL=ICL+1
LIST1(ICL)=I4
LIST2(I4)=-icl
NCORN(I4) = 8
IESKP(I4) = 0
IF(I4 .GT. NETEMP) NETEMP=I4
IMAT(I4)=999
NOP(I4,1)=J4
NOP(I4,2)= 0
NOP(I4,3)=J2
NOP(I4,5)=N1
NOP(I4,6)=N2
NOP(I4,7)=N3
IF(ISWT9 .EQ. 0) THEN
IMAT(I4)=999
ELSE
IMAT(I4)=IMAT(N)
CALL DELTEL(N)
ENDIF
J2=J4
J1=J3
ENDDO
enddo
NE=NETEMP
ICLM=ICL
NELCT=2
400 CONTINUE
CALL FILM(1)
call KCON(0)
do n=1,ne
if(imat(n) .eq. 2000) then
nm=nop(n,4)
if(necon(nm,1) .eq. n) then
nat=necon(nm,2)
else
nat=necon(nm,1)
endif
if(list2(n) .gt. 0) then
nm=nop(n,4)
if(necon(nm,1) .eq. n) then
nat=necon(nm,2)
else
nat=necon(nm,1)
endif
n1=nop(nat,7)
n2=nop(nat,1)
j1=nop(n,5)
j2=nop(n,7)
j3=nop(n,1)
j4=nop(n,3)
else
nm=nop(n,8)
if(necon(nm,1) .eq. n) then
nat=necon(nm,2)
else
nat=necon(nm,1)
endif
n1=nop(nat,3)
n2=nop(nat,5)
j1=nop(n,1)
j2=nop(n,3)
j3=nop(n,5)
j4=nop(n,7)
endif
xusr(j1)=xusr(n1)
yusr(j1)=yusr(n1)
cord(j1,1)=cord(n1,1)
cord(j1,2)=cord(n1,2)
xusr(j2)=xusr(n1)
yusr(j2)=yusr(n1)
cord(j2,1)=cord(n1,1)
cord(j2,2)=cord(n1,2)
xusr(j3)=xusr(n2)
yusr(j3)=yusr(n2)
cord(j3,1)=cord(n2,1)
cord(j3,2)=cord(n2,2)
xusr(j4)=xusr(n2)
yusr(j4)=yusr(n2)
cord(j4,1)=cord(n2,1)
cord(j4,2)=cord(n2,2)
elseif(imat(n) .eq. 2001) then
if(list2(n) .gt. 0) then
nm=nop(n,8)
if(necon(nm,1) .eq. n) then
nat=necon(nm,2)
else
nat=necon(nm,1)
endif
n1=nop(nat,5)
n2=nop(nat,3)
j1=nop(n,5)
j2=nop(n,7)
j3=nop(n,1)
j4=nop(n,3)
else
nm=nop(n,4)
if(necon(nm,1) .eq. n) then
nat=necon(nm,2)
else
nat=necon(nm,1)
endif
n1=nop(nat,1)
n2=nop(nat,7)
j1=nop(n,1)
j2=nop(n,3)
j3=nop(n,5)
j4=nop(n,7)
endif
xusr(j1)=xusr(n1)
yusr(j1)=yusr(n1)
cord(j1,1)=cord(n1,1)
cord(j1,2)=cord(n1,2)
xusr(j2)=xusr(n1)
yusr(j2)=yusr(n1)
cord(j2,1)=cord(n1,1)
cord(j2,2)=cord(n1,2)
xusr(j3)=xusr(n2)
yusr(j3)=yusr(n2)
cord(j3,1)=cord(n2,1)
cord(j3,2)=cord(n2,2)
xusr(j4)=xusr(n2)
yusr(j4)=yusr(n2)
cord(j4,1)=cord(n2,1)
cord(j4,2)=cord(n2,2)
endif
enddo
450 CALL DELETM(0)
IF(NELC .LE. NELCT) THEN
do n=1,ne
if(imat(n) .gt. 1000) then
CALL DELTEL(n)
endif
enddo
RETURN
ENDIF
DO I=1,ICLM,2
NEL=LIST1(I)
IF(IMAT(NEL) .EQ. 0) CYCLE
IF(I .GT. 1) THEN
J3=J4
ELSE
CALL GETNOD(J3)
XUSR(J3)=(XUSR(NOP(NEL,7))+XUSR(NOP(NEL,1)))/2.
YUSR(J3)=(YUSR(NOP(NEL,7))+YUSR(NOP(NEL,1)))/2.
CORD(J3,1)=(XUSR(J3)+XS)/TXSCAL
CORD(J3,2)=(YUSR(J3)+YS)/TXSCAL
WD(J3)=(WD(NOP(NEL,1))+WD(NOP(NEL,7)))/2.
INEW(J3) = 1
INSKP(J3) =0
IF(J3 .GT. NP) NP=J3
ENDIF
CALL GETNOD(J4)
XUSR(J4)=(XUSR(NOP(NEL,3))+XUSR(NOP(NEL,5)))/2.
YUSR(J4)=(YUSR(NOP(NEL,3))+YUSR(NOP(NEL,5)))/2.
CORD(J4,1)=(XUSR(J4)+XS)/TXSCAL
CORD(J4,2)=(YUSR(J4)+YS)/TXSCAL
WD(J4)=(WD(NOP(NEL,3))+WD(NOP(NEL,5)))/2.
INEW(J4) = 1
INSKP(J4) =0
IF(J4 .GT. NP) NP=J4
CALL GETELM(I3)
! RECORD IN LIST FOR FUTURE
ICL=ICL+1
LIST1(ICL)=I3
NCORN(I3) = 8
IESKP(I3) = 0
IF(I3 .GT. NETEMP) NETEMP=I3
NOP(I3,5)=J4
NOP(I3,7)=J3
NOP(I3,1)=NOP(NEL,1)
NOP(I3,3)=NOP(NEL,3)
NOP(NEL,1)=J3
NOP(NEL,3)=J4
IMAT(I3)=IMAT(NEL)
NEL=LIST1(I+1)
IF(IMAT(NEL) .EQ. 0) CYCLE
IF(I .GT. 1) THEN
J3A=J4A
ELSE
CALL GETNOD(J3A)
XUSR(J3A)=(XUSR(NOP(NEL,3))+XUSR(NOP(NEL,5)))/2.
YUSR(J3A)=(YUSR(NOP(NEL,3))+YUSR(NOP(NEL,5)))/2.
CORD(J3A,1)=(XUSR(J3A)+XS)/TXSCAL
CORD(J3A,2)=(YUSR(J3A)+YS)/TXSCAL
WD(J3A)=(WD(NOP(NEL,3))+WD(NOP(NEL,5)))/2.
INEW(J3A) = 1
INSKP(J3A) =0
IF(J3A .GT. NP) NP=J3A
ENDIF
CALL GETNOD(J4A)
XUSR(J4A)=(XUSR(NOP(NEL,1))+XUSR(NOP(NEL,7)))/2.
YUSR(J4A)=(YUSR(NOP(NEL,1))+YUSR(NOP(NEL,7)))/2.
CORD(J4A,1)=(XUSR(J4A)+XS)/TXSCAL
CORD(J4A,2)=(YUSR(J4A)+YS)/TXSCAL
WD(J4A)=(WD(NOP(NEL,1))+WD(NOP(NEL,7)))/2.
INEW(J4A) = 1
INSKP(J4A) =0
IF(J4A .GT. NP) NP=J4A
CALL GETELM(I3)
! RECORD IN LIST FOR FUTURE
ICL=ICL+1
LIST1(ICL)=I3
NCORN(I3) = 8
IESKP(I3) = 0
IF(I3 .GT. NETEMP) NETEMP=I3
NOP(I3,1)=J4A
NOP(I3,3)=J3A
NOP(I3,5)=NOP(NEL,5)
NOP(I3,7)=NOP(NEL,7)
NOP(NEL,5)=J3A
NOP(NEL,7)=J4A
IMAT(I3)=IMAT(NEL)
ENDDO
NELCT=NELCT*2
GO TO 450
! RETURN
END

@ -0,0 +1,343 @@
! Last change: IPK 12 Jan 98 11:21 am
!
!****************************************************************
!
SUBROUTINE ADDLAY
!
! Add nodal layer data and write to file
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!
CHARACTER*1 IFLAG,ANSW(10)
REAL RLAY(9)
DATA ANSW/' ',' ',' ',' ',' ',' ','n','z','r','q'/
!
4 CONTINUE
call openlay
NHTP=0
NBRR=0
NMESS=45
CALL HEDR
NMESS=4
xprt=3.2
!
IPOS=ILAYTP
call GETLAYDAT(NLAY,ipos,RLAY)
ILAYTP=IPOS
! call getint(nlay)
! READ(*,*) NLAY
!
! Write out current layers
!
7 CONTINUE
NHTP=0
NMESS=0
NBRR=4
CALL HEDR
CALL RCYAN
DO 10 K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .GT. 5) THEN
DO 9 N=1,NCORN(K),2
J=NOP(K,N)
FPN = LAY(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.0) THEN
CALL NUMBR(X,Y,0.2,FPN,0.0,-1)
ENDIF
9 CONTINUE
ENDIF
ENDIF
10 END DO
CALL RBLUE
!
! Input new layers
!
5 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) THEN
REWIND 102
DO J=1,NP
IF(LAY(J) .GT. -9998) THEN
if(ILAYTP .eq. 1) then
write(102,6000) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
6000 format('LD2 ',2i8,9F8.2)
else
write(102,6001) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
6001 format('LD3 ',2i8,9F8.2)
endif
ENDIF
ENDDO
RETURN
ENDIF
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 4
ELSEIF(IFLAG .EQ. 'q') THEN
NLAYD=1
REWIND 102
DO J=1,NP
IF(LAY(J) .GT. -9998) THEN
if(ILAYTP .eq. 1) then
write(102,6000) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
else
write(102,6001) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
endif
ENDIF
ENDDO
CALL WRTOUT(0)
RETURN
ENDIF
!
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.2,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
LAY(INODE) = NLAY
DO J=1,7
WTLAY(INODE,J)=RLAY(J)
ENDDO
FPN = NLAY
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.2,FPN,0.0,-1)
CALL RBLUE
!
ELSEIF(IFLAG .EQ. 'a') THEN
DO 100 K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .GT. 5) THEN
DO 90 N=1,NCORN(K),2
J=NOP(K,N)
DO I=1,7
WTLAY(J,I)=RLAY(I)
ENDDO
LAY(J)=NLAY
FPN=NLAY
X = CORD(J,1)
Y = CORD(J,2) + .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.0) THEN
CALL RRED
CALL NUMBR(X,Y,0.2,FPN,0.0,-1)
CALL RBLUE
ENDIF
90 CONTINUE
ENDIF
ENDIF
100 CONTINUE
NLAYD=1
CALL WRTOUT(0)
ELSEIF(IFLAG .EQ. 'f') THEN
DO 120 K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .GT. 5) THEN
DO 110 N=1,NCORN(K),2
J=NOP(K,N)
IF(LAY(J) .EQ. -9999.) THEN
LAY(J)=NLAY
DO I=1,7
WTLAY(J,I)=RLAY(I)
ENDDO
FPN=NLAY
X = CORD(J,1)
Y = CORD(J,2) + .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.0) THEN
CALL RRED
CALL NUMBR(X,Y,0.2,FPN,0.0,-1)
CALL RBLUE
ENDIF
ENDIF
110 CONTINUE
ENDIF
ENDIF
120 CONTINUE
NLAYD=1
CALL WRTOUT(0)
!
ELSE
!ipk jan98 WRITE(*,*) CHAR(7),CHAR(7)
ENDIF
!
GOTO 5
!
END
subroutine openlay
use winteracter
implicit none
include 'd.inc'
CHARACTER(LEN=255) :: FNAME
CHARACTER(LEN=3) :: SUB
LOGICAL :: OPENED
INTEGER :: IERR
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INQUIRE(102, OPENED=OPENED)
if(.not. opened) then
CALL WSelectFile(ID_STRING9,SaveDialog+PromptOn,FNAME,'Save layer file')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
SUB='lay'
CALL ADDSUB(FNAME,SUB)
open(102,file=fname, form='formatted', status='unknown')
ENDIF
endif
RETURN
END
SUBROUTINE RDLAYER
!
! Read nodal layer data
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*8 ID
CHARACTER*72 DLIN
DIMENSION WTTEMP(7)
!
100 CONTINUE
READ(103,7000,END=400) ID,DLIN
7000 FORMAT(A8,A72)
IF(ID(1:2) .EQ. 'LD') THEN
READ(DLIN,5000) NODNUM,NLAYD,(WTTEMP(I),I=1,7)
5000 FORMAT(2I8,7F8.0)
IF(NODNUM .EQ. 0) THEN
DO N=0,NP
LAY(N)=NLAYD
IF(NLAYD .GT. 0) THEN
DO I=0,NLAYD
WTLAY(N,I)=WTTEMP(I)
ENDDO
ENDIF
ENDDO
ELSEIF(NODNUM .GT. 0) THEN
LAY(NODNUM)=NLAYD
IF(NLAYD .GT. 0) THEN
DO I=1,NLAYD
WTLAY(NODNUM,I)=WTTEMP(I)
ENDDO
ENDIF
ENDIF
ENDIF
IF(ID(3:3) .EQ. '2') THEN
ILAYTP=1
ELSE
ILAYTP=0
ENDIF
GO TO 100
400 CONTINUE
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
NCN=NCORN(K)
IF(NCN .EQ. 5) NCN=3
DO N=1,NCORN(K),2
J=NOP(K,N)
FPN=LAY(N)
X = CORD(J,1)
Y = CORD(J,2) + .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.0) THEN
CALL RRED
CALL NUMBR(X,Y,0.2,FPN,0.0,-1)
CALL RBLUE
ENDIF
ENDDO
ENDIF
ENDDO
RETURN
END
SUBROUTINE WRTLAYER
use winteracter
!
! Read nodal layer data
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*8 ID
CHARACTER*72 DLIN
DIMENSION WTTEMP(7)
LOGICAL :: OPENED
include 'd.inc'
CHARACTER(LEN=255) :: FNAME
CHARACTER(LEN=3) :: SUB
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INQUIRE(102, OPENED=OPENED)
if(.not. opened) then
CALL WSelectFile(ID_STRING9,SaveDialog+PromptOn,FNAME,'Save layer file')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
SUB='lay'
CALL ADDSUB(FNAME,SUB)
open(102,file=fname, form='formatted', status='unknown')
ENDIF
else
rewind 102
endif
DO J=0,NP
IF(LAY(J) .GT. -9998) THEN
if(j .gt. 0) then
if(lay(j) .ne. lay(0)) then
go to 300
else
do i=1,lay(j)
if(wtlay(j,i) .ne. wtlay(0,i)) then
go to 300
endif
enddo
endif
go to 500
300 continue
if(ILAYTP .eq. 1) then
write(102,6000) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
6000 format('LD2 ',2i8,9F8.2)
else
write(102,6001) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
6001 format('LD3 ',2i8,9F8.2)
endif
else
if(ILAYTP .eq. 1) then
write(102,6000) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
else
write(102,6001) J,LAY(J),(WTLAY(J,I),I=1,LAY(J))
endif
endif
ENDIF
500 CONTINUE
ENDDO
RETURN
END

@ -0,0 +1,192 @@
SUBROUTINE ADDQUAD
! Subroutine to add a quadrilateral block
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
INCLUDE 'TXFRM.COM'
CHARACTER*1 IFLAG
DATA N1,N2,N3,N4/1,1,1,1/
! Initiliaze list etc
NHTPSV=NHTP
NMESSSV=NMESS
NBRRSV=NBRR
DO N=1,NP
LIST(N)=0
ENDDO
! Get the points that form the triangle
4 CONTINUE
NHTP=0
NMESS=8
NBRR = 3
CALL HEDR
!
! Get screen coordinates of each end of line
!
7 CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
ALX=XTEMP
ALY=YTEMP
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'q' .OR. (IFLAG .EQ. 'c' .AND. IBOX .EQ. 10))THEN
CALL WRTOUT(0)
RETURN
elseif(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
ENDIF
!
! Exit input
!
! 9 CALL PLOTT(XTEMP,YTEMP,3)
! CALL PLOTT(XTEMP,YTEMP,2)
NBRR=0
CALL HEDR
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
ARX=XTEMP
ARY=YTEMP
if(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
endif
IF(IRMAIN .EQ. 1) RETURN
!
CALL PLOTT(ALX,ALY,3)
CALL PLOTT(XTEMP,YTEMP,2)
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
BRX=XTEMP
BRY=YTEMP
if(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
endif
IF(IRMAIN .EQ. 1) RETURN
!
16 CONTINUE
! CALL PLOTT(XTEMP,YTEMP,3)
CALL PLOTT(XTEMP,YTEMP,2)
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
BLX=XTEMP
BLY=YTEMP
if(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
endif
IF(IRMAIN .EQ. 1) RETURN
!
20 CONTINUE
! CALL PLOTT(XTEMP,YTEMP,3)
CALL PLOTT(XTEMP,YTEMP,2)
CALL PLOTT(ALX,ALY,2)
! Get the number of element information
CALL PANELQUAD(N1,N2,N3,N4)
! Get number For 1 and 3 and 2 and 4
NMID1=(N1+N3)/2
NMID2=(N2+N4)/2
! Form the new nodes
CALL DEFNOD(ALX,ALY)
CALL DEFNOD(ARX,ARY)
CALL DEFNOD(BRX,BRY)
CALL DEFNOD(BLX,BLY)
! Now work on sides
DO N=1,N1-1
RATIO=FLOAT(N)/FLOAT(N1)
X1=ALX+RATIO*(ARX-ALX)
Y1=ALY+RATIO*(ARY-ALY)
CALL DEFNOD(X1,Y1)
ENDDO
DO N=1,N2-1
RATIO=FLOAT(N)/FLOAT(N2)
X1=ARX+RATIO*(BRX-ARX)
Y1=ARY+RATIO*(BRY-ARY)
CALL DEFNOD(X1,Y1)
ENDDO
DO N=1,N3-1
RATIO=FLOAT(N)/FLOAT(N3)
X1=BRX+RATIO*(BLX-BRX)
Y1=BRY+RATIO*(BLY-BRY)
CALL DEFNOD(X1,Y1)
ENDDO
DO N=1,N4-1
RATIO=FLOAT(N)/FLOAT(N4)
X1=BLX+RATIO*(ALX-BLX)
Y1=BLY+RATIO*(ALY-BLY)
CALL DEFNOD(X1,Y1)
ENDDO
CALL FRMNODQ(ALX,ALY,ARX,ARY,BRX,BRY,BLX,BLY,NMID1,NMID2)
! Form triangles for the added nodes
CALL DELN2(NP,1)
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
END
SUBROUTINE PANELQUAD(N1,N2,N3,N4)
use winteracter
implicit none
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,N3,N4,IERR
! real ::
character*3 :: sub
call wdialogload(IDD_QUAD)
ierr=infoerror(1)
CALL WDialogPutInteger(idf_integer1,n1)
CALL WDialogPutInteger(idf_integer2,n2)
CALL WDialogPutInteger(idf_integer3,n3)
CALL WDialogPutInteger(idf_integer4,n4)
CALL WDialogSelect(IDD_QUAD)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(idf_integer1,n1)
CALL WDialogGetInteger(idf_integer2,n2)
CALL WDialogGetInteger(idf_integer3,n3)
CALL WDialogGetInteger(idf_integer4,n4)
ENDIF
RETURN
END

@ -0,0 +1,191 @@
SUBROUTINE ADDTRIANG
! Subroutine to add a triangular block
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
INCLUDE 'TXFRM.COM'
CHARACTER*1 IFLAG
DATA N1,N2,N3/1,1,1/
! Initiliaze list etc
NHTPSV=NHTP
NMESSSV=NMESS
NBRRSV=NBRR
DO N=1,NP
LIST(N)=0
ENDDO
! Get the points that form the triangle
4 CONTINUE
NHTP=0
NMESS=8
NBRR = 3
CALL HEDR
!
! Get screen coordinates of each end of line
!
7 CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
ALX=XTEMP
ALY=YTEMP
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'q' .OR. (IFLAG .EQ. 'c' .AND. IBOX .EQ. 10))THEN
CALL WRTOUT(0)
RETURN
elseif(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
ENDIF
!
! Exit input
!
! 9 CALL PLOTT(ALX,ALY,3)
! CALL PLOTT(ALX,ALY,2)
NBRR=0
CALL HEDR
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
ARX=XTEMP
ARY=YTEMP
if(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
endif
IF(IRMAIN .EQ. 1) RETURN
!
! 12 CALL PLOTT(XTEMP,YTEMP,3)
CALL PLOTT(ALX,ALY,3)
CALL PLOTT(XTEMP,YTEMP,2)
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
BRX=XTEMP
BRY=YTEMP
if(iflag .eq. 'n') then
call getfpna(XTEMP)
call getfpna(YTEMP)
endif
IF(IRMAIN .EQ. 1) RETURN
!
16 CONTINUE
! CALL PLOTT(XTEMP,YTEMP,3)
CALL PLOTT(XTEMP,YTEMP,2)
CALL PLOTT(ALX,ALY,2)
! Get the number of element information
CALL PANELTRG(N1,N2,N3)
! Get middle number
IF(N1 .GT. N2) THEN
IF(N1 .GT. N3) THEN
IF(N2 .GT. N3) THEN
NMID=N2
ELSE
NMID=N1
ENDIF
ELSE
NMID=N1
ENDIF
ELSE
IF(N2 .GT. N3) THEN
IF(N1 .GT. N3) THEN
NMID=N1
ELSE
NMID=N3
ENDIF
ELSE
NMID=N2
ENDIF
ENDIF
! Form the new nodes
CALL DEFNOD(ALX,ALY)
CALL DEFNOD(ARX,ARY)
CALL DEFNOD(BRX,BRY)
! Now work on sides
DO N=1,N1-1
RATIO=FLOAT(N)/FLOAT(N1)
X1=ALX+RATIO*(ARX-ALX)
Y1=ALY+RATIO*(ARY-ALY)
CALL DEFNOD(X1,Y1)
ENDDO
DO N=1,N2-1
RATIO=FLOAT(N)/FLOAT(N2)
X1=ARX+RATIO*(BRX-ARX)
Y1=ARY+RATIO*(BRY-ARY)
CALL DEFNOD(X1,Y1)
ENDDO
DO N=1,N3-1
RATIO=FLOAT(N)/FLOAT(N3)
X1=BRX+RATIO*(ALX-BRX)
Y1=BRY+RATIO*(ALY-BRY)
CALL DEFNOD(X1,Y1)
ENDDO
CALL FRMNODT(ALX,ALY,ARX,ARY,BRX,BRY,NMID)
! For triangles for the added nodes
CALL DELN2(NP,1)
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
END
SUBROUTINE PANELTRG(N1,N2,N3)
use winteracter
implicit none
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,N3,IERR
! real ::
character*3 :: sub
call wdialogload(IDD_TRIANG)
ierr=infoerror(1)
CALL WDialogPutInteger(idf_integer1,n1)
CALL WDialogPutInteger(idf_integer2,n2)
CALL WDialogPutInteger(idf_integer3,n3)
CALL WDialogSelect(IDD_TRIANG)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(idf_integer1,n1)
CALL WDialogGetInteger(idf_integer2,n2)
CALL WDialogGetInteger(idf_integer3,n3)
ENDIF
RETURN
END

@ -0,0 +1,464 @@
!IPK LAST UPDATE JULY 18 1998 MAJOR CHANGES
! Last change: IPK 12 Jan 98 11:22 am
!ipk jan98 delete old call to char(7)
!****************************************************************
!
SUBROUTINE ADDWID
!
! Add nodal width data
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!
CHARACTER*1 IFLAG,ANSW(10),ANSW1(10)
DATA ANSW/' ',' ',' ',' ',' ',' ','n','z','r','q'/
DATA ANSW1/ 'w','1','2','d','e','s','b','z','r','q'/
!
4 CONTINUE
NHTP=13
NMESS=0
NBRR=0
!ipk apr95 add call to flushwn
call flushwn
CALL HEDR
102 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW1(IBOX)
ENDIF
IF(IFLAG .EQ. 'w') THEN
!
! get width
!
104 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = WIDTH(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=5
xprt=3.2
call getfpn(cwid)
!
! Input new widths
!
105 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 104
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
WIDTH(INODE) = CWID
FPN = WIDTH(INODE)
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 105
elseif(iflag .eq. '1') then
!
! get ss1
!
204 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = ss1(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=22
xprt=3.2
call getfpn(ss1tp)
!
! Input new ss1
!
205 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 204
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
SS1(INODE) = SS1TP
FPN = SS1TP
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 205
elseif(iflag .eq. '2') then
!
! get ss2
!
304 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = ss2(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=23
xprt=3.2
call getfpn(ss2tp)
!
! Input new ss2
!
305 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 304
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
SS2(INODE) = SS2TP
FPN = SS2TP
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 305
elseif(iflag .eq. 'd') then
!
! get storage width
!
404 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = wids(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=24
xprt=3.2
call getfpn(wids1tp)
!
! Input new storgae width
!
405 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 404
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
WIDS(INODE) = wids1TP
FPN = wids1TP
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 405
elseif(iflag .eq. 'e') then
!
! get storage elevation
!
504 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = widbs(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=39
xprt=3.2
call getfpn(widbs1tp)
!
! Input new storage elevations
!
505 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 504
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
WIDBS(INODE) = widbs1TP
FPN = widbs1tp
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 505
elseif(iflag .eq. 's') then
!
! get storage slopes
!
604 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = sso(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=40
xprt=3.2
call getfpn(widslp)
!
! Input new storage slopes
!
605 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 604
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
SSO(INODE) = widslp
FPN = widslp
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 605
!ipk mar02
!
! get bed slopes
!
elseif(iflag .eq. 'b') then
704 continue
call plotot(1)
CALL RCYAN
DO K=1,NE
IF(IMAT(K) .GT. 0) THEN
IF(NCORN(K) .LT. 6) THEN
IF(NCORN(K) .GT. 2 .AND. IMAT(K) .LT. 900) THEN
DO N=1,3,2
J=NOP(K,N)
FPN = BS1(J)
X = CORD(J,1)
Y = CORD(J,2) - .11
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
enddo
ENDIF
ENDIF
ENDIF
enddo
CALL RBLUE
nmess=45
nhtp=0
nbrr=4
call flushwn
CALL HEDR
nmess=44
xprt=3.2
call getfpn(bedslp)
!
! Input new bed slopes
!
705 IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
IF(IFLAG .EQ. 'n') THEN
GO TO 704
ELSEIF(IFLAG .EQ. 'q') THEN
CALL WRTOUT(0)
go to 4
ENDIF
XPRT=XPRT+0.5
IF(XPRT .GT. HSIZE) XPRT=0.
FPN= INODE
CALL NUMBR(XPRT,7.20,0.20,FPN,0.0,-1)
IF (IFLAG .EQ. 'c') THEN
BS1(INODE) = bedslp
FPN = bedslp
X = CORD(INODE,1)
Y = CORD(INODE,2) + .11
CALL RRED
CALL NUMBR(X,Y,0.20,FPN,0.0,-1)
CALL RBLUE
endif
go to 705
elseif(iflag .eq. 'q') then
return
endif
go to 4
END

@ -0,0 +1,457 @@
!IPK LAST UPDATE JULY 7 2016 ADD TEST FOR ZERO WIDTH
SUBROUTINE CHKAREA
USE WINTERACTER
USE BLK1MOD
include 'd.inc'
! INCLUDE 'BLK1.COM'
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
dimension itran(0:16)
data itran/0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16/
DATA I1,I2,I3,I4/1,0,0,0/,EMAX/-1./
WRITE(90,*) 'GOING TO CHKOPT'
CALL GETCHOPT(I1,I2,I3,I4,EREF,WIDEL)
WRITE(90,*) I1
IF(I1 .LT. 0) THEN
I1=1
I2=0
RETURN
ENDIF
IF(I1 .EQ. 1) THEN
! and see if all corner nodes exist
!
! Test for areas of each element
!
INEG = 0
!IPK JUL16
IERW=0
DO 250 N=1,NE
IF(IMAT(N) .GT. 0 .AND. NCORN(N) .GT. 5) THEN
J1=NOP(N,1)
J2=NOP(N,3)
J3=NOP(N,5)
if(cord(j1,1) .lt. -1.e9 .or. cord(j2,1) .lt. -1.e9 .or. cord(j3,1) .lt. -1.e9) then
WRITE(90,*) ' NODE UNDEFINED FOR ELEMENT NUMBER',N
CALL DELTEL(N)
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Element removed','ELEMENT REMOVED')
GO TO 250
ENDIF
AREA=(CORD(J2,1)-CORD(J1,1))*(CORD(J3,2)-CORD(J1,2))- &
& (CORD(J3,1)-CORD(J1,1))*(CORD(J2,2)-CORD(J1,2))
IF(AREA .LT. 0.) THEN
WRITE(90,*) ' NEGATIVE AREA FOR ELEMENT NUMBER',N
INEG = 1
GO TO 250
ENDIF
IF(NCORN(N) .EQ. 8) THEN
J1=NOP(N,3)
J2=NOP(N,5)
J3=NOP(N,7)
if(cord(j1,1) .lt. -1.e9 .or. cord(j2,1) .lt. -1.e9 .or. cord(j3,1) .lt. -1.e9) then
WRITE(90,*) ' NODE UNDEFINED FOR ELEMENT NUMBER',N
CALL DELTEL(N)
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Element removed','ELEMENT REMOVED')
GO TO 250
ENDIF
AREA=(CORD(J2,1)-CORD(J1,1))*(CORD(J3,2)-CORD(J1,2))- &
& (CORD(J3,1)-CORD(J1,1))*(CORD(J2,2)-CORD(J1,2))
IF(AREA .LT. 0.) THEN
WRITE(90,*) ' NEGATIVE AREA FOR ELEMENT NUMBER',N
INEG = 1
ENDIF
ENDIF
!IPK JUL16 ADD TEST FOR MISSING WIDTH
ELSEIF(IMAT(N) .GT. 0) THEN
IF(WIDTH(NOP(N,1)) .EQ. 0. .OR. WIDTH(NOP(N,3)) .EQ. 0) THEN
IF(IERW .EQ. 0) THEN
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Nodal width missing in 1-D element'//Char(13)//&
'See file MESSGEN.OUT for details' ,'WARNING 1-D WIDTH MISSING')
write(90,6000)
write(90,6001) n,nop(n,1),width(nop(n,1)),nop(n,3),width(nop(n,3))
6000 FORMAT(' NODAL WIDTH MISSING FOR 1-D ELEMENT'/' ELEMENT NODE1 WIDTH1 NODE2 WIDTH2')
6001 FORMAT(I8,2(I10,F10.2))
IERW=1
ELSE
write(90,6001) n,nop(n,1),width(nop(n,1)),nop(n,3),width(nop(n,3))
ENDIF
ENDIF
ENDIF
250 END DO
IF(INEG .EQ. 1) THEN
!cipk aug00
Call WMessageBox(3,2,1,'Negative Areas have been found'//Char(13)//&
'See file MESSGEN.OUT for details'//'Press YES to set positive',&
'ERROR IN NETWORK AREAS!!')
IF(WinfoDialog(ExitButtonCommon) .eq. CommonOK) then
!
! Test for areas of each element
!
INEG=0
DO 300 N=1,NE
IF(IMAT(N) .GT. 0 .AND. NCORN(N) .GT. 5) THEN
J1=NOP(N,1)
J2=NOP(N,3)
J3=NOP(N,5)
AREA=(CORD(J2,1)-CORD(J1,1))*(CORD(J3,2)-CORD(J1,2))- &
& (CORD(J3,1)-CORD(J1,1))*(CORD(J2,2)-CORD(J1,2))
IF(AREA .LT. 0.) THEN
if(NCORN(N) .EQ. 6) THEN
JM12=NOP(N,2)
JM23=NOP(N,4)
JM31=NOP(N,6)
NOP(N,2)=JM31
NOP(N,3)=J3
NOP(N,4)=JM23
NOP(N,5)=J2
NOP(N,6)=JM12
GO TO 300
ELSEIF(NCORN(N) .EQ. 8) THEN
INEG=1
ENDIF
ENDIF
IF(NCORN(N) .EQ. 8) THEN
J1=NOP(N,3)
J2=NOP(N,5)
J3=NOP(N,7)
AREA=(CORD(J2,1)-CORD(J1,1))*(CORD(J3,2)-CORD(J1,2))- &
& (CORD(J3,1)-CORD(J1,1))*(CORD(J2,2)-CORD(J1,2))
IF(AREA .LT. 0.) THEN
IF(INEG .EQ. 1) THEN
J0=NOP(N,1)
JM01=NOP(N,2)
JM12=NOP(N,4)
JM23=NOP(N,6)
JM30=NOP(N,8)
NOP(N,2)=JM30
NOP(N,3)=J3
NOP(N,4)=JM23
NOP(N,5)=J2
NOP(N,6)=JM12
NOP(N,7)=J1
NOP(N,8)=JM01
ELSE
WRITE(90,*) ' CROSS OVER NEGATIVE AREA FOR ELEMENT NUMBER',N
Call WMessageBox(3,2,1,'cross-over element diagonals have been found'//Char(13)//&
'See file MESSGEN.OUT for details'//'Press YES to set delete',&
'ERROR IN NETWORK AREAS!!')
IF(WinfoDialog(ExitButtonCommon) .eq. CommonOK) then
CALL DELTEL(N)
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
300 END DO
ENDIF
ENDIF
ENDIF
! CARRY OUT TEST FOR ELEMENT ELEVATION DIFFERENCES
IF(I2 .EQ. 1) THEN
EMAX=0.
DO N=1,NE
EDIF(N)=0
IF(IMAT(N) .LE. 0) GO TO 400
IF(NCORN(N) .GT. 5) THEN
DO M=1,NCORN(N)-1,2
DO MM=M,NCORN(N)-1,2
EDIF(N)=MAX(ABS(WD(NOP(N,M))-WD(NOP(N,MM))),EDIF(N))
ENDDO
ENDDO
ELSE
IF(I4 .EQ. 0) THEN
EDIF(N)=ABS(WD(NOP(N,3))-WD(NOP(N,1)))
ELSE
if(icrin .eq. 0) then
CALL WMessageBox(0, 4, 1,'Cross-section data not loaded '//CHAR(13)// &
'Click OK start again','ERROR GETTING NO SECTION DATA')
RETURN
endif
N1=NOP(N,1)
N2=NOP(N,3)
BT1= &
CRSDAT(NRIVCR1(N1),1,1)*WTRIVCR1(N1)+ &
CRSDAT(NRIVCR2(N1),1,1)*WTRIVCR2(N1)
BT2= &
CRSDAT(NRIVCR1(N2),1,1)*WTRIVCR1(N2)+ &
CRSDAT(NRIVCR2(N2),1,1)*WTRIVCR2(N2)
H1=WIDEL-BT1
H2=WIDEL-BT2
IF(H1 .LT. 0. .OR. H2 .LT. 0.) THEN
CALL WMessageBox(1, 4, 1,'Depth negative '//CHAR(13)// &
'Click OK to continue with depth=1.'//CHAR(13)//'Click Cancel to start again','ERROR GETTING SECTION DATA')
if(WInfoDialog(4) .eq. 0) then
RETURN
else
IF(H1 .LT. 0.) H1=1.0
IF(H2 .LT. 0.) H2=1.0
endif
ENDIF
CALL INTERPWLV(N1,H1,AR1,WR1,DWR1)
CALL INTERPWLV(N2,H2,AR2,WR2,DWR2)
IF(I4 .EQ. 1) THEN
EDIF(N)=ABS(WR1-WR2)
ELSE
EDIF(N)=ABS(AR1-AR2)
ENDIF
ENDIF
ENDIF
IF(EDIF(N) .GT. EMAX) EMAX=EDIF(N)
400 CONTINUE
ENDDO
NUMV=11
CONTUR(1)=0.
DO K=2,11
CONTUR(K)=EMAX/10.+CONTUR(K-1)
ENDDO
DO N=1,NE
IF(IMAT(N) .GT. 0) THEN
ICOL=EDIF(N)*10./EMAX+.999
icll=itran(icol)
CALL FILLEMC(N,ICLL)
ENDIF
ENDDO
XLEG=8.8
YLEG=7.4
CALL LEGND(XLEG,YLEG,CONTUR,NUMV,NUMCOL)
ENDIF
EDIF(0)=EMAX
CALL WMenuSetState(ID_SECGRP,ItemEnabled,1)
IF(I2 .EQ. 1) RETURN
! CARRY OUT TEST FOR ELEMENT NORMAILZED DEPTH DIFFERENCES
IF(I3 .EQ. 1) THEN
EMAX=0.
DO N=1,NE
EDIF(N)=0
IF(IMAT(N) .LE. 0) GO TO 500
IF(NCORN(N) .GT. 5) THEN
DO M=1,NCORN(N)-1,2
DO MM=M,NCORN(N)-1,2
D1=EREF-WD(NOP(N,M))
D2=EREF-WD(NOP(N,MM))
if(d1 .lt. 0.0) d1=0.0
if(d2 .lt. 0.0) d2=0.0
DMEAN=(D1+D2)/2.
if(DMEAN .LE. 1.) DMEAN=1.0
EDIF(N)=MAX(ABS(D1-D2)/DMEAN,EDIF(N))
ENDDO
ENDDO
ELSE
IF(I4 .EQ. 0) THEN
D1=EREF-WD(NOP(N,1))
D2=EREF-WD(NOP(N,3))
IF(D1 .LT. 0. .OR. D2 .LT. 0.) THEN
CALL WMessageBox(1, 4, 1,'Depth negative '//CHAR(13)// &
'Click OK to continue with depth=1.'//CHAR(13)//'Click Cancel to start again','ERROR GETTING SECTION DATA')
if(WInfoDialog(4) .eq. 0) then
RETURN
else
IF(D1 .LT. 0.) D1=1.0
IF(D2 .LT. 0.) D2=1.0
endif
ENDIF
DMEAN=(D1+D2)/2.
if(DMEAN .LE. 1.) DMEAN=1.0
EDIF(N)=ABS(D1-D2)/DMEAN
ELSE
if(icrin .eq. 0) then
CALL WMessageBox(0, 4, 1,'Cross-section data not loaded '//CHAR(13)// &
'Click OK start again','ERROR GETTING NO SECTION DATA')
RETURN
endif
N1=NOP(N,1)
N2=NOP(N,3)
BT1= &
CRSDAT(NRIVCR1(N1),1,1)*WTRIVCR1(N1)+ &
CRSDAT(NRIVCR2(N1),1,1)*WTRIVCR2(N1)
BT2= &
CRSDAT(NRIVCR1(N2),1,1)*WTRIVCR1(N2)+ &
CRSDAT(NRIVCR2(N2),1,1)*WTRIVCR2(N2)
H1=WIDEL-BT1
H2=WIDEL-BT2
IF(H1 .LT. 0. .OR. H2 .LT. 0.) THEN
CALL WMessageBox(1, 4, 1,'Depth negative '//CHAR(13)// &
'Click OK to continue with depth=1.'//CHAR(13)//'Click Cancel to start again','ERROR GETTING SECTION DATA')
if(WInfoDialog(4) .eq. 0) then
RETURN
else
IF(H1 .LT. 0.) H1=1.0
IF(H2 .LT. 0.) H2=1.0
endif
ENDIF
CALL INTERPWLV(N1,H1,AR1,WR1,DWR1)
CALL INTERPWLV(N2,H2,AR2,WR2,DWR2)
IF(I4 .EQ. 1) THEN
EDIF(N)=ABS(WR1-WR2)*2./(WR1+WR2)
ELSE
EDIF(N)=ABS(AR1-AR2)*2./(AR1+AR2)
ENDIF
ENDIF
ENDIF
IF(EDIF(N) .GT. EMAX) EMAX=EDIF(N)
500 CONTINUE
ENDDO
NUMV=11
CONTUR(1)=0.
DO K=2,11
CONTUR(K)=EMAX/10.+CONTUR(K-1)
ENDDO
DO N=1,NE
IF(IMAT(N) .GT. 0) THEN
ICOL=EDIF(N)*10./EMAX+.999
icll=itran(icol)
CALL FILLEMC(N,ICLL)
ENDIF
ENDDO
XLEG=8.8
YLEG=7.4
CALL LEGND(XLEG,YLEG,CONTUR,NUMV,NUMCOL)
ENDIF
EDIF(0)=EMAX
CALL WMenuSetState(ID_SECGRP,ItemEnabled,1)
FLUSH(90)
IF(I3 .EQ. 1) RETURN
CALL PLOTOT(0)
CALL HEDR
RETURN
END
SUBROUTINE GETCHOPT(I1,I2,I3,I4,EREF,WIDEL)
!
! Generate continuity lines
!
USE WINTERACTER
include 'd.inc'
SAVE
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: I1,I2,I3,I4,I4A,ITIME,IPOS
REAL :: WIDEL
REAL :: EREF
data itime/0/
IF(ITIME .EQ. 0) THEN
EREF=0.
WIDEL=0.
itime=1.
I4=0
ENDIF
call wdialogload(IDD_CHKOPT)
ierr=infoerror(1)
CALL WDialogSelect(IDD_CHKOPT)
ierr=infoerror(1)
I4A=I4
IF(I4 .GT. 0) I4A=1
call wdialogputCheckBox(idf_check1,I1)
call wdialogputCheckBox(idf_check2,I4A)
if(i2 .eq. 1) then
CALL WDialogPutRadioButton(IDF_RADIO1)
elseif(i3 .eq. 1) then
CALL WDialogPutRadioButton(IDF_RADIO2)
endif
CALL WDialogPutReal(IDF_REAL1,EREF)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
call wdialogGetCheckBox(idf_check1,I1)
call wdialogGetCheckBox(idf_check2,I4A)
call wdialogGetRadioButton(idf_radio1,IPOS)
IF(IPOS .EQ. 1) THEN
I2=1
I3=0
ELSEIF(IPOS .EQ. 2) THEN
I2=0
I3=1
ELSE
I2=0
I3=0
ENDIF
CALL WDialoggetReal(IDF_REAL1,EREF)
GO TO 100
ELSEIF(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
I1=-1
I2=0
I3=0
WRITE(90,*) 'CANCEL',I1,I2,I3,I4A
return
ENDIF
enddo
100 CONTINUE
WRITE(90,*) 'IN CHKOPT',I1,I2,I3,I4A
IF(I4A .NE. 0) THEN
call wdialogload(IDD_CHK1DOPT)
ierr=infoerror(1)
CALL WDialogSelect(IDD_CHK1DOPT)
ierr=infoerror(1)
if(i4 .le. 1) then
CALL WDialogPutRadioButton(IDF_RADIO1)
elseif(i4 .eq. 2) then
CALL WDialogPutRadioButton(IDF_RADIO2)
endif
CALL WDialogPutReal(IDF_REAL1,WIDEL)
CALL WDialogShow(-1,-1,0,Modal)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
call wdialogGetRadioButton(idf_radio1,I4)
CALL WDialogGetReal(IDF_REAL1,WIDEL)
WRITE(90,*) 'OUT OF CHKOPT',I1,I2,I3,I4A
return
ELSEIF(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
I4=0
I4A=0
ENDIF
enddo
ENDIF
WRITE(90,*) 'OUT OF CHKOPT',I1,I2,I3,I4A
return
end

@ -0,0 +1,33 @@
SUBROUTINE ASSIGNEQ
USE BLK1MOD
USE BLKELTLD
COMMON XCEN(5000),YCEN(5000)
DIST(I,J)=(XYCEL(I,1)-XCEN(J))**2+(XYCEL(I,2)-YCEN(J))**2
VOID=1.E20
! get centroids of mesh
XCEN=VOID
YCEN=VOID
DO J=1,NE
CALL GETXCL(J,XCJ,YCJ)
XCEN(J)=XCJ
YCEN(J)=YCJ
ENDDO
! test for nearest centroid
DO I=1,NQHYD
NCLINE(I)=0
DISTM=VOID
DO J=1,NE
IF(XCEN(J) .GE. VOID) CYCLE
IF(DIST(I,J) .LT. DISTM) THEN
DISTM=DIST(I,J)
NCLINE(I)=J
ENDIF
ENDDO
WRITE(103,6001) NCLINE(I),ILAYRE(1,NQHYD),HAE(1,I),(HDE(1,I,K),K=1,3)
6001 FORMAT('EFE',5X,2I8,7X,'1',F8.3,3F8.2,7X,'1')
ENDDO
RETURN
END

@ -0,0 +1,9 @@
INTEGER :: NBKFL,ISWBKFL,IACTVFIL,ITOTFIL,I3DVIEW,IRDONE
REAL :: BFMINMAX
CHARACTER(LEN=255) :: BFNAME,BFNAMR,FNAMKEP,DIRECT
CHARACTER(LEN=48) :: FNAMEDISP
COMMON /BFLSI/ NBKFL,ISWBKFL(10),I3DVIEW,IRDONE
COMMON /BFLSR/ BFMINMAX(10,4)
COMMON /BFLSC/ BFNAME(10),BFNAMR(10),FNAMKEP,DIRECT,FNAMEDISP
CHARACTER(LEN=255) :: FNAMEOUT
COMMON /RSTOR/ IACTVFIL,ITOTFIL,FNAMEOUT(10)

@ -0,0 +1,123 @@
MODULE BLK1MOD
INCLUDE 'PARAM.COM'
! BLK1
!-
REAL HSIZE
COMMON /SSIZE/ HSIZE
INTEGER MAXP,MAXE,MAXLIN,MAXSTO,MAXECON,MAXLN,MAELN
INTEGER*2 INSKP,IESKP,INEW,NCORN,IJUN,ISWTAGN,iswtintp
!IPK MAY02 INTEGER*2 NOP,IMAT,IEM,NEF,NEFLAG,LINTYP,LAY
INTEGER*2 IMAT,LINTYP,LAY,IRTYP
INTEGER*4 NOP,IEM,NEF,NEFLAG,ILINEL
! REAL*8 CORD,XUSR,YUSR,XC,YC,CMAP,XMAP,YMAP,pscale,xref,yref
REAL*8 CORD,XUSR,YUSR,XC,YC,pscale,xref,yref
REAL*8 ALXX,ALYY,ALWD,BLXX,BLYY,BLWD,XBRLEN,CNX,CNY,WIDTHD,HLEFT,HMID,HRIGHT,HSET
INTEGER*2 MSN
ALLOCATABLE MSN(:)
ALLOCATABLE CORD(:,:),XUSR(:),YUSR(:),XC(:),YC(:),IRTYP(:)&
,NOP(:,:),IMAT(:),THTA(:),IMATL(:),CORDSN(:,:)&
,WD(:) ,WD1(:),INSKP(:), IESKP(:),NCORN(:)&
,WIDTH(:), SS1(:), SS2(:), WIDS(:)&
,IJUN(:),INEW(:),IEM(:),LINTYP(:),NEFLAG(:),NEF(:,:),LAY(:),WTLAY(:,:)&
,WIDBS(:),SSO(:),NODDEL(:),IELDEL(:)&
,NOPSV(:,:),nefsv(:,:),IMATSV(:),LOCK(:),BS1(:),NKEY1(:),EDIF(:),ANGOP(:)&
,IGRPNUM(:,:),MAXENT(:),IGRPSER(:),IUSEDM(:),IOD(:)&
,ALXX(:),ALYY(:),BLXX(:),BLYY(:),ALWD(:),BLWD(:),ITYPBC(:),CNX(:,:),CNY(:,:),XBRLEN(:)&
,HLEFT(:),HMID(:),HRIGHT(:),HSET(:,:),WIDTHD(:)
ALLOCATABLE NRF(:),AREF(:),LEVREM(:),TRANSEL(:),WLEN(:),WHGT(:)
INTEGER*8 MAXPTS
COMMON /BLK/ MAXPTS,PSCALE,xref,yref&
, IPNN, IPEN, XMIN, YMIN, XMAX, YMAX, NLAYD,ILAYTP&
,VOID, VDX, XSCALE, YSCALE,AMAP,IRESTT&
,NXPMIN, NYPMIN, NXPMAX, NYPMAX, IPP&
,XPMIN, YPMIN, XPMAX, YPMAX, WDSCAL,IESW&
,NPLAST,NELAST,NEFL,NENTRY,IECHG,ICHG&
,IIN, IBAK, LUNIT,IGIN,IS11,IMP,IGFG,ISWAP,ITRIAN&
,klint,jlint,lmpnam,IDELV,nmapf,NSIGF,NPUNDO,NEUNDO,nefsav,nesav&
,xadded,yadded,icolsw,rad,colint,ielvsw,ISWTAGN,iswtintp,eref,igrp,igrpout,MAXIGRP&
,JPTSB,ILINEL
!IPK MAR02 ADD BS1
!IPK FEB02 ADD LOCK
!IPK MAY01 ADD NODDEL AND IELDEL
!IPK JUL98 WIDBS AND SSO ADDED
!IPK JAN98 IDELV ADDED
!ipk feb94 line above added, two lines changed may 94 to add xref,yref
! 9 ,LINTYP(MAXLIN),NEFLAG(150),NEF(600,3),LAY(MAXP)
!
!IPK MAR04 INTEGER*2 ILIST,LLIST
INTEGER*4 ILIST,LLIST
ALLOCATABLE ILIST(:,:),LLIST(:)
COMMON /BLK1/ NLST, ICCLN(140,350),NCLM
!
CHARACTER*80 TITLE
CHARACTER*24 HLABL
!ipk feb94 add
character*40 mpnam
!ipk dec97 line above modified
CHARACTER*1 ALABL(10)
COMMON /BLKA1/ TITLE,HLABL,ALABL,MPNAM
!ipk dec97 line above modified
!
!IPK JAN01 INCREASE IPSW TO 10
COMMON /HEDS/ NP,NE,NHTP,NMESS,NBRR,IPSW(15),IRMAIN,ISCRN,icolon(12),IQSW(2),IRDISP,ntempin,igfgsw,igfgswb,ICRIN,IPW1,WIDEL,WIDSCL,itrianout
!ycw mar97 add
COMMON /CROSS/ ICRS,XPCS(2),YPCS(2),NCSNOD,XCND(50),YCND(50),&
NCSPTS,XELVP(50),YELVP(50),ZELVP(50),SELVP(50),&
ZREF,DFACTOR,ZMIN,IXNOD,LCROSS&
,IVMIL(MCRS),NRIVL(MCRS),NOREACH(MCRS)&
,CRSDAT(MCRS,MPTS,3),NCRSEC,XCRS(MCRS),YCRS(MCRS)
ALLOCATABLE NRIVCR1(:),WTRIVCR1(:),NRIVCR2(:),WTRIVCR2(:)
!NRIVCR1(MAXP),WTRIVCR1(MAXP)&
! ,NRIVCR2(MAXP),WTRIVCR2(MAXP),
LOGICAL LCROSS
COMMON /UNITS/IOT,IOT1
COMMON /INTERPL/ IGRID(MAXGRD,MAXGRD),NX,NY,XGRID,YGRID
real*8 xusrsto,yusrsto
INTEGER*2 IMATSTO
ALLOCATABLE xusrsto(:,:),yusrsto(:,:),wdsto(:,:),&
WIDTHsto(:,:), SS1sto(:,:), SS2sto(:,:), WIDSsto(:,:)&
,WIDBSsto(:,:),SSOsto(:,:),bs1sto(:,:)&
,nopsto(:,:,:),imatsto(:,:),thtasto(:,:)
! loaded/ xusrsto(maxp,maxsto),yusrsto(maxp,maxsto),wdsto(maxp,maxsto),&
! WIDTHsto(MAXP,maxsto), SS1sto(MAXP,maxsto), SS2sto(MAXP,maxsto), WIDSsto(MAXP,maxsto)&
! ,WIDBSsto(MAXP,maxsto),SSOsto(MAXP,maxsto),bs1sto(maxp,maxsto)&
! ,nopsto(maxe,8,maxsto),imatsto(maxe,maxsto),thtasto(maxe,maxsto)
ALLOCATABLE ICCLNSTO(:,:,:)&
,NPSTO(:),NESTO(:),NLSTSTO(:),NCLMSTO(:)
INTEGER*4 ILISTSTO,LLISTSTO
ALLOCATABLE ILISTSTO(:,:,:),LLISTSTO(:,:)
COMMON /TMPLIST/ ilisttmp(100),INREORD
ALLOCATABLE ICN(:)
ALLOCATABLE ICONNCT(:,:),NKEP(:)
ALLOCATABLE IOUTLST(:,:),NOUTLST(:),XOUT(:,:),YOUT(:,:)
COMMON /VIEWS/ HANG,VANG,VRTSCAL,HANGOLD,VANGOLD,VRTORIG,IASPCT
INTEGER KID(900,5)
END MODULE

@ -0,0 +1,85 @@
INCLUDE 'PARAM.COM'
! BLK1
!-
REAL HSIZE
COMMON /SSIZE/ HSIZE
INTEGER*2 INSKP,IESKP,INEW,NCORN,IJUN,ISWTAGN,iswtintp
!IPK MAY02 INTEGER*2 NOP,IMAT,IEM,NEF,NEFLAG,LINTYP,LAY
INTEGER*2 IMAT,LINTYP,LAY
INTEGER*4 NOP,IEM,NEF,NEFLAG
! REAL*8 CORD,XUSR,YUSR,XC,YC,CMAP,XMAP,YMAP,pscale,xref,yref
REAL*8 CORD,XUSR,YUSR,XC,YC,pscale,xref,yref
!
COMMON /BLK/ CORD(MAXP,2),XUSR(MAXP),YUSR(MAXP),XC(MAXP),YC(MAXP)&
,PSCALE,xref,yref&
, IPNN, IPEN, XMIN, YMIN, XMAX, YMAX, NLAYD,ILAYTP&
,VOID, VDX, XSCALE, YSCALE,AMAP,IRESTT&
,NXPMIN, NYPMIN, NXPMAX, NYPMAX, IPP&
,XPMIN, YPMIN, XPMAX, YPMAX, WDSCAL,IESW&
,MAXPTS,NPLAST,NELAST,NEFL,NENTRY,IECHG,ICHG&
,NOP(MAXE,8),IMAT(MAXE),THTA(MAXE),IMATL(MAXE),CORDSN(MAXP,2)&
,WD(MAXP) ,WD1(MAXP) ,INSKP(MAXP), IESKP(MAXE)&
,NCORN(MAXP),IIN, IBAK, LUNIT,IGIN,IS11,IMP,IGFG,ISWAP,ITRIAN&
,WIDTH(MAXP), SS1(MAXP), SS2(MAXP), WIDS(MAXP)&
,IJUN(MAXP),INEW(MAXP),IEM(MAXE)&
,LINTYP(MAXLIN),NEFLAG(MAXP),NEF(MAXP,3),LAY(0:MAXP+1),WTLAY(0:MAXP,9)&
,klint,jlint,lmpnam,IDELV&
,WIDBS(MAXP),SSO(MAXP),nmapf,NSIGF,NODDEL(MAXP),IELDEL(MAXE)&
,NPUNDO,NEUNDO,NOPSV(MAXE,8),nesav,nefsv(maxp,3),nefsav,IMATSV(MAXE)&
,LOCK(MAXP),xadded,yadded,BS1(MAXP),icolsw,rad,colint,ielvsw,ISWTAGN,iswtintp
!IPK MAR02 ADD BS1
!IPK FEB02 ADD LOCK
!IPK MAY01 ADD NODDEL AND IELDEL
!IPK JUL98 WIDBS AND SSO ADDED
!IPK JAN98 IDELV ADDED
!ipk feb94 line above added, two lines changed may 94 to add xref,yref
! 9 ,LINTYP(MAXLIN),NEFLAG(150),NEF(600,3),LAY(MAXP)
!
!IPK MAR04 INTEGER*2 ILIST,LLIST
INTEGER*4 ILIST,LLIST
COMMON /BLK1/ ILIST(MAXLN,MAELN),LLIST(MAXLN),NLST&
, ICCLN(50,350),NCLM
!
CHARACTER*80 TITLE
CHARACTER*24 HLABL
!ipk feb94 add
character*40 mpnam
!ipk dec97 line above modified
CHARACTER*1 ALABL(10)
COMMON /BLKA1/ TITLE,HLABL,ALABL,MPNAM
!ipk dec97 line above modified
!
!IPK JAN01 INCREASE IPSW TO 10
COMMON /HEDS/ NP,NE,NHTP,NMESS,NBRR,IPSW(15),IRMAIN,ISCRN,icolon(12),IQSW(2),IRDISP,ntempin,igfgsw,igfgswb,ICRIN,IPW1,WIDEL,WIDSCL,itrianout
!ycw mar97 add
COMMON /CROSS/ ICRS,XPCS(2),YPCS(2),NCSNOD,XCND(50),YCND(50),&
NCSPTS,XELVP(50),YELVP(50),ZELVP(50),SELVP(50),&
ZREF,DFACTOR,ZMIN,IXNOD,LCROSS&
,IVMIL(MCRS),NRIVL(MCRS),NOREACH(MCRS)&
,CRSDAT(MCRS,MPTS,3),NRIVCR1(MAXP),WTRIVCR1(MAXP)&
,NRIVCR2(MAXP),WTRIVCR2(MAXP),NCRSEC,XCRS(MCRS),YCRS(MCRS)
LOGICAL LCROSS
COMMON /UNITS/IOT,IOT1
COMMON /INTERPL/ IGRID(MAXGRD,MAXGRD),NX,NY,XGRID,YGRID
real*8 xusrsto,yusrsto
INTEGER*2 IMATSTO
common /loaded/ xusrsto(maxp,maxsto),yusrsto(maxp,maxsto),wdsto(maxp,maxsto),&
WIDTHsto(MAXP,maxsto), SS1sto(MAXP,maxsto), SS2sto(MAXP,maxsto), WIDSsto(MAXP,maxsto)&
,WIDBSsto(MAXP,maxsto),SSOsto(MAXP,maxsto),bs1sto(maxp,maxsto)&
,nopsto(maxe,8,maxsto),imatsto(maxe,maxsto),thtasto(maxe,maxsto)&
,ICCLNSTO(50,350,MAXSTO)&
,NPSTO(MAXSTO),NESTO(MAXSTO),NLSTSTO(MAXSTO),NCLMSTO(MAXSTO)
INTEGER*4 ILISTSTO,LLISTSTO
COMMON /LOADED2/ ILISTSTO(MAXLN,MAELN,MAXSTO),LLISTSTO(MAXLN,MAXSTO)
COMMON /TMPLIST/ ilisttmp(100),INREORD

@ -0,0 +1,23 @@
!IPK LAST UPDATED OCT 18 1996
!
! BLK2
!
INTEGER*8 MTSUM,MRSUM,MTSUMSV,MSUM
COMMON /BLKKB4/MTSUM,MRSUM,MTSUMSV(0:100),MSUM
INTEGER ENXT,NCM,NCMI,KNT,NDP,NNEW,MP,NAD,NAE,MLIST,NDELM &
,LIST,NINC,LNEW,NDROP,NELIM,NITST,NFWSAV,MTSUM1,NSEQ,NFWSV
COMMON /BLKB/ NCM,NCMI,KNT,NDP,NNEW,MP,NAD,NAE &
,MLIST(MAXE),ENXT(MAXE),NDELM(MAXP),LIST(MAXP) &
,NINC(MAXP),LNEW(8),NDROP(8),NELIM(MAXE),NITST &
,NFWS,NFWSAV,mtsum1,NSEQ,NFWSV(0:100)
!IPK MAY94 LINE ABOVE ADDED
!
INTEGER ICON
COMMON /BLKB1/ ICON(MAXE,MAXECON)
!
INTEGER NECON
COMMON /BLKB2/ NECON(MAXP,MAXECON)
!
INTEGER ITRAC,NTRAC
COMMON /BLKB3/ ITRAC(350),NTRAC,JTRAC(350),KTRAC(350)
!

@ -0,0 +1,30 @@
MODULE BLK2MOD
!IPK LAST UPDATED OCT 18 1996
!
! BLK2
!
INTEGER*8 MTSUM,MRSUM,MTSUMSV,MSUM,MTSUM1
COMMON /BLKKB4/MTSUM,MRSUM,MTSUMSV(0:100),MSUM
INTEGER ENXT,NCM,NCMI,KNT,NDP,NNEW,MP,NAD,NAE,MLIST,NDELM &
,LIST,NINC,LNEW,NDROP,NELIM,NITST,NFWSAV,NSEQ,NFWSV
COMMON /BLKB/ mtsum1,NCM,NCMI,KNT,NDP,NNEW,MP,NAD,NAE &
,LNEW(8),NDROP(8),NITST &
,NFWS,NFWSAV,NSEQ,NFWSV(0:100)
!IPK MAY94 LINE ABOVE ADDED
ALLOCATABLE MLIST(:),ENXT(:),NDELM(:),LIST(:) &
,NINC(:),NELIM(:)
!
INTEGER ICON
ALLOCATABLE ICON(:,:)
!
INTEGER NECON
ALLOCATABLE NECON(:,:)
!
INTEGER ITRAC,NTRAC,NTRACT
COMMON /BLKB3/ ITRAC(1000),NTRAC,JTRAC(1000),KTRAC(1000)
!
END MODULE

@ -0,0 +1,6 @@
MODULE BLKELTLD
REAL DYE,TAE,HAE,XYCEL
INTEGER NCLINE,NEST,IYDATE,NHYE,IQUENIT,IBINEL,NQHYD,NQP,IRMATYP
ALLOCATABLE DYE(:,:),TAE(:,:),HAE(:,:),NCLINE(:),NEST(:),IYDATE(:),NHYE(:),ILAYRE(:,:),HDE(:,:,:),XYCEL(:,:)
END

@ -0,0 +1,14 @@
PARAMETER (MAXPL=500000,MAXELMP=50000)
REAL*8 XCEN,YCEN,RADS,MAP,XMAP,YMAP,CMAP
COMMON /MAPBLK/ NOPEL(MAXELMP,3),XCEN(MAXELMP),YCEN(MAXELMP)&
,RADS(MAXELMP) ,NKEY(MAXELMP),IEDGE(500,2),IGAP(500),CMAP(MAXPL,2)&
,XMAP(MAXPL),YMAP(MAXPL),VAL(MAXPL),NELFM(500)
COMMON /MAPINFO/ NELTS
common /mapc/imap(maxpl),NCRS(MAXPL)

@ -0,0 +1,856 @@
!ipk lsdt update nov 10 1995
SUBROUTINE BRKDWN(NCN,NELNO)
! SUBROUTINE BRKDWN(X,Y,VL,NCN)
SAVE
DOUBLE PRECISION XN,XLN,YLN,XLP,YLP
PARAMETER (NTB=100)
!
! Routine to subdivide quadrilaterals and triangles for plotting
!
!ipkoct93 COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
COMMON /PLTC/IPSAV,IFLG,XLL,YLL
LOGICAL SWITCH
!
! DIMENSION X(10),Y(10),VL(10)
COMMON /BRK/ X(10),Y(10),VL(10),DL(10),VLM(10)
DIMENSION IQ(3,8),RIX(3,8),RIY(3,8)
DIMENSION IT(3,4),ZIX(3,4),ZIY(3,4)
DIMENSION IST(3,3)
DIMENSION CX(3,NTB),CY(3,NTB),VAL(3,NTB),XLC(3,NTB),YLC(3,NTB)
DIMENSION ISPLT(3),XP(6),YP(6),VP(6),XLP(6),YLP(6)
DATA IQ / 1, 2, 9, 2, 3, 4, 2, 4, 9, 4, 5, 9,&
1, 9, 8, 8, 9, 6, 8, 6, 7, 9, 5, 6/
DATA RIX/ -1.,0.,0., 0.,1.,1., 0.,1.,0., 1.,1.,0.,&
-1.,0.,-1., -1.,0.,0., -1.,0.,-1., 0.,1.,0./
DATA RIY/ -1.,-1.,0., -1.,-1.,0., -1.,0.,0., 0.,1.,0.,&
-1.,0.,0., 0.,0.,1., 0.,1.,1., 0.,1.,1./
DATA IT / 1, 2, 6, 3, 4, 2, 5, 6, 4, 2, 4, 6/
DATA ZIX/0.,.5,0., 1.,.5,.5, 0.,0.,.5, .5,.5,0./
DATA ZIY/0.,0.,.5, 0.,.5,0., 1.,.5,.5, 0.,.5,.5/
DATA IST/ 1,4,5, 4,2,5, 1,5,3/
! DATA XCSQ/1.0/
!
! Distance function squared
!
DISTSQ(AX,AY,BX,BY)=(AX-BX)**2+(AY-BY)**2
! do n=1,ncn
! write(90,*) n,x(n),y(n),vl(n)
! enddo
IF(NCN .LT. 6) THEN
CALL EXPND(NCN,NELNO)
ENDIF
XCSQ=0.25
!
! If NCN = 3 then copy over values
!
IF(NCN .EQ. 3) THEN
ITT=-1
DO 180 L=1,3
CX(L,1)=X(L)
CY(L,1)=Y(L)
VAL(L,1)=VL(L)
180 CONTINUE
XLC(1,1)=0.
XLC(2,1)=1.
XLC(3,1)=0.
YLC(1,1)=0.
YLC(2,1)=0.
YLC(3,1)=0.
NTAB=1
!
! Subdivide quadrilateral to 2 triangles and develop list
!
ELSEIF(NCN .EQ. 4) THEN
ITT=0
DO 190 I=1,3
X(I+4)=X(I)
Y(I+4)=Y(I)
VL(I+4)=VL(I)
190 CONTINUE
!
! Pick long side for diagonal
!
IF (DISTSQ(X(1),Y(1),X(3),Y(3)) .GT. DISTSQ(X(2),Y(2),X(4),Y(4))) THEN
!
! Rotate if its longer
!
DO 200 I=1,5
X(I)=X(I+1)
Y(I)=Y(I+1)
VL(I)=VL(I+1)
200 CONTINUE
ENDIF
!
! Now process it
!
DO 210 L=1,3
CX(L,1)=X(L)
CY(L,1)=Y(L)
VAL(L,1)=VL(L)
210 CONTINUE
XLC(1,1)=-1.
XLC(2,1)=1.
XLC(3,1)=1.
YLC(1,1)=-1.
YLC(2,1)=-1.
YLC(3,1)=1.
DO 220 L=1,3
CX(L,2)=X(L+2)
CY(L,2)=Y(L+2)
VAL(L,2)=VL(L+2)
220 CONTINUE
XLC(1,2)=1.
XLC(2,2)=-1.
XLC(3,2)=-1.
YLC(1,2)=1.
YLC(2,2)=1.
YLC(3,2)=-1.
NTAB=2
!
! Subdivide 6 node triangle to 4 triangles and develop list
!
ELSEIF(NCN .EQ. 6) THEN
ITT=2
! write(90,*) (x(i),i=1,8)
DO 300 K=1,4
DO 280 L=1,3
CX(L,K)=X(IT(L,K))
CY(L,K)=Y(IT(L,K))
VAL(L,K)=VL(IT(L,K))
XLC(L,K)=ZIX(L,K)
YLC(L,K)=ZIY(L,K)
280 CONTINUE
300 CONTINUE
NTAB=4
!
! Subdivide 8 node quadrilateral to 8 triangles and develop list
!
ELSEIF(NCN .GE. 8) THEN
IF(NCN .EQ. 8) THEN
ITT=1
ELSE
ITT=0
X9=X(9)
Y9=Y(9)
VL9=VL(9)
ENDIF
DO 310 I=1,2
X(I+8)=X(I)
Y(I+8)=Y(I)
VL(I+8)=VL(I)
310 CONTINUE
!
! Pick long side for diagonal
!
IF (DISTSQ(X(1),Y(1),X(5),Y(5)) .GT. &
DISTSQ(X(3),Y(3),X(7),Y(7))) THEN
!
! Rotate if its longer
!
DO 320 I=1,8
X(I)=X(I+2)
Y(I)=Y(I+2)
VL(I)=VL(I+2)
320 CONTINUE
ENDIF
!
! Define center point
!
IF(NCN .LT. 9) THEN
X(9)=0.
Y(9)=0.
VL(9)=0.
DO 360 I=1,8
SH=XN(ITT,I,0.d0,0.d0)
X(9)=X(9)+SH*X(I)
Y(9)=Y(9)+SH*Y(I)
VL(9)=VL(9)+SH*VL(I)
360 CONTINUE
ELSE
X(9)=X9
Y(9)=Y9
VL(9)=VL9
ENDIF
DO 400 K=1,8
DO 380 L=1,3
CX(L,K)=X(IQ(L,K))
CY(L,K)=Y(IQ(L,K))
VAL(L,K)=VL(IQ(L,K))
XLC(L,K)=RIX(L,K)
YLC(L,K)=RIY(L,K)
380 CONTINUE
400 CONTINUE
NTAB=8
ENDIF
!
! Start at bottom of list
!
420 CONTINUE
N=NTAB
!
! Check lengths of sides and nore values
!
ISTART=0
ICNT=0
IF(DISTSQ(CX(1,N),CY(1,N),CX(2,N),CY(2,N)) .GT. XCSQ) THEN
ICNT=1
ISPLT(1)=1
ISTART=1
ELSE
ISPLT(1)=0
ENDIF
IF(DISTSQ(CX(2,N),CY(2,N),CX(3,N),CY(3,N)) .GT. XCSQ) THEN
ICNT=ICNT+1
ISPLT(2)=1
ISTART=2
ELSE
ISPLT(2)=0
ENDIF
IF(DISTSQ(CX(3,N),CY(3,N),CX(1,N),CY(1,N)) .GT. XCSQ) THEN
ICNT=ICNT+1
ISPLT(3)=1
ISTART=3
ELSE
ISPLT(3)=0
ENDIF
IF(ICNT .EQ. 0) THEN
!
! Call to plot contours for each triangle
!
IF(IPSAV .EQ. 0) THEN
CALL CBLOK(CX(1,N),CY(1,N),VAL(1,N))
ELSE
CALL CONTRD(CX(1,N),CY(1,N),VAL(1,N))
ENDIF
NTAB=N-1
IF(NTAB .EQ. 0) THEN
RETURN
ELSE
GO TO 420
ENDIF
ELSEIF(ICNT .EQ. 1) THEN
!
! We must split the triangle into 2. Rotate first into temporary array.
!
IF(NTAB .GT. NTB-1) THEN
WRITE(*,*) 'ELEMENT TABLE SIZE EXCEEDED PLOT CURTAILED'
RETURN
ENDIF
DO 440 I=1,3
J=MOD(ISTART+I-2,3)+1
XP(I)=CX(J,N)
YP(I)=CY(J,N)
VP(I)=VAL(J,N)
XLP(I)=XLC(J,N)
YLP(I)=YLC(J,N)
440 CONTINUE
XLN=(XLP(1)+XLP(2))/2.
YLN=(YLP(1)+YLP(2))/2.
XNEW=0.
YNEW=0.
VNEW=0.
DO 460 I=1,NCN
SH=XN(ITT,I,XLN,YLN)
XNEW=XNEW+SH*X(I)
YNEW=YNEW+SH*Y(I)
VNEW=VNEW+SH*VL(I)
460 CONTINUE
CX(1,N)=XP(1)
CX(2,N)=XNEW
CX(3,N)=XP(3)
CY(1,N)=YP(1)
CY(2,N)=YNEW
CY(3,N)=YP(3)
VAL(1,N)=VP(1)
VAL(2,N)=VNEW
VAL(3,N)=VP(3)
XLC(1,N)=XLP(1)
XLC(2,N)=XLN
XLC(3,N)=XLP(3)
YLC(1,N)=YLP(1)
YLC(2,N)=YLN
YLC(3,N)=YLP(3)
CX(1,N+1)=XP(2)
CX(2,N+1)=XP(3)
CX(3,N+1)=XNEW
CY(1,N+1)=YP(2)
CY(2,N+1)=YP(3)
CY(3,N+1)=YNEW
VAL(1,N+1)=VP(2)
VAL(2,N+1)=VP(3)
VAL(3,N+1)=VNEW
XLC(1,N+1)=XLP(2)
XLC(2,N+1)=XLP(3)
XLC(3,N+1)=XLN
YLC(1,N+1)=YLP(2)
YLC(2,N+1)=YLP(3)
YLC(3,N+1)=YLN
NTAB=N+1
ELSEIF(ICNT .EQ. 2) THEN
IF(NTAB .GT. NTB-2) THEN
WRITE(*,*) 'ELEMENT TABLE SIZE EXCEEDED PLOT CURTAILED'
RETURN
ENDIF
!
! We must split the triangle into 3. Rotate first into temporary array.
!
IF(ISTART .EQ. 3) THEN
IF(ISPLT(1) .EQ. 1) ISTART=3
IF(ISPLT(2) .EQ. 1) ISTART=2
ELSE
ISTART=1
ENDIF
DO 540 I=1,3
J=MOD(ISTART+I-2,3)+1
XP(I)=CX(J,N)
YP(I)=CY(J,N)
VP(I)=VAL(J,N)
XLP(I)=XLC(J,N)
YLP(I)=YLC(J,N)
540 CONTINUE
XLP(4)=(XLP(1)+XLP(2))/2.
YLP(4)=(YLP(1)+YLP(2))/2.
XLP(5)=(XLP(2)+XLP(3))/2.
YLP(5)=(YLP(2)+YLP(3))/2.
XP(4)=0.
YP(4)=0.
VP(4)=0.
XP(5)=0.
YP(5)=0.
VP(5)=0.
DO 560 I=1,NCN
SH=XN(ITT,I,XLP(4),YLP(4))
XP(4)=XP(4)+SH*X(I)
YP(4)=YP(4)+SH*Y(I)
VP(4)=VP(4)+SH*VL(I)
SH=XN(ITT,I,XLP(5),YLP(5))
XP(5)=XP(5)+SH*X(I)
YP(5)=YP(5)+SH*Y(I)
VP(5)=VP(5)+SH*VL(I)
560 CONTINUE
N=NTAB-1
DO 600 K=1,3
N=N+1
DO 580 L=1,3
CX(L,N)=XP(IST(L,K))
CY(L,N)=YP(IST(L,K))
VAL(L,N)=VP(IST(L,K))
XLC(L,N)=XLP(IST(L,K))
YLC(L,N)=YLP(IST(L,K))
580 CONTINUE
600 CONTINUE
NTAB=N
ELSEIF(ICNT .EQ. 3) THEN
IF(NTAB .GT. NTB-3) THEN
WRITE(*,*) 'ELEMENT TABLE SIZE EXCEEDED PLOT CURTAILED'
RETURN
ENDIF
!
! We must split the triangle into 4. Fill midsides
!
DO 640 I=1,3
XP(2*I-1)=CX(I,N)
YP(2*I-1)=CY(I,N)
VP(2*I-1)=VAL(I,N)
XLP(2*I-1)=XLC(I,N)
YLP(2*I-1)=YLC(I,N)
640 CONTINUE
XLP(2)=(XLP(1)+XLP(3))/2.
YLP(2)=(YLP(1)+YLP(3))/2.
XLP(4)=(XLP(3)+XLP(5))/2.
YLP(4)=(YLP(3)+YLP(5))/2.
XLP(6)=(XLP(5)+XLP(1))/2.
YLP(6)=(YLP(5)+YLP(1))/2.
XP(2)=0.
YP(2)=0.
VP(2)=0.
XP(4)=0.
YP(4)=0.
VP(4)=0.
XP(6)=0.
YP(6)=0.
VP(6)=0.
DO 660 I=1,NCN
SH=XN(ITT,I,XLP(2),YLP(2))
XP(2)=XP(2)+SH*X(I)
YP(2)=YP(2)+SH*Y(I)
VP(2)=VP(2)+SH*VL(I)
SH=XN(ITT,I,XLP(4),YLP(4))
XP(4)=XP(4)+SH*X(I)
YP(4)=YP(4)+SH*Y(I)
VP(4)=VP(4)+SH*VL(I)
SH=XN(ITT,I,XLP(6),YLP(6))
XP(6)=XP(6)+SH*X(I)
YP(6)=YP(6)+SH*Y(I)
VP(6)=VP(6)+SH*VL(I)
660 CONTINUE
N=NTAB-1
DO 700 K=1,4
N=N+1
DO 680 L=1,3
CX(L,N)=XP(IT(L,K))
CY(L,N)=YP(IT(L,K))
VAL(L,N)=VP(IT(L,K))
XLC(L,N)=XLP(IT(L,K))
YLC(L,N)=YLP(IT(L,K))
680 CONTINUE
700 CONTINUE
NTAB=N
ENDIF
GO TO 420
!
END
SUBROUTINE CONTRD(X,Y,V)
SAVE
!
! Routine to draw contours across triangle
!
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
LOGICAL SWITCH
DIMENSION X(3),Y(3),V(3),XX(2),YY(2)
!
! Get VMIN and VMAX
!
VMIN=MIN(V(1),V(2),V(3))
VMAX=MAX(V(1),V(2),V(3))
!
! Process each contour value
!
DO 500 N=1,NUMV
!
! Test if contour lies in range
!
IF(CONTUR(N) .LT. VMIN) GO TO 500
IF(CONTUR(N) .GT. VMAX) GO TO 500
!
! Its active
!
I=0
!
! Look for an intercept V(1) AND V(2)
!
IF(CONTUR(N) .GE. MIN(V(1),V(2)) &
.AND. CONTUR(N) .LE. MAX(V(1),V(2))) THEN
!
! We have an intercept
!
I=I+1
if(v(2) .ne. v(1)) then
FACT=(CONTUR(N)-V(1))/(V(2)-V(1))
else
fact=0.5
endif
!
! Locate point
!
XX(I)=X(1)+FACT*(X(2)-X(1))
YY(I)=Y(1)+FACT*(Y(2)-Y(1))
ENDIF
!
! Look for an intercept V(2) AND V(3)
!
IF(CONTUR(N) .GE. MIN(V(2),V(3)) &
.AND. CONTUR(N) .LE. MAX(V(2),V(3))) THEN
!
! We have an intercept
!
I=I+1
if(v(3) .ne. v(2)) then
FACT=(CONTUR(N)-V(2))/(V(3)-V(2))
else
fact=0.5
endif
!
! Locate point
!
XX(I)=X(2)+FACT*(X(3)-X(2))
YY(I)=Y(2)+FACT*(Y(3)-Y(2))
IF(I .EQ. 2) GO TO 450
ENDIF
!
! Look for an intercept V(3) AND V(1)
!
IF(CONTUR(N) .GE. MIN(V(3),V(1)) &
.AND. CONTUR(N) .LE. MAX(V(3),V(1))) THEN
!
! We have an intercept
!
I=I+1
if(v(1) .ne. v(3)) then
FACT=(CONTUR(N)-V(3))/(V(1)-V(3))
else
fact=0.5
endif
!
! Locate point
!
XX(I)=X(3)+FACT*(X(1)-X(3))
YY(I)=Y(3)+FACT*(Y(1)-Y(3))
ENDIF
!
! Test for no intercept *ERROR*
!
IF(I .LT. 2) THEN
WRITE(*,*) 'ERROR NO INTERCEPT NOTED, PLOT CURTAILED'
WRITE(90,*) ' NON INTERCEPT VALUES ARE'
WRITE(90,*) v(1),v(2),v(3),contur(n)
RETURN
ENDIF
!
! Now draw line
!
450 CONTINUE
CALL PLOTT(XX(1),YY(1),3)
CALL PLOTT(XX(2),YY(2),2)
!
! Go back for next contour
!
500 CONTINUE
!
! We are done
!
RETURN
END
SUBROUTINE CBLOK(X,Y,V)
!
! Given a triangle (X,Y) with values V Draw polygons of the
! contours in CONTUR that cross the triangle
!
DIMENSION X(3),Y(3),V(3),AX(10),AY(10)
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
LOGICAL SWITCH
!
! Sort out order for values of V
!
200 IF(V(1) .LE. V(2)) THEN
IF(V(3) .LT. V(2)) THEN
VT=V(2)
V(2)=V(3)
V(3)=VT
XT=X(2)
X(2)=X(3)
X(3)=XT
YT=Y(2)
Y(2)=Y(3)
Y(3)=YT
GO TO 200
ENDIF
ELSE
VT=V(1)
V(1)=V(2)
V(2)=VT
XT=X(1)
X(1)=X(2)
X(2)=XT
YT=Y(1)
Y(1)=Y(2)
Y(2)=YT
GO TO 200
ENDIF
!
! INITIALIZE
!
IPAN12=0
IPAN23=0
!
! Loop on contours
!
cjfact=1.001
DO 900 N=1,NUMV
nn=float(n)*cjfact
if(numv .le. 10) nn=nn+2
!
! Check for passing lowest contour
!
IF(CONTUR(N) .GE. V(1)) THEN
!
! Possible active contour
!
IF(CONTUR(N) .LE. V(3)) THEN
!
! Definitely active. Get intercept on 1-3
!
if(v(3) .ne. v(1)) then
FACT=(CONTUR(N)-V(1))/(V(3)-V(1))
else
fact=0.5
endif
!
! Locate point
!
XX1=X(1)+FACT*(X(3)-X(1))
YY1=Y(1)+FACT*(Y(3)-Y(1))
IF(CONTUR(N) .LE. V(2)) THEN
!
! Second intercept is on 1-2
!
IPAN12=IPAN12+1
if(v(2) .ne. v(1)) then
FACT=(CONTUR(N)-V(1))/(V(2)-V(1))
else
fact=0.5
endif
!
! Locate point
!
XX2=X(1)+FACT*(X(2)-X(1))
YY2=Y(1)+FACT*(Y(2)-Y(1))
IF(IPAN12 .EQ. 1) THEN
!
! This is the first contour across 1-2
!
AX(1)=X(1)
AX(2)=XX1
AX(3)=XX2
AY(1)=Y(1)
AY(2)=YY1
AY(3)=YY2
XX1F=XX1
XX2F=XX2
YY1F=YY1
YY2F=YY2
CALL POLYG(AX,AY,3,NN)
ELSE
!
! This is a second contour line
!
AX(1)=XX1
AX(2)=XX2
AX(3)=XX2F
AX(4)=XX1F
AY(1)=YY1
AY(2)=YY2
AY(3)=YY2F
AY(4)=YY1F
XX1F=XX1
XX2F=XX2
YY1F=YY1
YY2F=YY2
CALL POLYG(AX,AY,4,NN)
ENDIF
ELSE
!
! Second intercept is on 2-3
!
IPAN23=IPAN23+1
if(v(3) .ne. v(2)) then
FACT=(CONTUR(N)-V(2))/(V(3)-V(2))
else
fact=0.5
endif
!
! Locate point
!
XX2=X(2)+FACT*(X(3)-X(2))
YY2=Y(2)+FACT*(Y(3)-Y(2))
IF(IPAN23 .EQ. 1) THEN
!
! This is the first contour on 2-3
!
IF(IPAN12 .EQ. 0) THEN
!
! There is no previous contour across this element
!
AX(1)=X(1)
AX(2)=XX1
AX(3)=XX2
AX(4)=X(2)
AY(1)=Y(1)
AY(2)=YY1
AY(3)=YY2
AY(4)=Y(2)
XX1F=XX1
XX2F=XX2
YY1F=YY1
YY2F=YY2
CALL POLYG(AX,AY,4,NN)
ELSE
!
! There is a previous contour across 1-2
!
AX(1)=XX1
AX(2)=XX2
AX(3)=X(2)
AX(4)=XX2F
AX(5)=XX1F
AY(1)=YY1
AY(2)=YY2
AY(3)=Y(2)
AY(4)=YY2F
AY(5)=YY1F
XX1F=XX1
XX2F=XX2
YY1F=YY1
YY2F=YY2
CALL POLYG(AX,AY,5,NN)
ENDIF
ELSE
!
! This is a second contour line on 2-3
!
AX(1)=XX1
AX(2)=XX2
AX(3)=XX2F
AX(4)=XX1F
AY(1)=YY1
AY(2)=YY2
AY(3)=YY2F
AY(4)=YY1F
XX1F=XX1
XX2F=XX2
YY1F=YY1
YY2F=YY2
CALL POLYG(AX,AY,4,NN)
ENDIF
ENDIF
ELSE
!
! Complete drawing of contour checking to see where previous
! contour was
!
IF(IPAN23 .GT. 0) THEN
!
! It was on 2-3
!
AX(1)=X(3)
AX(2)=XX2F
AX(3)=XX1F
AY(1)=Y(3)
AY(2)=YY2F
AY(3)=YY1F
CALL POLYG(AX,AY,3,NN)
ELSEIF(IPAN12 .GT. 0) THEN
!
! It was on 1-2
!
AX(1)=X(3)
AX(2)=X(2)
AX(3)=XX2F
AX(4)=XX1F
AY(1)=Y(3)
AY(2)=Y(2)
AY(3)=YY2F
AY(4)=YY1F
CALL POLYG(AX,AY,4,NN)
ELSE
AX(1)=X(3)
AX(2)=X(2)
AX(3)=X(1)
AY(1)=Y(3)
AY(2)=Y(2)
AY(3)=Y(1)
CALL POLYG(AX,AY,3,NN)
ENDIF
GO TO 905
ENDIF
ENDIF
900 CONTINUE
905 CONTINUE
RETURN
END
SUBROUTINE EXPND(NCN,N)
USE BLK1MOD
INCLUDE 'TXFRM.COM'
! INCLUDE 'PARAM.COM'
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLKBRK.COM'
! INCLUDE 'BFILES.I90'
! WRITE(90,*) 'BEFORE',N,X(1),X(2),X(3),Y(1),Y(2),Y(3)
COMMON /BRK/ X(10),Y(10),VL(10),DL(10),VLM(10)
! expand
DSTRTN1=1.0
N1=NOP(N,1)
N2=NOP(N,2)
N3=NOP(N,3)
x1= cord(n1,1)
x2= cord(n3,1)
y1= cord(n1,2)
y2= cord(n3,2)
eldir=atan2(y2-y1,x2-x1)
ALFAN1=eldir-1.5708
ALFAN2=ALFAN1
ALFAN3=ALFAN1
NCN=8
width(n2)=(width(n1)+width(n3))/2.
TX2=X(2)
TY2=Y(2)
TX3=X(3)
TY3=Y(3)
VL2=VL(2)
VL3=VL(3)
X(6)=X(3)
Y(6)=Y(3)
VL(6)=VL(3)
X(2)=X(1)
Y(2)=Y(1)
VL(2)=VL(1)
VL(3)=VL(1)
X(1)=X(2)-WIDTH(N1)*COS(ALFAN1)/(2.*TXSCAL)*DSTRTN1
X(3)=X(2)+WIDTH(N1)*COS(ALFAN1)/(2.*TXSCAL)*DSTRTN1
Y(1)=Y(2)-WIDTH(N1)*SIN(ALFAN1)/(2.*TXSCAL)*DSTRTN1
Y(3)=Y(2)+WIDTH(N1)*SIN(ALFAN1)/(2.*TXSCAL)*DSTRTN1
VL(4)=VL2
VL(8)=VL2
X(4)=TX2+WIDTH(N2)*COS(ALFAN2)/(2.*TXSCAL)*DSTRTN1
X(8)=TX2-WIDTH(N2)*COS(ALFAN2)/(2.*TXSCAL)*DSTRTN1
Y(4)=TY2+WIDTH(N2)*SIN(ALFAN2)/(2.*TXSCAL)*DSTRTN1
Y(8)=TY2-WIDTH(N2)*SIN(ALFAN2)/(2.*TXSCAL)*DSTRTN1
VL(5)=VL3
VL(7)=VL3
X(5)=TX3+WIDTH(N3)*COS(ALFAN3)/(2.*TXSCAL)*DSTRTN1
X(7)=TX3-WIDTH(N3)*COS(ALFAN3)/(2.*TXSCAL)*DSTRTN1
Y(5)=TY3+WIDTH(N3)*SIN(ALFAN3)/(2.*TXSCAL)*DSTRTN1
Y(7)=TY3-WIDTH(N3)*SIN(ALFAN3)/(2.*TXSCAL)*DSTRTN1
! check areas
aj=x(3)-x(1)
bj=y(3)-y(1)
ak=x(5)-x(1)
bk=y(5)-y(1)
a1=aj*bk-ak*bj
if(a1 .lt. 0.) then
tx1=x(1)
ty1=y(1)
x(1)=x(3)
y(1)=y(3)
x(3)=tx1
y(3)=ty1
endif
aj=x(5)-x(1)
bj=y(5)-y(1)
ak=x(7)-x(1)
bk=y(7)-y(1)
a2=aj*bk-ak*bj
if(a2 .lt. 0) then
tx1=x(5)
ty1=y(5)
x(5)=x(7)
y(5)=y(7)
x(7)=tx1
y(7)=ty1
endif
aj=x(4)-x(1)
bj=y(4)-y(1)
ak=x(8)-x(1)
bk=y(8)-y(1)
a1=aj*bk-ak*bj
if(a1 .lt. 0.) then
tx1=x(4)
ty1=y(4)
x(4)=x(8)
y(4)=y(8)
x(8)=tx1
y(8)=ty1
endif
RETURN
END

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,496 @@
! Last change: IPK 2 Mar 1999 12:58 pm
!IPK NEW ROUTINE OCT 23 1996
SUBROUTINE CCLINE(ISW)
!
! Generate continuity lines
!
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
CHARACTER*1 IFLAG
DIMENSION XLIN(350),YLIN(350),INODE1(350)
! DIMENSION ICN(MAXP)
LOGICAL :: OPENED
DO J=1,MAXP
ICN(J)=0
ENDDO
IF(ISW .EQ. 1) THEN
call opencln(ipos)
if(ipos .eq. 0) return
ELSE
ipos=2
ENDIF
!
! First sort out the potential midsides
! Note that transition elements caues a problem
! Find these first
DO N=1,NE
IF(NCORN(N) .EQ. 5 .AND. IMAT(N) .LT. 901) THEN
!
! We have a transition mark node number as if it were corner
!
ICN(NOP(N,3))=1
ICN(NOP(N,1))=2
ICN(NOP(N,4))=2
ICN(NOP(N,5))=2
ELSE
!
! Store ICN = 2 for corner nodes
!
NCN=NCORN(N)
!IPKOCT93 IF(IMAT(N) .GT. 900) THEN
IF(IMAT(N) .GT. 900 .AND. IMAT(N) .LT. 904) THEN
MST=1
ELSE
MST=2
ENDIF
DO M=1,NCN,MST
ICN(NOP(N,M))=2
ENDDO
ENDIF
ENDDO
!
! Get connections
!
CALL NTONCON(ipos)
100 CONTINUE
NHTP=0
NMESS=26
NBRR=8
NTRACT=0
CALL HEDR
NCLL=0
!
! Get first point
!
110 CONTINUE
K=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE1(1),IFLAG,INSKP,IBOX)
if(inode1(1) .eq. 0) go to 110
IF(IRMAIN .EQ. 1) THEN
NTRACT=0
RETURN
ENDIF
IF(IFLAG .EQ. 'q') THEN
NTRACT=0
GO TO 500
ENDIF
!IPK JAN01
IF(IBOX .EQ. 7 .OR. IFLAG .EQ. 'n' .or. &
IBOX .EQ. 5 .OR. IFLAG .EQ. 'd') THEN
ipos=ncll+1
CALL GETCLN(ipos)
!IPK JAN02
IF(ISW .EQ. 1) THEN
IF(IPOS .EQ. 0) THEN
DO NCLL=1,140
DO KK=1,350
ICCLN(NCLL,KK)=0
ENDDO
ENDDO
NCLM=0
ELSE
ncll=ipos
DO KK=1,350
ICCLN(NCLL,KK)=0
ENDDO
IF(NCLM .EQ. NCLL) NCLM=NCLM-1
ENDIF
GO TO 100
ENDIF
ENDIF
IF(ICN(INODE1(1)) .NE. 2) THEN
NMESS=28
CALL HEDR
GO TO 110
ENDIF
NBRR=5
NMESS=27
CALL HEDR
fpn=inode1(1)
CALL NUMBR(0.5,7.2,0.2,FPN,0.0,-1)
call pltnod(inode1(1),0)
!
! Get second point
!
150 CONTINUE
K=K+1
160 CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE1(K),IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) THEN
NTRACT=0
RETURN
ENDIF
IF(IFLAG .EQ. 'q') THEN
NTRACT=0
GO TO 500
ENDIF
NMESS=26
CALL HEDR
IF(IBOX .EQ. 6 .OR. IFLAG .EQ. 'b' ) THEN
K=K-2
GO TO 150
ELSEIF(IBOX .EQ. 7 .OR. IFLAG .EQ. 'n') THEN
KL=K-2
IF(ISW .EQ. 1) THEN
!IPK Get continuity line number
ipos=ncll+1
CALL GETCLN(ipos)
ncll=ipos
IF(NCLL .EQ. 0) GO TO 500
ENDIF
!
! Trace along line
!
NTRACT=1
IF(KL .GT. 0) THEN
DO LS=1,KL
CALL TRACE(INODE1(LS),INODE1(LS+1))
ENDDO
ELSE
NTRACT=1
ITRAC(1)=INODE1(1)
ENDIF
!
! Output line to file
!
! WRITE(90,6000) (ITRAC(KK),KK=1,NTRAC)
!ipk jan01
INQUIRE(98, OPENED=OPENED)
if(opened) then
IF(IPOS .EQ. 1) THEN
DO KK=1,NTRACT
WRITE(98,6001) ITRAC(KK),XUSR(ITRAC(KK)),YUSR(ITRAC(KK))
6001 FORMAT('NODE',I7,2F15.3)
ENDDO
ELSE
WRITE(98,6000) NCLL,(ITRAC(KK),KK=1,NTRACT)
ENDIF
endif
!IPK JAN01
6000 FORMAT('CC1',I5,9I8/('CC2',5X,9I8))
DO KK=1,NTRACT
XLIN(KK)=CORD(ITRAC(KK),1)
YLIN(KK)=CORD(ITRAC(KK),2)
ENDDO
!ipk jan01
! Save to an array by line number
!
IF(ISW .EQ. 1) THEN
DO KK=1,NTRACT
ICCLN(NCLL,KK)=ITRAC(KK)
ENDDO
IF(NCLL .GT. NCLM) NCLM=NCLL
ENDIF
CALL RRED
!ipk jan01
CALL THICKL
CALL DASHLN(XLIN,YLIN,NTRACT,0)
!ipk jan01
CALL THINL
!
! Go to get another line
!
IF(ISW .EQ. 2) RETURN
GO TO 100
ELSE
IF(ICN(INODE1(K)) .NE. 2) THEN
NMESS=27
CALL HEDR
GO TO 160
ENDIF
KL=K-1
!
! Trace along line
!
call pltnod(inode1(1),0)
NTRACT=1
DO LS=1,KL
CALL TRACE(INODE1(LS),INODE1(LS+1))
call pltnod(inode1(ls+1),0)
ENDDO
if(ntracT .gt. 0) then
DO KK=1,NTRACT
if(itrac(kk) .eq. 0) go to 300
XLIN(KK)=CORD(ITRAC(KK),1)
YLIN(KK)=CORD(ITRAC(KK),2)
ENDDO
CALL RRED
!ipk jan01
CALL THICKL
CALL DASHLN(XLIN,YLIN,NTRACT,0)
!ipk jan01
CALL THINL
endif
300 CONTINUE
fpn=inode1(KL+1)
CALL NUMBR(0.5+KL*0.5,7.2,0.2,FPN,0.0,-1)
!
! Get another point
!
GO TO 150
ENDIF
!
! Exit
!
500 CONTINUE
END
SUBROUTINE NTONCON(ipos)
!
! Generate Connections
!
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
!
! Initialize to zero
!
NCM=MAXECON
DO N=1,NP
DO L=1,NCM
NECON(N,L)=0
ENDDO
ENDDO
!
! Loop on elements
!
DO N=1,NE
!
! Check to see that this element is active
!
IF(IMAT(N) .NE. 0) THEN
NCN=NCORN(N)
!
! Search to see if connection M and K made
!
! DO M=1,NCN,2
DO M=1,NCN,ipos
! IF(M .GT. NCN-1) GO TO 200
! K=M+2
K=M+ipos
IF(K .GT. NCN) K=1
DO L=1,NCM
IF(NECON(NOP(N,M),L) .EQ. 0) THEN
!
! This is new connection
!
NECON(NOP(N,M),L)=NOP(N,K)
GO TO 150
ELSEIF(NECON(NOP(N,M),L) .EQ. NOP(N,K)) THEN
!
! This is an old connection
!
GO TO 150
ENDIF
ENDDO
150 CONTINUE
!
! Now look in the revers direction
!
DO L=1,NCM
IF(NECON(NOP(N,K),L) .EQ. 0) THEN
NECON(NOP(N,K),L)=NOP(N,M)
!
! This is new connection
!
GO TO 175
ELSEIF(NECON(NOP(N,K),L) .EQ. NOP(N,M)) THEN
!
! This is an old connection
!
GO TO 175
ENDIF
ENDDO
175 CONTINUE
ENDDO
ENDIF
200 CONTINUE
ENDDO
!
RETURN
END
SUBROUTINE TRACE(INODE1,INODE2)
!
! Generate continuity lines
!
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
DIST(N,M)=(cord(n,1)-cord(m,1))**2+(cord(n,2)-cord(m,2))**2
!
! Start at INODE1
!
ITRAC(NTRACT)=INODE1
LAT=INODE1
100 CONTINUE
!
! Look for new nearer node to INODE2
!
CURR=1.E30
LAT1=0
DO K=1,NCM
LATTMP=NECON(LAT,K)
IF(LATTMP .NE. 0) THEN
IF(DIST(INODE2,LATTMP) .LT. CURR) THEN
LAT1=LATTMP
CURR=DIST(INODE2,LATTMP)
ENDIF
ELSE
GO TO 150
ENDIF
ENDDO
150 CONTINUE
IF(LAT1 .EQ. 0) RETURN
NTRACT=NTRACT+1
ITRAC(NTRACT)=LAT1
IF(LAT1 .EQ. INODE2) RETURN
IF(NTRACT .GT. 350) RETURN
LAT=LAT1
GO TO 100
END
subroutine opencln(ipos)
use winteracter
implicit none
include 'd.inc'
CHARACTER(LEN=255) :: FNAME
CHARACTER(LEN=3) :: SUB
LOGICAL :: OPENED
INTEGER :: IPOS,IERR
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INQUIRE(98, OPENED=OPENED)
if(.not. opened) then
CALL WSelectFile(ID_STRING8,SaveDialog+PromptOn,FNAME,'Save continuity line')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
SUB='cln'
CALL ADDSUB(FNAME,SUB)
open(98,file=fname, form='formatted', status='unknown')
ENDIF
endif
call wdialogload(IDD_DIALOG08)
ierr=infoerror(1)
call wdialogputRadioButton(idf_radio1)
CALL WDialogSelect(IDD_DIALOG08)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
call wdialoggetradiobutton(idf_radio1,ipos)
ipos=3-ipos
return
endif
ipos= 0
RETURN
enddo
ipos= 2
RETURN
END
!ipk jan01
subroutine getcln(ipos)
use winteracter
implicit none
include 'd.inc'
INTEGER :: IPOS,IERR
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
call wdialogload(IDD_DIALOG010)
ierr=infoerror(1)
CALL WDialogSelect(IDD_DIALOG010)
ierr=infoerror(1)
CALL WDialogPutINTEGER(IDF_INTEGER1,IPOS)
write(90,*) 'iposin',ipos
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,IPOS)
write(90,*) 'iposout',ipos
return
endif
return
enddo
RETURN
END
SUBROUTINE CHKLIN
!
! Generate continuity lines
!
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
IPOS=2
CALL NTONCON(ipos)
DO I=1,NCLM
NTRACT=1
ITRAC(1)=ICCLN(I,1)
DO J=1,350
INODE1=ICCLN(I,J)
INODE2=ICCLN(I,J+1)
IF(INODE2 .EQ. 0) GO TO 300
CALL TRACE(INODE1,INODE2)
ENDDO
300 DO J=1,NTRACT
ICCLN(I,J)=ITRAC(J)
ENDDO
ENDDO
RETURN
END

@ -0,0 +1,120 @@
!IPK LAST UPDATE jAN 25 2001 CORRECT REFERENCE TO INEW
SUBROUTINE COMPACT(ISW)
!
! Compact nodes or element numbers
! ISW = 3 compact nodes
! ISW = 4 compact elements
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
DIMENSION ICREFN(MAXP),ICREFE(MAXE)
!
!
IF(ISW .EQ. 3) THEN
!
! First compact node list and create cross reference
!
JJ=1
DO J=1,NP
!IPK JAN01 FIX TEST
IF(INEW(J) .NE. 0) THEN
INEW(JJ)= INEW(J)
CORD(JJ,1)=CORD(J,1)
CORD(JJ,2)=CORD(J,2)
XUSR(JJ)=XUSR(J)
YUSR(JJ)=YUSR(J)
WD(JJ)=WD(J)
LAY(JJ)=LAY(J)
WIDTH(JJ)=WIDTH(J)
SS1(JJ)=SS1(J)
SS2(JJ)=SS2(J)
WIDS(JJ)=WIDS(J)
WIDBS(JJ)=WIDBS(J)
SSO(JJ)=SSO(J)
INSKP(JJ)=INSKP(J)
LOCK(JJ)=LOCK(J)
ICREFN(J)=JJ
JJ=JJ+1
ENDIF
ENDDO
DO J=JJ,NP
CORD(J,1)=-1.D20
CORD(J,2)=-1.D20
XUSR(J)=-1.D20
YUSR(J)=-1.D20
WD(J)=-9999.
LAY(J)=-9999
WIDTH(J)=0.
SS1(J)=0
SS2(J)=0.
WIDS(J)=0.
WIDBS(J)=0.
SSO(J)=0.
INSKP(J)=1
!IPK JAN01 ADD INEW
INEW(J)=0
LOCK(J)=0
ENDDO
NP=JJ-1
!
! Next renumber element connections
!
DO N=1,NE
DO M=1,8
IF(NOP(N,M) .NE. 0) THEN
NOP(N,M)=ICREFN(NOP(N,M))
ENDIF
ENDDO
ENDDO
! Renumber continuity lines
DO I=1,NCLM
DO J=1,350
IF(ICCLN(I,J) .GT. 0) THEN
ICCLN(I,J)=ICREFN(ICCLN(I,J))
ENDIF
ENDDO
ENDDO
ELSEIF(ISW .EQ. 4) THEN
!
! Compact elements
!
JJ=1
DO J=1,NE
IF(NOP(J,1) .NE. 0) THEN
DO M=1,8
NOP(JJ,M)=NOP(J,M)
ENDDO
ICREFE(J)=JJ
XC(JJ)=XC(J)
YC(JJ)=YC(J)
IMAT(JJ)=IMAT(J)
THTA(JJ)=THTA(J)
IEM(JJ)=0
NCORN(JJ)=NCORN(J)
IESKP(JJ)=IESKP(J)
JJ=JJ+1
ENDIF
ENDDO
DO J=JJ,NE
DO M=1,8
NOP(J,M)=0
ENDDO
IMAT(J)=0
THTA(J)=0
IEM(J)=0
NCORN(J)=0
IESKP(JJ)=-1
ENDDO
NE=JJ-1
DO J=1,NLST
DO I=1,LLIST(J)
ILIST(J,I)=ICREFE(ILIST(J,I))
ENDDO
ENDDO
ENDIF
RETURN
END

@ -0,0 +1,147 @@
SUBROUTINE COMPWGT
USE BLK1MOD
! INCLUDE 'BLK1.COM'
! COMMON/ICN1/ ICN(MAXP)
DIST(X1,X2,Y1,Y2)=SQRT((X1-X2)**2+(Y1-Y2)**2)
DO J=1,MAXP
ICN(J)=0
END DO
! First sort out the potential midsides
! Note that transition elements caues a problem
! Find these first
DO 200 N=1,NE
if(NCORN(N) .GT. 5) GO TO 200
IF(NCORN(N) .EQ. 5 .AND. IMAT(N) .LT. 901) THEN
!
! We have a transition mark node number as if it were corner
!
ICN(NOP(N,3))=-1
ICN(NOP(N,1))=IMAT(N)
ICN(NOP(N,4))=IMAT(N)
ICN(NOP(N,5))=IMAT(N)
ELSE
!
! Store ICN = 2 for corner nodes
!
NCN=NCORN(N)
!IPKOCT93 IF(IMAT(N) .GT. 900) THEN
IF(IMAT(N) .GT. 900 .AND. IMAT(N) .LT. 904) THEN
GO TO 185
ELSE
MST=2
ENDIF
DO 180 M=1,NCN,MST
ICN(NOP(N,M))=IMAT(N)
180 CONTINUE
185 CONTINUE
ENDIF
200 END DO
DO N=1,NP
IF(ICN(N) .GT. 0) THEN
ADIST=1.E20
DO J=1,NCRSEC
IF(ICN(N) .EQ. NOREACH(IVMIL(J))) THEN
A1=DIST(XUSR(N),XCRS(IVMIL(J)),YUSR(N),YCRS(IVMIL(J)))
IF(A1 .LT. ADIST) THEN
ADIST=A1
NSEC1=IVMIL(J)
ENDIF
ENDIF
ENDDO
!IPK JUN04
IF(ADIST .EQ. 1.E20) THEN
NRIVCR1(N)=0
NRIVCR2(N)=0
WTRIVCR1(N)=0
WTRIVCR2(N)=0
ELSE
BDIST=1.E20
DO J=1,NCRSEC
IF(ICN(N) .EQ. NOREACH(IVMIL(J))) THEN
IF(IVMIL(J) .NE. NSEC1) THEN
A1=DIST(XUSR(N),XCRS(IVMIL(J)),YUSR(N),YCRS(IVMIL(J)))
A2=DIST(XCRS(NSEC1),XCRS(IVMIL(J)),YCRS(NSEC1),YCRS(IVMIL(J)))
! A1 IS DISTANCE TO NODE
! A2 IS DISTANCE TO RECORDED POINT
IF(A2 .GE. A1) THEN
IF(A1 .LT. BDIST) THEN
BDIST=A1
NSEC2=IVMIL(J)
ENDIF
ENDIF
ENDIF
ENDIF
ENDDO
IF(BDIST .EQ. 1.E20) NSEC2=NSEC1
NRIVCR1(N)=NSEC1
NRIVCR2(N)=NSEC2
WTRIVCR1(N)=BDIST/(ADIST+BDIST)
WTRIVCR2(N)=ADIST/(ADIST+BDIST)
ENDIF
ENDIF
ENDDO
RETURN
END
SUBROUTINE GETCSLOC
use winteracter
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!-
include 'd.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: IERR,ISET,IBOX
REAL :: ASET
CHARACTER*1 :: IFLAG
call wdialogload(IDD_CSLOC)
ierr=infoerror(1)
CALL WDialogSelect(IDD_CSLOC)
ierr=infoerror(1)
ISET=1
100 continue
CALL WDialogPutINTEGER(IDF_INTEGER1,ISET)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
DO
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,ISET)
GO TO 200
else
RETURN
endif
ENDDO
200 CONTINUE
CALL XYLOC(XX,YY,IFLAG,IBOX)
IF(IRMAIN .EQ. 1) RETURN
XCRS(ISET) = XX*TXSCAL - XS
YCRS(ISET) = YY*TXSCAL - YS
GO TO 100
RETURN
END

@ -0,0 +1,300 @@
SUBROUTINE CONOUT(MENUS)
!
USE WINTERACTER
USE BLK1MOD
SAVE
! INCLUDE 'BLK1.COM'
!
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
!
DIMENSION VALUS(MAXP)
CHARACTER*60 STRELS
DATA STRELS/' You have tried to reorder before executing "FILL"'/
!
!
! Test to make sure fill has been executed.
!
IF(MENUUS .EQ. 13) ifilltmp=0
DO N=1,NE
IF(IMAT(N) .GT. 0) THEN
DO M=2,NCORN(N),2
!ipkoct93
if(imat(n) .LT. 900) THEN
IF(NOP(N,M) .EQ. 0) THEN
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'You have tried to plot contours before filling'//char(13)//&
'Do you wish to temporarily fill and proceed?'//&
CHAR(13)//' ','PLOTTING CONTOURS WITHOUT A FILLED NETWORK?')
!
! If answer 'No', return
!
IF (WInfoDialog(4).EQ.2) THEN
RETURN
ENDIF
CALL FILM(1)
ifilltmp=1
call hedr
GO TO 300
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
!
300 CONTINUE
DO N=1,NP
VALUS(N)=WD(N)
ENDDO
!
CALL TOLMAX(VALUS,TTMIN,TTMAX)
ISZ=0
IF(MENUS .EQ. 13) THEN
ISZ=1
CALL CSET(TTMIN,TTMAX,isz)
RETURN
ENDIF
PSCL=1.0
CALL ELCONT(VALUS,PSCL)
if(ifilltmp .eq. 1) CALL DELETM(0)
RETURN
END
SUBROUTINE ELCONT(VALUS,PSCL)
!
! Routine to draw element contours
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!
INCLUDE 'BFILES.I90'
COMMON /BRK/ X(10),Y(10),VL(10),DL(10),VLM(10)
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
LOGICAL SWITCH
! DIMENSION X(10),Y(10),VL(10),VALUS(*)
DIMENSION VALUS(*)
DATA PSCL1/1.0/ITIME/0/
IF(PSCL .eq. 0.) then
PSCL=PSCL1
ELSE
PSCL1=PSCL
ENDIF
CALL RRed
CALL GETXC
IF(.NOT. ALLOCATED(NKEY1)) THEN
ALLOCATE (NKEY1(MAXE))
ENDIF
CALL SORTDB(YC,NKEY1,NE)
DO 500 NN=NE,1,-1
N=NKEY1(NN)
IF(IESKP(N) .EQ. 1) GO TO 500
NCN=NCORN(N)
IF(NCN .EQ. 9) NCN=8
DO M=1,NCN,2
if(nop(n,m) .eq. 0) go to 500
IF(VALUS(NOP(N,M)) .LT. -9998.) GO TO 500
ENDDO
!
! Copy values into work array
!
NCN=NCORN(N)
! if(ncn .lt. 6) go to 500
IF(IMAT(N) .GT. 900 .AND. IMAT(N) .LT. 904) GO TO 500
IOK=0
DO 300 M=1,NCN
IF(NOP(N,M) .EQ. 0) GO TO 500
X(M)=CORD(NOP(N,M),1)
Y(M)=CORD(NOP(N,M),2)
IF(I3DVIEW .EQ. 1) THEN
IF(VRTSCAL .GT. 0.) THEN
Y(M)=Y(M)+(WD(NOP(N,M))-VRTORIG)*COS(VANG/57.29578)/VRTSCAL
ENDIF
ENDIF
IF(X(M) .GT. 0. .AND. X(M) .LT. HSIZE) THEN
IF(Y(M) .GT. 0. .AND. Y(M) .LT. 7.) THEN
IOK=1
ENDIF
ENDIF
VL(M)=VALUS(NOP(N,M))*PSCL
300 CONTINUE
IF(IOK .EQ. 0) GO TO 500
! CALL BRKDWN(X,Y,VL,NCN)
NELNO=N
CALL BRKDWN(NCN,NELNO)
!ipkoct93
if(ipsw(4) .eq. 1) then
NLINP=NCN+1
X(NLINP)=X(1)
Y(NLINP)=Y(1)
CALL DASHLN(X,Y,NLINP,0)
endif
500 CONTINUE
!
! Print title
!
ncharr=lenstr(title)
call rblue
IF(NCHARR .GT. 1) CALL SYMBL(0.5,7.25,0.20,TITLE,0.0,ncharr)
XLEG=8.8
YLEG=7.4
CALL LEGND(XLEG,YLEG,CONTUR,NUMV,NUMCOL)
CALL RBlue
RETURN
END
SUBROUTINE LEGND(XLEG,YLEG,CONTUR,NUMV,NUMCOL)
SAVE
DIMENSION CONTUR(99),X(10),Y(10)
DATA LDIGO/2/
XLOC=XLEG+0.5
YLOC=YLEG
csfact=1.0001
DO 80 N=1,NUMV
IF(N .LT. NUMV) THEN
!
! Define polygon
!
X(1)=XLEG
X(2)=XLEG
X(3)=XLEG+0.4
X(4)=XLEG+0.4
Y(1)=YLOC
Y(2)=YLOC-0.3
Y(3)=YLOC-0.3
Y(4)=YLOC
nn=(n+1)*csfact
if(numv .le. 10) nn=nn+2
CALL POLYG(X,Y,4,nn)
ENDIF
!
! Plot the value on the screen
!
if(contur(n) .ne. 0.) then
DIG = ALOG10(ABS(CONTUR(N)))
else
dig = -2.
endif
IF(DIG .GT. 2.999) THEN
LDIG=-DIG - 1
ELSEIF (DIG .GT. 1.999) THEN
LDIG = 0
ELSEIF (DIG .GT. 0.999) THEN
LDIG = 1
ELSEIF (DIG .GT. 0) THEN
LDIG = 2
ELSE
LDIG = DIG - 2. + .01
LDIG = -LDIG
ENDIF
IF(LDIG .LT. 0) GO TO 70
DO 60 KK=1,3
ANUM=10.**(-LDIG)
IF(N .EQ. 1) THEN
IF(ABS(CONTUR(2)-CONTUR(1)) .LT. ANUM) THEN
LDIG = LDIG + 1
ELSE
GO TO 70
ENDIF
ELSE
IF(ABS(CONTUR(N)-CONTUR(N-1)) .LT. ANUM) THEN
LDIG = LDIG + 1
ELSE
GO TO 70
ENDIF
ENDIF
60 CONTINUE
70 CONTINUE
call rblue
CTMP=CONTUR(N)
IF(ABS(CTMP) .LT. 1.E-7) THEN
CTMP=0.
LDIG=LDIGO
ENDIF
CALL rblack
CALL NUMBR(XLOC,YLOC-0.09,0.2,CTMP,0.0,LDIG)
LDIGO=LDIG
CALL rblack
!
CALL PLOTT(X(1),Y(1),3)
CALL PLOTT(X(2),Y(2),2)
CALL PLOTT(X(3),Y(3),2)
CALL PLOTT(X(4),Y(4),2)
CALL PLOTT(X(1),Y(1),2)
!
YLOC=YLOC-0.30
80 CONTINUE
CALL RBlue
RETURN
END
SUBROUTINE TOLMAX(VALUS,TTMIN,TTMAX)
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
DIMENSION VALUS(*)
!
TMAX = -1.E+20
TMIN = 1.E+20
DO 218 J=1,NP
IF (VALUS(J) .GT. TMAX) THEN
TMAX = VALUS(J)
ITMAX = J
ENDIF
IF (VALUS(J) .LT. TMIN) THEN
TMIN = VALUS(J)
ITMIN = J
ENDIF
218 CONTINUE
WRITE(90,*) ' '
WRITE(90,*) ' Max, Min for entire network '
WRITE(90,*) ' MAX value = ', TMAX, ' at node ', ITMAX
WRITE(90,*) ' MIN value = ', TMIN, ' at node ', ITMIN
WRITE(90,*) ' '
!
! Check for max and min values of elements in the plotting area
!
TTMAX = -1.E+20
TTMIN = 1.E+20
DO 228 N=1,NE
IF(IESKP(N) .EQ. 0) THEN
DO 220 M=1,NCORN(N)
J=NOP(N,M)
!ipk sep99
if(j .eq. 0) go to 220
IF (VALUS(J) .GT. TTMAX) THEN
TTMAX = VALUS(J)
ITTMAX = J
ENDIF
IF (VALUS(J) .LT. TTMIN) THEN
TTMIN = VALUS(J)
ITTMIN = J
ENDIF
220 CONTINUE
ENDIF
228 CONTINUE
!
WRITE(90,*) ' '
WRITE(90,*) ' Max, Min for plot area '
WRITE(90,*) ' MAX value = ', TTMAX, ' at node ', ITTMAX
WRITE(90,*) ' MIN value = ', TTMIN, ' at node ', ITTMIN
!
RETURN
END

@ -0,0 +1,193 @@
PROGRAM creatgrid
dimension XL(100,2),YL(100,2),mappt(2),XL1(100),XL2(100)
REAL*8 GRIDX(100),GRIDY(100)
!
! define line numbers in map file
!
DIST(A,B,C,D)=SQRT((C-A)*2+(D-C)**2)
XL(1,1)=0.
XL(2,1)=320.
XL(3,1)=530.
YL(1,1)=0.
YL(2,1)=20.
YL(3,1)=50.
MAPPT(1)=3
XL(1,2)=0.
XL(2,2)=600.
YL(1,2)=70.
YL(2,2)=90.
MAPPT(2)=2
K1=1
K2=2
!
! compute line length
!
XL1=0.
nlpts1=mappt(k1)
do n=2,nlpts1
XL1(n)=XL1(n-1)+dist(XL(n-1,1),YL(n-1,1),XL(n,1),YL(n,1))
enddo
XL2=0.
nlpts2=mappt(k2)
do n=2,nlpts2
XL2(n)=XL2(n-1)+dist(XL(n-1,2),YL(n-1,2),XL(n,2),YL(n,2))
enddo
xmean=(XL1(nlpts1)+XL2(nlpts2))/2.
!
! get size spacing
!
! read xsz,NY
XSZ=100.
NY=5
along=xmean/xsz
NX=(along+0.99)
NXP=NX+1
NYP=NY+1
NRL=NX*NYP+1
NRT=NXP*NYP
! DO N=1,NE
! DO M=1,8
! NOPSV(N,M)=NOP(N,M)
! ENDDO
! IMATSV(N)=IMAT(N)
! ENDDO
! NESAV=NE
! NEFSAV=NENTRY
! NPUNDO=NRT
!
! Initialize GRIDX and GRIDY
!
DO N=1,NRT
GRIDX(N)=0.
GRIDY(N)=0.
! IGSKP(N)=0
END DO
!
! calculate lengths
!
xalong1=XL1(nlpts1)/NX
xalong2=XL2(nlpts2)/NX
!
! compute cords along the edges
!
XALONG=0.
XXALONG=0.
GRIDX(1)=XL(1,1)
GRIDY(1)=YL(1,1)
GRIDX(NYP)=XL(1,2)
GRIDY(NYP)=YL(1,2)
NRT=NXP*NYP
DO N=NY+2,NRT,NYP
XALONG=XALONG+XALONG1
NX1=2
DO M=NX1,NLPTS1
IF(XALONG .LT. XL1(M)) THEN
M1=M
GO TO 200
ENDIF
ENDDO
200 CONTINUE
FRAC1=(XALONG-XL1(M1-1))/(XL1(M1)-XL1(M1-1))
GRIDX(N)=XL(m1-1,1)+FRAC1*(XL(m1,1)-XL(m1-1,1))
GRIDY(N)=YL(m1-1,1)+FRAC1*(YL(m1,1)-YL(m1-1,1))
NX1=M1
XXALONG=XXALONG+XALONG2
NX2=2
DO M=NX2,NLPTS2
IF(XXALONG .LT. XL2(M)) THEN
M2=M
GO TO 250
ENDIF
ENDDO
250 CONTINUE
FRAC1=(XXALONG-XL2(M2-1))/(XL2(M2)-XL2(M2-1))
GRIDX(N+NY)=XL(m2-1,2)+FRAC1*(XL(m2,2)-XL(m2-1,2))
GRIDY(N+NY)=YL(m2-1,2)+FRAC1*(YL(m2,2)-YL(m2-1,2))
NX2=M2
ENDDO
!
!
! check if points ok allow for move
!
!
! form elements and other coordinates
!
!
! Interpolate interior points
!
DO M=1,NRT,NYP
NFS=NRL+M-1
CALL INTERP(GRIDX,GRIDY,M,M+NY,1,GRIDX(M),GRIDY(M),GRIDX(M+NY) &
& ,GRIDY(M+NY),NY,0)
! DO N=M,NFS
! XTEMP=GRIDX(N)
! YTEMP=GRIDY(N)
! GRIDXL(N) = GRIDX(N)*TXSCAL - XS
! GRIDYL(N) = GRIDY(N)*TXSCAL - YS
! CALL RRed
! call drawcr(xtemp,ytemp,siz)
! CALL RBlue
! ENDDO
END DO
!
! query for depths
!
!
! query for happY
STOP
end
SUBROUTINE INTERP(GRIDX,GRIDY,NL,NH,INT,ALX,ALY,ATX,ATY,NINT,ISWT)
!
! Routine to fill GRIDX and GRIDY by interpolation
! NL = START OF GENERATED
! NH = END OF GENERATED
! INT = INTERVAL
! ALX, ALY = START LOC
! ATX, ATY = END LOC
! NINT = NUMBER OF POINTS
! ISWT = 0 BASELINE = 1 APPLY CHANGES
!IPK MAY02
REAL*8 GRIDX(NH),GRIDY(NH),ALX,ALY,ATX,ATY
!
! Compute intervals
!
XINT=(ATX-ALX)/FLOAT(NINT)
YINT=(ATY-ALY)/FLOAT(NINT)
!
! Generate points
!
IF(ISWT .EQ. 0) THEN
KP=0
DO 200 K=NL,NH,INT
IF(KP .EQ. 0) THEN
GRIDX(K)=ALX
GRIDY(K)=ALY
ELSE
GRIDX(K)=GRIDX(KP)+XINT
GRIDY(K)=GRIDY(KP)+YINT
ENDIF
KP=K
200 CONTINUE
ELSE
XAD=ALX
YAD=ALY
KP=0
DO 220 K=NL,NH,INT
IF(KP .EQ. 0) THEN
GRIDX(K)=GRIDX(K)+XAD
GRIDY(K)=GRIDY(K)+YAD
ELSE
XAD=XAD+XINT
YAD=YAD+YINT
GRIDX(K)=GRIDX(K)+XAD
GRIDY(K)=GRIDY(K)+YAD
ENDIF
KP=K
220 CONTINUE
ENDIF
RETURN
END

@ -0,0 +1,278 @@
SUBROUTINE CREATM
USE BLKMAP
USE BLK1MOD
USE BLK2MOD
! Routine to create mesh from map contour lines
COMMON /CRMAP/ NCONT,CVALUE(1000),MSTART(1000),MFIN(1000),CINTDIS(1000),IACTCV(1000)
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
! Search map data for contoour lines and setup values
JS=1
NCONT=0
!
K=0
DO 20 J=1,MAXPTS
MLEN=J-JS
IF(XMAP(J) .LE. VDX .or. j .eq. maxpts) THEN
!
! We have found a line end, is itmore than 1 point long?
!
K=K+1
IF(MLEN .GT. 1) THEN
LTP=LINTYP(K)
IF(LTP .NE. 2) THEN
IF(LTP .GT. 0) THEN
NCONT=NCONT+1
CVALUE(NCONT)=VAL(JS)
MSTART(NCONT)=JS
IF(XMAP(J) .LE. VDX) THEN
MFIN(NCONT)=J-1
ELSE
MFIN(NCONT)=J
ENDIF
ENDIF
ENDIF
ENDIF
IF(MLEN .EQ. 0 .AND. LINTYP(K) .EQ. -999) GO TO 30
JS=J+1
ENDIF
20 CONTINUE
30 CONTINUE
! Choose options and intervals
CALL PANELCRT(NCONT,CVALUE,IACTCV,CINTDIS,ICAN)
IF(ICAN .EQ. 1) RETURN
! First form list of nodes working along contour lines
CALL CFORM
! Now generate elements
do n=1,np
list(n)=1
enddo
call deln2(np,0)
call checkpoly
RETURN
END
SUBROUTINE PANELCRT(N1,R2,N3,R4,N5)
! Choose options and intervals
use winteracter
implicit none
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,N3(1000),IERR,ITIME,K,N5,NA,NB
real :: R2(1000),R4(1000)
data itime/0/
if(itime .eq. 0) then
n2=0
na=1
nb=1
itime=1
do k=1,1000
r4(k)=500.
n3(k)=1
enddo
endif
call wdialogload(IDD_CREATM1)
ierr=infoerror(1)
CALL WDialogPutCheckBox(idf_check1,na)
CALL WDialogPutCheckBox(idf_check2,nb)
CALL WDialogPutReal(idf_real1,r4(1))
CALL WDialogSelect(IDD_CREATM1)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetCheckBox(idf_check1,na)
CALL WDialogGetCheckBox(idf_check2,nb)
if(nb .eq. 1) then
CALL WDialogGetReal(idf_real1,r4(1))
do k=1,1000
r4(k)=r4(1)
enddo
endif
N5=0
ELSE
N5=1
RETURN
ENDIF
if(na .eq. 1 .and. nb .eq. 1) return
call wdialogload(IDD_CREATM)
ierr=infoerror(1)
CALL WGridPutCheckBox(idf_grid1,1,n3,n1)
CALL WGridPutReal(idf_grid1,2,r2,n1)
CALL WGridPutReal(idf_grid1,3,r4,n1)
CALL WDialogSelect(IDD_CREATM)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WGridGetCheckBox(idf_grid1,1,n3,n1)
CALL WGridGetReal(idf_grid1,2,r2,n1)
CALL WGridGetReal(idf_grid1,3,r4,n1)
N5=0
ELSE
N5=1
RETURN
ENDIF
RETURN
END
SUBROUTINE CFORM
! Form list of nodes working along contour lines
USE BLKMAP
USE BLK1MOD
COMMON /CRMAP/ NCONT,CVALUE(1000),MSTART(1000),MFIN(1000),CINTDIS(1000),IACTCV(1000)
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
DISTC(N1,N2)=SQRT((XMAP(N1)-XMAP(N2))**2 &
& +(YMAP(N1)-YMAP(N2))**2)
! Loop through each active contour
DO N=1,NCONT
IF(IACTCV(N) .EQ. 1) THEN
JS=MSTART(N)
JF=MFIN(N)
IF(XMAP(JS) .EQ. XMAP(JF) .AND. YMAP(JS) .EQ. YMAP(JF)) THEN
IF(JF .GT. JS) JF=JF-1
ENDIF
IEND=0
DO J=JS,JF
IF(J .EQ. JS) THEN
CDONE=0.
CNODE=0
CALL GETNOD(JJ)
INSKP(JJ)=0
INEW(JJ) = 1
!
XUSR(JJ) = XMAP(J)
YUSR(JJ) = YMAP(J)
CORD(JJ,1)=(XUSR(JJ)+XS)/TXSCAL
CORD(JJ,2)=(YUSR(JJ)+YS)/TXSCAL
WD(JJ)=CVALUE(N)
WIDTH(JJ)=0.
SS1(JJ)=0.
SS2(JJ)=0.
WIDS(JJ)=0.
WIDBS(JJ)=0.
SSO(JJ)=0.
IF (JJ .GT. NP) NP = JJ
CALL PLTNOD(JJ,0)
ICHG=0
ELSE
CNODEO=CNODE
CNODE=CNODE+DISTC(J,J-1)
200 CONTINUE
CDIS=CDONE+CINTDIS(N)
IF(CDIS .LE. CNODE .OR. J .EQ. JF) THEN
IF(CDIS .LE. CNODE) THEN
FACT=(CDIS-CNODEO)/(DISTC(J,J-1))
IF(J .EQ. JF .AND. FACT .GT. 0.999) IEND=1
ELSE
FACT=1.0
IEND=1
ENDIF
CALL GETNOD(JJ)
INSKP(JJ)=0
INEW(JJ) = 1
!
XUSR(JJ) = (1.-FACT)*XMAP(J-1)+FACT*XMAP(J)
YUSR(JJ) = (1.-FACT)*YMAP(J-1)+FACT*YMAP(J)
CORD(JJ,1)=(XUSR(JJ)+XS)/TXSCAL
CORD(JJ,2)=(YUSR(JJ)+YS)/TXSCAL
WD(JJ)=CVALUE(N)
WIDTH(JJ)=0.
SS1(JJ)=0.
SS2(JJ)=0.
WIDS(JJ)=0.
WIDBS(JJ)=0.
SSO(JJ)=0.
IF (JJ .GT. NP) NP = JJ
CALL PLTNOD(JJ,0)
ICHG=0
CDONE=CDIS
IF(IEND .NE. 1) GO TO 200
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
RETURN
END
SUBROUTINE CHECKPOLY
! CHECK IF ELEMENTS ARE OUTSIDE POLYGON BY LOOKING AT CENTROID
USE BLKOUT
USE BLK1MOD
IF(NOUTLIN .EQ. 0) RETURN
call FILM(1)
NETEMP=NE
DO N=1,NETEMP
IF(IMAT(N) .EQ. 0) CYCLE
XM=(XUSR(NOP(N,1))+XUSR(NOP(N,3))+XUSR(NOP(N,5)))/3.
YM=(YUSR(NOP(N,1))+YUSR(NOP(N,3))+YUSR(NOP(N,5)))/3.
! do k=2,6,2
! xm=xusr(nop(n,k))
! ym=yusr(nop(n,k))
if( IGRInsidePolygon(xoutl,youtl,noutlin,xm,ym)) then
else
CALL DELTEL(n)
go to 200
endif
! enddo
200 continue
ENDDO
RETURN
END

@ -0,0 +1,376 @@
SUBROUTINE crgrid
USE BLK1MOD
USE BLKMAP
REAL*8 GRIDX,GRIDY,GRIDXL,GRIDYL,XL,YL,ANGD,GETANG1,A,B,C,D
INTEGER*2 IGSKP
dimension XL(1500,3),YL(1500,3),mappt(2),XL1(500),XL2(500)
INCLUDE 'TXFRM.COM'
COMMON /GBLK/ GRIDX(MAXPGEN),GRIDY(MAXPGEN),GRIDXL(MAXPGEN),GRIDYL(MAXPGEN)&
,IGSKP(MAXPGEN),NRL,NRT,NYP,IGRIDE(MAXPGEN)
!
! define line numbers in map file
!
ITEST=1
CALL PANELGENBLK(NY,XSZ,KL1,KL2,ISW1,ISW2,ITEST)
JS=1
!
K=0
KL=1
CALL RCyan
DO 20 J=1,MAXPTS
MLEN=J-JS
IF(XMAP(J) .LE. VDX .or. j .eq. maxpts) THEN
IF(J .EQ. MAXPTS .AND. XMAP(J) .GT. VDX) MLEN=MLEN+1
!
!
K=K+1
IF(K .EQ. KL2) THEN
DO KK=1,MLEN
XL(KK,1)=XMAP(KK+JS-1)
YL(KK,1)=YMAP(KK+JS-1)
ENDDO
IF(ISW2 .EQ. 1) THEN
DO KK=MLEN,1,-1
XL(KK,3)=XL(MLEN-KK+1,1)
YL(KK,3)=YL(MLEN-KK+1,1)
ENDDO
DO KK=1,MLEN
XL(KK,1)=XL(KK,3)
YL(KK,1)=YL(KK,3)
ENDDO
ENDIF
MAPPT(1)=MLEN
ENDIF
IF(K .EQ. KL1) THEN
DO KK=1,MLEN
XL(KK,2)=XMAP(KK+JS-1)
YL(KK,2)=YMAP(KK+JS-1)
ENDDO
IF(ISW1 .EQ. 1) THEN
DO KK=MLEN,1,-1
XL(KK,3)=XL(MLEN-KK+1,2)
YL(KK,3)=YL(MLEN-KK+1,2)
ENDDO
DO KK=1,MLEN
XL(KK,2)=XL(KK,3)
YL(KK,2)=YL(KK,3)
ENDDO
ENDIF
MAPPT(2)=MLEN
ENDIF
JS=J+1
KL=2
ENDIF
20 CONTINUE
K1=1
K2=2
!
! compute line length
!
XL1=0.
nlpts1=mappt(k1)
do n=2,nlpts1
XL1(n)=XL1(n-1)+SQRT((XL(N,1)-XL(n-1,1))**2+(YL(n,1)-YL(n-1,1))**2)
enddo
XL2=0.
nlpts2=mappt(k2)
do n=2,nlpts2
XL2(n)=XL2(n-1)+SQRT((XL(N,2)-XL(n-1,2))**2+(YL(n,2)-YL(n-1,2))**2)
enddo
xmean=(XL1(nlpts1)+XL2(nlpts2))/2.
!
! get size spacing
!
along=xmean/xsz
NX=(along+0.99)
NXP=NX+1
NYP=NY+1
NRL=NX*NYP+1
NRT=NXP*NYP
DO N=1,NE
DO M=1,8
NOPSV(N,M)=NOP(N,M)
ENDDO
IMATSV(N)=IMAT(N)
ENDDO
NESAV=NE
NEFSAV=NENTRY
NPUNDO=NRT
! Initialize GRIDX and GRIDY
DO N=1,NRT
GRIDX(N)=0.
! GRIDY(N)=0.
IGSKP(N)=0
END DO
!
! calculate lengths
!
xalong1=XL1(nlpts1)/NX
xalong2=XL2(nlpts2)/NX
!
! compute cords along the edges
!
XALONG=0.
XXALONG=0.
GRIDX(1)=XL(1,1)
GRIDY(1)=YL(1,1)
GRIDX(NYP)=XL(1,2)
GRIDY(NYP)=YL(1,2)
NRT=NXP*NYP
NX1=2
NX2=2
NCR=1
DO N=NY+2,NRT,NYP
NCR=NCR+1
XALONG=XALONG+XALONG1
DO M=NX1,NLPTS1
IF(XALONG .LT. XL1(M)) THEN
M1=M
GO TO 200
ENDIF
ENDDO
200 CONTINUE
FRAC1=(XALONG-XL1(M1-1))/(XL1(M1)-XL1(M1-1))
GRIDX(N)=XL(m1-1,1)+FRAC1*(XL(m1,1)-XL(m1-1,1))
GRIDY(N)=YL(m1-1,1)+FRAC1*(YL(m1,1)-YL(m1-1,1))
NX1=M1
XXALONG=XXALONG+XALONG2
DO M=NX2,NLPTS2
IF(XXALONG .LT. XL2(M)) THEN
M2=M
GO TO 250
ENDIF
ENDDO
250 CONTINUE
FRAC1=(XXALONG-XL2(M2-1))/(XL2(M2)-XL2(M2-1))
GRIDX(N+NY)=XL(m2-1,2)+FRAC1*(XL(m2,2)-XL(m2-1,2))
GRIDY(N+NY)=YL(m2-1,2)+FRAC1*(YL(m2,2)-YL(m2-1,2))
NX2=M2
ANGD1=GETANG1(GRIDX(N-NY-1),GRIDY(N-NY-1),GRIDX(N),GRIDY(N),GRIDX(N+NY),GRIDY(N+NY))
ANGD2=GETANG1(GRIDX(N),GRIDY(N),GRIDX(N+NY),GRIDY(N+NY),GRIDX(N-1),GRIDY(N-1))
ANGM1=(ANGD1+180-ANGD2)/2.
! WRITE(151,*) N,ANGD1,ANGD2,ANGM1
IF(ITEST .EQ. 1) THEN
XALONGKP=XALONG
XXALONGKP=XXALONG
! write(151,*) 'b',xalong,xxalong
IF(ANGM1 .GT. 100. .OR. ANGM1 .LT. 80.) THEN
IF(ANGM1 .GT. 100) THEN
XALONG=XALONG+XALONG1/2.
XXALONG=XXALONG-XALONG2/2.
ELSE
XALONG=XALONG-XALONG1/2.
XXALONG=XXALONG+XALONG2/2.
ENDIF
! WRITE(151,*) 'a',XALONG,XXALONG
itag=0
275 CONTINUE
DO M=1,NLPTS1
IF(XALONG .LT. XL1(M)) THEN
M1=M
GO TO 300
ENDIF
ENDDO
300 CONTINUE
FRAC1=(XALONG-XL1(M1-1))/(XL1(M1)-XL1(M1-1))
GRIDX(N)=XL(m1-1,1)+FRAC1*(XL(m1,1)-XL(m1-1,1))
GRIDY(N)=YL(m1-1,1)+FRAC1*(YL(m1,1)-YL(m1-1,1))
NX1=M1
DO M=1,NLPTS2
IF(XXALONG .LT. XL2(M)) THEN
M2=M
GO TO 350
ENDIF
ENDDO
350 CONTINUE
FRAC1=(XXALONG-XL2(M2-1))/(XL2(M2)-XL2(M2-1))
GRIDX(N+NY)=XL(m2-1,2)+FRAC1*(XL(m2,2)-XL(m2-1,2))
GRIDY(N+NY)=YL(m2-1,2)+FRAC1*(YL(m2,2)-YL(m2-1,2))
NX2=M2
ANGD3=GETANG1(GRIDX(N-NY-1),GRIDY(N-NY-1),GRIDX(N),GRIDY(N),GRIDX(N+NY),GRIDY(N+NY))
ANGD4=GETANG1(GRIDX(N),GRIDY(N),GRIDX(N+NY),GRIDY(N+NY),GRIDX(N-1),GRIDY(N-1))
ANGM2=(ANGD3+180-ANGD4)/2.
! WRITE(151,*) N,ANGD3,ANGD4,ANGM2
if(itag .eq. itest) go to 375
IF(ANGM1 .LT. 80. .AND. ANGM2 .GT. 100.) THEN
FRAC=(ANGM2-90)/(ANGM2-ANGM1)
XALONG=XALONG+XALONG1/2.*FRAC
XXALONG=XXALONG-XALONG2/2.*FRAC
itag=1
! WRITE(151,*) XALONG,XXALONG
GO TO 275
ELSEIF(ANGM1 .GT. 100. .AND. ANGM2 .LT. 80.) THEN
FRAC=(90-ANGM2)/(ANGM1-ANGM2)
XALONG=XALONG-XALONG1/2.*FRAC
XXALONG=XXALONG+XALONG2/2.*FRAC
itag=1
! WRITE(151,*) XALONG,XXALONG
GO TO 275
! WRITE(151,*) XALONG,XXALONG
ENDIF
XALONG1=(XL1(nlpts1)-XALONG)/(NXP-NCR)
XALONG2=(XL2(nlpts2)-XXALONG)/(NXP-NCR)
375 continue
ENDIF
ENDIF
ENDDO
!
!
! check if points ok allow for move
!
!
! form elements and other coordinates
!
!
! Interpolate interior points
!
DO M=1,NRT,NYP
NFS=NRL+M-1
CALL INTERP(GRIDX,GRIDY,M,M+NY,1,GRIDX(M),GRIDY(M),GRIDX(M+NY) &
& ,GRIDY(M+NY),NY,0)
DO N=M,M+NY
GRIDXL(N)=GRIDX(N)
GRIDYL(N)=GRIDY(N)
GRIDX(N) =(GRIDXL(N)+XS)/TXSCAL
GRIDY(N) =(GRIDYL(N)+YS)/TXSCAL
XTEMP=GRIDX(N)
YTEMP=GRIDY(N)
SIZ=0.1
CALL RRed
call drawcr(xtemp,ytemp,siz)
CALL RBlue
ENDDO
END DO
!
! query for depths
!
!
! query for happY
DO 500 N=1,NRT
!
! Find next blank node in CORD
!
CALL GETNOD(J)
NODDEL(N)=J
!
! Store GRIDX and GRIDY into it
!
CORD(J,1) = GRIDX(N)
CORD(J,2) = GRIDY(N)
IGRIDE(N) = J
INEW(J) = 1
INSKP(J) = 0
WD(J)=-9999.
!
XUSR(J) = GRIDX(N)*TXSCAL - XS
YUSR(J) = GRIDY(N)*TXSCAL - YS
!
! Display point
!
CALL PLTNOD(J,1)
!
500 END DO
!
! Generate elements
!
CALL GETELM(K)
IECHG=0
!
DO 600 I=1,NX
DO 590 J=1,NY
CALL GETELM(K)
NOP(K,1)=IGRIDE((I-1)*NYP+J)
NOP(K,2)=0
NOP(K,3)=IGRIDE(I*NYP+J)
NOP(K,4)=0
NOP(K,5)=IGRIDE(I*NYP+J+1)
NOP(K,6)=0
NOP(K,7)=IGRIDE((I-1)*NYP+J+1)
NOP(K,8)=0
IMAT(K)=1
! IF(K .GT. NE) NE=K
NCORN(K)=8
IESKP(K)=0
!IPK JAN98
IERC=0
CALL PLTELM(K,IERC)
590 CONTINUE
600 END DO
CALL WRTOUT(0)
RETURN
end
REAL*8 FUNCTION GETANG1(X1,Y1,X2,Y2,X3,Y3)
REAL*8 X1,Y1,X2,Y2,X3,Y3,CAN
C=SQRT((X2-X1)**2+(Y2-Y1)**2)
B=SQRT((X3-X2)**2+(Y3-Y2)**2)
A=SQRT((X1-X3)**2+(Y1-Y3)**2)
CAN=(B**2+C**2-A**2)/(2.*B*C)
GETANG1=DACOSD(CAN)
RETURN
END
SUBROUTINE PANELgenblk(N1,XL,N2,N3,ISW1,ISW2,ITEST)
use winteracter
implicit none
include 'D.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,N3,IERR,IFIRST,ISW1,ISW2,ITEST
real :: XL
character*3 :: sub
DATA IFIRST/0/
IF(IFIRST .EQ. 0) THEN
IFIRST=1
N1=1
N2=1
N3=2
XL=5.
isw1=0
isw2=0
ENDIF
call wdialogload(IDD_GENBLK)
ierr=infoerror(1)
CALL WDialogPutInteger(idf_integer1,n1)
CALL WDialogPutInteger(idf_integer2,n2)
CALL WDialogPutInteger(idf_integer3,n3)
CALL WDialogPutInteger(idf_integer5,ITEST)
CALL WDialogPutReal(idf_real1,xl)
CALL WDialogPutCheckBox(idf_check1,isw1)
CALL WDialogPutCheckBox(idf_check2,isw2)
CALL WDialogSelect(IDD_GENBLK)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(idf_integer1,n1)
CALL WDialogGetInteger(idf_integer2,n2)
CALL WDialogGetInteger(idf_integer3,n3)
CALL WDialogGetReal(idf_real1,xl)
CALL WDialogGetInteger(idf_integer5,ITEST)
CALL WDialogGetCheckBox(idf_check1,isw1)
CALL WDialogGetCheckBox(idf_check2,isw2)
ENDIF
RETURN
END

@ -0,0 +1,158 @@
!-----------------------------------------------------------------crsect
subroutine crsect
!----------------------------------------------------------------------c
! purpose: c
! To plot a selected cross section and calculate width and c
! slopes. c
! ycw mar97 c
!----------------------------------------------------------------------c
USE BLKMAP
USE BLK1MOD
USE BLK2MOD
! include 'BLK1.COM'
! include 'BLK2.COM'
real XPL(5),YPL(5),ss0(50)
CHARACTER*1 ANS,ANSW(0:4),IFLAG
CHARACTER*6 DESCR
INCLUDE 'TXFRM.COM'
COMMON /XYGRPH/ XVALUES(10000,10),YVALUES(10000,10),TIMMIN,VALMIN,TIMMAX,VALMAX,NVALUES,NSETS,LINPROP(10)
COMMON /HEDS1/ NWINDWS,IWNDWS(10),ISCRNS(10),DESCR(10),ICRSR(10)
DATA MAN/1/
!
!------get cross section number
!
! 100 NHTP=0
! NMESS=29
! NBRR=6
call selcrs(man)
if(man .eq. 2) then
call setlim(timmin,timmax,valmin,valmax)
else
!
!......establish shape of curve
!
timmin=1.e20
valmin=1.e20
timmax=-1.e20
valmax=-1.e20
endif
DO J=1,5
icr=icrsr(j)
if(icr .gt. 0) then
do i=nrivl(icr),1,-1
ii=nrivl(icr)-i+1
xvalues(ii,j)=-crsdat(icr,i,3)/2.
yvalues(ii,j)=crsdat(icr,i,1)
ij=nrivl(icr)+i
xvalues(ij,j)=crsdat(icr,i,3)/2.
yvalues(ij,j)=crsdat(icr,i,1)
enddo
nsets=j
if(man .eq. 1) then
timmin=min(timmin,-crsdat(icr,nrivl(icr),3)/2.)
valmin=min(valmin,crsdat(icr,1,1))
timmax=max(timmax,crsdat(icr,nrivl(icr),3)/2.)
valmax=max(valmax,crsdat(icr,nrivl(icr),1))
endif
NVALUES=2*nrivl(icr)
write(DESCR(j),'(i6)') ICR
endif
enddo
call dograph(2,icurwin)
iscrns(icurwin)=3
return
END
subroutine selcrs(MAN)
USE WINTERACTER
INCLUDE 'D.INC'
CHARACTER*6 DESCR
COMMON /HEDS1/ NWINDWS,IWNDWS(10),ISCRNS(10),DESCR(10),ICRSR(10)
call wdialogload(IDD_SELCRSEC)
ierr=infoerror(1)
CALL WDialogSelect(IDD_SECCRSEC)
ierr=infoerror(1)
do i=1,5
CALL WGridPutCellInteger(IDF_GRID1,i,1,icrsr(i))
enddo
if(man .eq. 1) then
CALL WDialogPutRadioButton(IDF_RADIO1)
else
CALL WDialogPutRadioButton(IDF_RADIO2)
endif
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
do i=1,5
CALL WGridGetCellInteger(IDF_GRID1,i,1,icrsr(i))
enddo
CALL WDialogGetRadioButton(IDF_RADIO1,man)
return
else
return
endif
enddo
return
end
subroutine setlim(timmin,timmax,valmin,valmax)
USE WINTERACTER
INCLUDE 'D.INC'
CHARACTER*6 DESCR
call wdialogload(IDD_LIMITS)
ierr=infoerror(1)
CALL WDialogSelect(IDD_LIMITS)
ierr=infoerror(1)
CALL WDialogPutReal(IDF_REAL1,TIMMIN)
CALL WDialogPutReal(IDF_REAL2,TIMMAX)
CALL WDialogPutReal(IDF_REAL3,VALMIN)
CALL WDialogPutReal(IDF_REAL4,VALMAX)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetReal(IDF_REAL1,TIMMIN)
CALL WDialogGetReal(IDF_REAL2,TIMMAX)
CALL WDialogGetReal(IDF_REAL3,VALMIN)
CALL WDialogGetReal(IDF_REAL4,VALMAX)
return
else
return
endif
enddo
return
end

@ -0,0 +1,407 @@
SUBROUTINE CSET(TTMIN,TTMAX,isz)
USE WINTERACTER
SAVE
INTEGER ICK5
!
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
!IPK APR94
COMMON /RECOD/ IRECD,TSPC
DIMENSION NKEY(99)
CHARACTER*80 ILIND
LOGICAL SWITCH
DATA ITIM,VDM /0,-1.E15/
!
call setd(24)
IF(ITIM .EQ. 0) THEN
OMAX=VDM
OMIN=VDM
ick5=0
DO 200 N=1,99
CONTUR(N)=VDM
200 CONTINUE
ITIM=ITIM+1
ELSE
ITIM=ITIM+1
ENDIF
!
!
13 continue
!
! isz = 0 means no choice for data
! = 1 means data selectd
!
IF(TTMAX .EQ. TTMIN) THEN
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,&
'There are no contours for this case MAX=MIN'//CHAR(13)//'The model will return ','CONTOUR ERROR')
5010 FORMAT(F5.2)
RETURN
!ipk apr94
ENDIF
IF(ICK5 .EQ. 1) GO TO 250
!
! get an estimate of contour values
!
AT=ALOG10(TTMAX-TTMIN)
IF(AT .LT. 0.) THEN
CINTER = 10. ** (IFIX(AT - .5) - 1)
ELSE
CINTER = 10. ** (IFIX(AT + .5) - 1)
ENDIF
! CINTER = 10. ** (IFIX(ALOG10(TTMAX-TTMIN) + .5) - 1)
235 FINTER = CINTER
! write(*,*) cinter,numv
IF(TTMIN .GT. 0.) THEN
CONTUR(1)=IFIX(TTMIN/CINTER)*CINTER+0.001*cinter
ELSE
CONTUR(1)=IFIX((TTMIN-CINTER)/CINTER)*CINTER+0.001*cinter
ENDIF
NUMV=1
DO 240 N=2,99
CONTUR(N)=CONTUR(N-1)+FINTER
IF(CONTUR(N) .GT. TTMAX) THEN
NUMV=N
GO TO 245
ENDIF
240 END DO
NUMV=99
245 IF(NUMV .GT. 16) THEN
CINTER=CINTER*2.
GO TO 235
ENDIF
DO 247 N=NUMV+1,99
CONTUR(N)=VDM
247 END DO
250 CONTINUE
!
! print options when no startup data available
!
if(isz .eq. 1) then
call conpanel(icsp,ttmin,ttmax,numv,contur,omax,omin,ick5)
if(icsp .lt. 0) then
GO TO 405
elseif(icsp .eq. 0) then
go to 405
endif
IF(ABS(ICSP) .EQ. 1) THEN
icsp=0
!
! this is log spacing
!
IF(TTMAX .GT. 0.) THEN
ALMAX=ALOG10(TTMAX)
ELSE
call clscrn
call symbl (0.1,7.0,0.25, &
& 'Maximum contour value is negative',0.0,33)
call symbl (0.1,6.5,0.25, &
& 'Reconsider your choice',0.0,22)
GO TO 250
ENDIF
IF(TTMIN .GT. 0.) THEN
ALMIN=ALOG10(TTMIN)
!ipk oct94 add a switch
IMINSW=0
ELSE
call clscrn
call symbl (0.1,7.0,0.25, &
& 'Minimum contour value is negative',0.0,33)
call symbl (0.1,6.5,0.25, &
& 'Value set to 10**10 less than max value',0.0,39)
ALMIN=ALMAX-10.
!ipk oct 94 add a switch
IMINSW=1
ENDIF
!
ALMIN=ALMAX-4.
!
IF(ALMAX .GT. 0.) THEN
LMAX=ALMAX
ELSE
LMAX=ALMAX-1.
ENDIF
IF(ALMIN .GT. 0.) THEN
LMIN=ALMIN+1.
ELSE
LMIN=ALMIN
ENDIF
!ipk oct94 NUMV=LMAX-LMIN+1
NUMV=LMAX-LMIN+1+IMINSW
IF(NUMV .LT. 8) THEN
NUMV=NUMV*2
IDB=2
ELSE
IDB=1
ENDIF
!ipk oct94
IF(IMINSW .EQ. 1) THEN
CONTUR(1)=0.
CONTUR(2)=10.**LMIN
K=2
ELSE
CONTUR(1)=10.**LMIN
K=1
ENDIF
IPW=LMIN
DO 350 N=IMINSW+2,NUMV,IDB
IF(IDB .EQ. 2) THEN
K=K+1
CONTUR(K)=CONTUR(K-1)*3.
ENDIF
IPW=IPW+1
K=K+1
CONTUR(K)=10.**IPW
350 CONTINUE
numv=k
!
! this is for entry of chosen contours
!
ELSEIF(abs(ICSP) .EQ. 2) THEN
icsp=0
CALL SORT(CONTUR,NKEY,NUMV)
ELSEIF(abs(ICSP) .EQ. 3) THEN
icsp=0
cinter=omax-omin
if(cinter .gt. 0.) then
cinter=cinter/(numv-1)
else
cinter=1.0
endif
contur(1)=omin
do i=2,numv
contur(i)=contur(i-1)+cinter
enddo
ENDIF
GO TO 250
!ipk july 1995 add this line
405 CONTINUE
ENDIF
call setd(2)
RETURN
END
subroutine conpanel(icsp,ttmin,ttmax,numv,contur,omax,omin,ick5)
use winteracter
implicit none
save
include 'D.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: icsp,numv,nlim,ict,ictx,ick1,ick2,ick3,ick4,ick5,ierr,idf,ipos,numvold
real :: ttmin,ttmax,contur(99),omax,omin,VDX
character*80 labmax,labmin,labnum,labcon(30),labomax,labomin
VDX=-1.E14
write(labmax,'(f10.3)') ttmax
write(labmin,'(f10.3)') ttmin
if(omax .lt. vdx) then
labomax=labmax
else
write(labomax,'(f10.3)') omax
endif
if(omin .lt. vdx) then
labomin=labmin
else
write(labomin,'(f10.3)') omin
endif
write(labnum,'(i10)') numv
nlim=numv
if(nlim .gt. 30) nlim=numv
do ict=1,nlim
write(labcon(ict),'(f10.3)') contur(ict)
enddo
if(numv .lt. 30) then
do ict=numv+1,30
labcon(ict)=' '
enddo
endif
90 continue
numvold=numv
call wdialogload(IDD_DIALOG02)
ierr=infoerror(1)
CALL WDialogPutString(idf_string1,labmax)
CALL WDialogPutString(idf_string2,labmin)
CALL WDialogPutString(idf_string3,labomax)
CALL WDialogPutString(idf_string22,labomin)
CALL WDialogPutString(idf_string23,labnum)
ictx=0
do ict=idf_string4,idf_string4+18-1
ictx=ictx+1
CALL WDialogPutString(ict,labcon(ictx))
enddo
ictx=ictx+1
ICT=idf_string24
CALL WDialogPutString(ict,labcon(ictx))
DO ict=idf_string25,idf_string25+9
ictx=ictx+1
CALL WDialogPutString(ict,labcon(ictx))
enddo
ictx=ictx+1
ICT=idf_string35
CALL WDialogPutString(ict,labcon(ictx))
! call wdialogputcheckbox(idf_check1,0)
! call wdialogputcheckbox(idf_check2,0)
! call wdialogputcheckbox(idf_check3,0)
! call wdialogputcheckbox(idf_check4,0)
call wdialogputcheckbox(idf_check5,ick5)
! if(icsp .eq. 0) then
call wdialogputRadioButton(idf_check1)
! endif
CALL WDialogSelect(IDD_DIALOG02)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
! call wdialoggetcheckbox(idf_check1,ick1)
! call wdialoggetcheckbox(idf_check2,ick2)
! call wdialoggetcheckbox(idf_check3,ick3)
! call wdialoggetcheckbox(idf_check4,ick4)
call wdialoggetcheckbox(idf_check5,ick5)
CALL WDialoggetString(idf_string1,labmax)
CALL WDialoggetString(idf_string2,labmin)
CALL WDialoggetString(idf_string3,labomax)
CALL WDialoggetString(idf_string22,labomin)
CALL WDialoggetString(idf_string23,labnum)
call wdialoggetradiobutton(idf_check1,ipos)
call IStringToInteger(labnum,numv)
write(90,*) 'numvold',numvold,numv,ipos
if(numvold .ne. numv .and. ipos .ne. 4) ipos=3
!C if(ick1 .eq. 1) then
!C icsp=0
!C else
icsp=0
if(ipos .eq. 2) then
icsp=1
elseif(ipos .eq. 3) then
icsp=3
write(90,'(a)') 'numv',labnum
call IStringToInteger(labnum,numv)
if(infoError(1) .gt. 0) then
call wdialogload(IDD_DIALOG04)
CALL WDialogSelect(IDD_DIALOG04)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
120 continue
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
go to 90
endif
go to 120
endif
call IStringToReal(labomax,omax)
if(infoError(1) .gt. 0) then
call wdialogload(IDD_DIALOG04)
CALL WDialogSelect(IDD_DIALOG04)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
130 continue
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
go to 90
endif
go to 130
endif
call IStringToReal(labomin,omin)
if(infoError(1) .gt. 0) then
call wdialogload(IDD_DIALOG04)
CALL WDialogSelect(IDD_DIALOG04)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
140 continue
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
go to 90
endif
go to 140
endif
elseif(ipos .eq. 4) then
icsp=2
write(90,'(a)') 'numv-4',labnum
! read(labnum,*) numv
call IStringToInteger(labnum,numv)
if(infoError(1) .gt. 0) then
call wdialogload(IDD_DIALOG04)
CALL WDialogSelect(IDD_DIALOG04)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
150 continue
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
go to 90
endif
go to 150
endif
write(90,*) numv
ictx=0
do ict=idf_string4,idf_string4+18-1
ictx=ictx+1
CALL WDialogGetString(ict,labcon(ictx))
enddo
ictx=ictx+1
ICT=idf_string24
CALL WDialogGetString(ict,labcon(ictx))
do ict=idf_string25,idf_string25+9
ictx=ictx+1
CALL WDialogGetString(ict,labcon(ictx))
enddo
ictx=ictx+1
ICT=idf_string35
CALL WDialogGetString(ict,labcon(ictx))
do ict=1,numv
! read(labcon(ict),*) contur(ict)
call IStringToReal(labcon(ict),contur(ict))
if(infoError(1) .gt. 0) then
call wdialogload(IDD_DIALOG04)
CALL WDialogSelect(IDD_DIALOG04)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
160 continue
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
go to 90
endif
go to 160
endif
write(90,*) 'con',ict,contur(ict)
enddo
endif
if(ipos .eq. 5) then
icsp=-5
! abs(icsp)
endif
write(90,*) 'icsp',icsp,omax,omin,numv,ipos
! write(90,*) 'ick',ick1,ick2,ick3,ick4,ick5
return
endif
return
enddo
return
end

@ -0,0 +1,367 @@
! Winteracter resource identifiers. Created : 13/Feb/2017 12:04:28
!
! This file is generated by the Winteracter resource editor.
! It should not be edited manually. It is also not advisable to load this
! file in a text editor, while working on the associated resource file,
! since this may prevent the resource identifiers file from being updated.
! To view the names and values of resource identifiers, use the
! "Identifier Names and Values" or "Used Identifiers" options on the
! resource editor's "View" menu. Both dialogs also include a "Copy id"
! button which allows identifier names to be copied via the clipboard.
! Opening this file in an editor should therefore not be necessary.
!
INTEGER, PARAMETER :: IDR_MENU1 = 30001
INTEGER, PARAMETER :: ID_FILE = 40001
INTEGER, PARAMETER :: ID_EXIT = 40002
INTEGER, PARAMETER :: ID_NODE = 40003
INTEGER, PARAMETER :: ID_ELTS = 40004
INTEGER, PARAMETER :: ID_ORDRT = 40005
INTEGER, PARAMETER :: ID_CCLNA = 40006
INTEGER, PARAMETER :: ID_CSEC1 = 40007
INTEGER, PARAMETER :: ID_ZOOM = 40008
INTEGER, PARAMETER :: ID_DRAW = 40009
INTEGER, PARAMETER :: ID_HELP = 40010
INTEGER, PARAMETER :: ID_STRING1 = 50001
INTEGER, PARAMETER :: ID_STRING2 = 50002
INTEGER, PARAMETER :: ID_STRING3 = 50003
INTEGER, PARAMETER :: ID_STRING4 = 50004
INTEGER, PARAMETER :: ID_STRING5 = 50005
INTEGER, PARAMETER :: ID_STRING6 = 50006
INTEGER, PARAMETER :: ID_STRING7 = 50007
INTEGER, PARAMETER :: ID_STRING8 = 50008
INTEGER, PARAMETER :: ID_STRING9 = 50009
INTEGER, PARAMETER :: ID_STRING10 = 50010
INTEGER, PARAMETER :: ID_STRING11 = 50011
INTEGER, PARAMETER :: ID_ITEM11 = 40011
INTEGER, PARAMETER :: ID_ITEM12 = 40012
INTEGER, PARAMETER :: ID_ITEM13 = 40013
INTEGER, PARAMETER :: ID_ITEM14 = 40014
INTEGER, PARAMETER :: ID_ITEM15 = 40015
INTEGER, PARAMETER :: ID_ITEM16 = 40016
INTEGER, PARAMETER :: ID_ITEM17 = 40017
INTEGER, PARAMETER :: ID_ITEM18 = 40018
INTEGER, PARAMETER :: ID_ITEM19 = 40019
INTEGER, PARAMETER :: IDF_STRING24 = 1041
INTEGER, PARAMETER :: IDD_DIALOG1 = 101
INTEGER, PARAMETER :: IDF_LABEL5 = 1042
INTEGER, PARAMETER :: IDC_BUTTON2 = 20001
INTEGER, PARAMETER :: ID_ITEM20 = 40021
INTEGER, PARAMETER :: ID_ITEM73 = 40022
INTEGER, PARAMETER :: ID_ITEM23 = 40023
INTEGER, PARAMETER :: ID_ITEM24 = 40024
INTEGER, PARAMETER :: ID_TOOLBAR1 = 30101
INTEGER, PARAMETER :: ID_ZIN = 40025
INTEGER, PARAMETER :: ID_ZOUT = 40026
INTEGER, PARAMETER :: ID_OUT2 = 40027
INTEGER, PARAMETER :: ID_OUT4 = 40028
INTEGER, PARAMETER :: ID_RSET = 40029
INTEGER, PARAMETER :: ID_PLEFT = 40031
INTEGER, PARAMETER :: ID_PRIGHT = 40032
INTEGER, PARAMETER :: ID_PUP = 40033
INTEGER, PARAMETER :: ID_PDOWN = 40034
INTEGER, PARAMETER :: ID_IDRWT = 40035
INTEGER, PARAMETER :: ID_TYPD = 40039
INTEGER, PARAMETER :: ID_DRAWD = 40041
INTEGER, PARAMETER :: ID_MAPOPD = 40042
INTEGER, PARAMETER :: ID_CONTR = 40060
INTEGER, PARAMETER :: IDF_LABEL1 = 1001
INTEGER, PARAMETER :: IDF_LABEL2 = 1002
INTEGER, PARAMETER :: IDF_LABEL3 = 1003
INTEGER, PARAMETER :: IDF_LABEL4 = 1004
INTEGER, PARAMETER :: IDF_STRING1 = 1013
INTEGER, PARAMETER :: IDF_STRING2 = 1014
INTEGER, PARAMETER :: IDF_STRING3 = 1015
INTEGER, PARAMETER :: IDF_STRING4 = 1016
INTEGER, PARAMETER :: IDF_STRING5 = 1017
INTEGER, PARAMETER :: IDF_STRING6 = 1018
INTEGER, PARAMETER :: IDF_STRING7 = 1019
INTEGER, PARAMETER :: IDF_STRING8 = 1020
INTEGER, PARAMETER :: IDF_STRING9 = 1021
INTEGER, PARAMETER :: IDF_STRING10 = 1022
INTEGER, PARAMETER :: IDF_STRING11 = 1023
INTEGER, PARAMETER :: IDF_STRING12 = 1024
INTEGER, PARAMETER :: IDD_DIALOG02 = 102
INTEGER, PARAMETER :: IDF_STRING13 = 1025
INTEGER, PARAMETER :: IDF_STRING14 = 1026
INTEGER, PARAMETER :: IDF_STRING15 = 1027
INTEGER, PARAMETER :: IDF_STRING16 = 1028
INTEGER, PARAMETER :: IDF_STRING17 = 1029
INTEGER, PARAMETER :: IDF_STRING18 = 1030
INTEGER, PARAMETER :: IDF_STRING19 = 1031
INTEGER, PARAMETER :: IDF_STRING20 = 1032
INTEGER, PARAMETER :: IDF_STRING21 = 1033
INTEGER, PARAMETER :: IDF_STRING22 = 1034
INTEGER, PARAMETER :: IDF_STRING23 = 1035
INTEGER, PARAMETER :: IDF_CHECK1 = 1036
INTEGER, PARAMETER :: IDF_CHECK2 = 1037
INTEGER, PARAMETER :: IDF_CHECK3 = 1038
INTEGER, PARAMETER :: IDF_CHECK4 = 1039
INTEGER, PARAMETER :: IDF_CHECK5 = 1040
INTEGER, PARAMETER :: ID_DCONTR = 40056
INTEGER, PARAMETER :: ID_CONTOPT = 40061
INTEGER, PARAMETER :: ID_ITYPN = 40064
INTEGER, PARAMETER :: ID_ITYPC = 40065
INTEGER, PARAMETER :: ID_ICOPY = 40067
INTEGER, PARAMETER :: IDD_DIALOG04 = 104
INTEGER, PARAMETER :: ID_BACGD = 40050
INTEGER, PARAMETER :: ID_ITEM26 = 40071
INTEGER, PARAMETER :: IDD_DIALOG05 = 103
INTEGER, PARAMETER :: IDF_CMAP8 = 1005
INTEGER, PARAMETER :: IDF_CMAP9 = 1006
INTEGER, PARAMETER :: IDF_CMAP0 = 1007
INTEGER, PARAMETER :: IDF_CMAP1 = 1008
INTEGER, PARAMETER :: IDF_CMAP2 = 1009
INTEGER, PARAMETER :: IDF_CMAP10 = 1010
INTEGER, PARAMETER :: IDF_CMAP11 = 1011
INTEGER, PARAMETER :: IDF_CMAP3 = 1012
INTEGER, PARAMETER :: IDF_CMAP4 = 1043
INTEGER, PARAMETER :: IDF_CMAP5 = 1044
INTEGER, PARAMETER :: IDF_CMAP6 = 1045
INTEGER, PARAMETER :: IDF_CMAP7 = 1046
INTEGER, PARAMETER :: IDD_DIALOG006 = 105
INTEGER, PARAMETER :: IDF_RADIO1 = 1047
INTEGER, PARAMETER :: IDF_RADIO2 = 1048
INTEGER, PARAMETER :: IDF_RADIO3 = 1049
INTEGER, PARAMETER :: IDF_RADIO4 = 1050
INTEGER, PARAMETER :: IDF_RADIO5 = 1051
INTEGER, PARAMETER :: IDF_RADIO6 = 1052
INTEGER, PARAMETER :: IDF_RADIO7 = 1053
INTEGER, PARAMETER :: IDF_RADIO8 = 1054
INTEGER, PARAMETER :: IDF_RADIO9 = 1055
INTEGER, PARAMETER :: ID_MMAP = 40043
INTEGER, PARAMETER :: IDD_DIALOG07 = 106
INTEGER, PARAMETER :: IDD_DIALOG08 = 107
INTEGER, PARAMETER :: ID_Help1 = 40040
INTEGER, PARAMETER :: ID_Help2 = 40044
INTEGER, PARAMETER :: IDD_DIALOG09 = 108
INTEGER, PARAMETER :: IDF_LABEL7 = 1056
INTEGER, PARAMETER :: IDD_DIALOG10 = 109
INTEGER, PARAMETER :: IDF_INTEGER1 = 1057
INTEGER, PARAMETER :: IDF_INTEGER2 = 1058
INTEGER, PARAMETER :: ID_LAYFL = 40046
INTEGER, PARAMETER :: IDF_RADIO10 = 1056
INTEGER, PARAMETER :: IDD_DIALOG010 = 110
INTEGER, PARAMETER :: IDD_DIALOG001 = 111
INTEGER, PARAMETER :: ID_BKF = 40047
INTEGER, PARAMETER :: IDD_DIALOG012 = 113
INTEGER, PARAMETER :: IDF_CHECK6 = 1041
INTEGER, PARAMETER :: IDF_CHECK7 = 1042
INTEGER, PARAMETER :: IDF_CHECK8 = 1043
INTEGER, PARAMETER :: IDF_CHECK9 = 1044
INTEGER, PARAMETER :: IDF_CHECK10 = 1045
INTEGER, PARAMETER :: IDF_CHECK11 = 1059
INTEGER, PARAMETER :: ID_Clip = 40020
INTEGER, PARAMETER :: ID_UNDOM = 40030
INTEGER, PARAMETER :: ID_BSEL = 40036
INTEGER, PARAMETER :: ID_REGST = 40037
INTEGER, PARAMETER :: IDD_REGST = 112
INTEGER, PARAMETER :: IDF_LABEL6 = 1005
INTEGER, PARAMETER :: IDF_REAL1 = 1060
INTEGER, PARAMETER :: IDF_REAL2 = 1061
INTEGER, PARAMETER :: IDF_REAL3 = 1062
INTEGER, PARAMETER :: IDF_REAL4 = 1063
INTEGER, PARAMETER :: IDF_LABEL8 = 1006
INTEGER, PARAMETER :: IDF_LABEL9 = 1007
INTEGER, PARAMETER :: IDF_LABEL10 = 1008
INTEGER, PARAMETER :: IDF_LABEL11 = 1043
INTEGER, PARAMETER :: IDF_REAL5 = 1064
INTEGER, PARAMETER :: IDF_REAL6 = 1065
INTEGER, PARAMETER :: IDF_REAL7 = 1066
INTEGER, PARAMETER :: IDF_REAL8 = 1067
INTEGER, PARAMETER :: IDF_LABEL12 = 1009
INTEGER, PARAMETER :: IDADJUST = 1068
INTEGER, PARAMETER :: IDFSWITCH = 1069
INTEGER, PARAMETER :: IDD_SLRGNO = 114
INTEGER, PARAMETER :: IDD_CONFIRM = 115
INTEGER, PARAMETER :: ID_network = 40038
INTEGER, PARAMETER :: ID_NMAP = 40045
INTEGER, PARAMETER :: ID_ITEM56 = 40048
INTEGER, PARAMETER :: ID_Nodedata = 40049
INTEGER, PARAMETER :: ID_Eltdata = 40051
INTEGER, PARAMETER :: IDD_nodedata = 116
INTEGER, PARAMETER :: IDF_REAL9 = 1068
INTEGER, PARAMETER :: IDF_REAL10 = 1069
INTEGER, PARAMETER :: IDD_eltdata = 117
INTEGER, PARAMETER :: IDF_INTEGER3 = 1059
INTEGER, PARAMETER :: IDF_INTEGER4 = 1060
INTEGER, PARAMETER :: IDF_INTEGER5 = 1061
INTEGER, PARAMETER :: IDF_INTEGER6 = 1062
INTEGER, PARAMETER :: IDF_INTEGER7 = 1063
INTEGER, PARAMETER :: IDF_INTEGER8 = 1064
INTEGER, PARAMETER :: IDF_INTEGER9 = 1070
INTEGER, PARAMETER :: IDF_INTEGER10 = 1071
INTEGER, PARAMETER :: IDD_SELNODE = 118
INTEGER, PARAMETER :: IDNEXT = 1072
INTEGER, PARAMETER :: IDD_SELELT = 119
INTEGER, PARAMETER :: IDD_ELTERR = 120
INTEGER, PARAMETER :: ID_DRAG = 40052
INTEGER, PARAMETER :: ID_DELM = 40103
INTEGER, PARAMETER :: ID_FILL = 40102
INTEGER, PARAMETER :: IDF_Delete = 1073
INTEGER, PARAMETER :: IDFROTATE = 1074
INTEGER, PARAMETER :: IDF_RADIO11 = 1057
INTEGER, PARAMETER :: ID_GETELM = 40053
INTEGER, PARAMETER :: ID_mapm = 40054
INTEGER, PARAMETER :: ID_map = 40055
INTEGER, PARAMETER :: IDD_GETINTP = 160
INTEGER, PARAMETER :: ID_SBIN = 40057
INTEGER, PARAMETER :: IDD_headertp = 121
INTEGER, PARAMETER :: ID_TRIAN = 40058
INTEGER, PARAMETER :: ID_SWMAP = 40059
INTEGER, PARAMETER :: ID_SWRM1 = 40062
INTEGER, PARAMETER :: IDD_TRIAN = 122
INTEGER, PARAMETER :: IDD_NODERR = 123
INTEGER, PARAMETER :: IDF_STRING25 = 1106
INTEGER, PARAMETER :: IDF_STRING26 = 1107
INTEGER, PARAMETER :: IDF_STRING27 = 1108
INTEGER, PARAMETER :: IDF_STRING28 = 1109
INTEGER, PARAMETER :: IDF_STRING29 = 1110
INTEGER, PARAMETER :: IDF_STRING30 = 1111
INTEGER, PARAMETER :: IDF_STRING31 = 1112
INTEGER, PARAMETER :: IDF_STRING32 = 1113
INTEGER, PARAMETER :: IDF_STRING33 = 1114
INTEGER, PARAMETER :: IDF_STRING34 = 1115
INTEGER, PARAMETER :: IDD_SELTFL2 = 148
INTEGER, PARAMETER :: ID_LOADRM1 = 40063
INTEGER, PARAMETER :: ID_cdata = 40066
INTEGER, PARAMETER :: ID_SELRM1 = 40068
INTEGER, PARAMETER :: ID_addmesh = 40069
INTEGER, PARAMETER :: ID_MRGMESH = 40070
INTEGER, PARAMETER :: ID_ITEM22 = 40072
INTEGER, PARAMETER :: ID_ALLNODES = 40073
INTEGER, PARAMETER :: ID_UNUSNODES = 40074
INTEGER, PARAMETER :: ID_TRIANG = 40075
INTEGER, PARAMETER :: IDD_TRIANG = 124
INTEGER, PARAMETER :: IDD_QUAD = 125
INTEGER, PARAMETER :: ID_QUAD = 40076
INTEGER, PARAMETER :: ID_JOIN = 40104
INTEGER, PARAMETER :: ID_CSEC = 40077
INTEGER, PARAMETER :: ID_CRSCAL = 40078
INTEGER, PARAMETER :: ID_SAVCRS = 40079
INTEGER, PARAMETER :: ID_crsf = 40080
INTEGER, PARAMETER :: IDD_DIALOG06 = 126
INTEGER, PARAMETER :: IDF_RADIO13 = 1076
INTEGER, PARAMETER :: IDF_RADIO12 = 1058
INTEGER, PARAMETER :: IDD_GETFPN = 154
INTEGER, PARAMETER :: IDD_GETINT = 153
INTEGER, PARAMETER :: ID_CSLOC = 40081
INTEGER, PARAMETER :: IDD_CSLOC = 127
INTEGER, PARAMETER :: ID_UNDO = 40082
INTEGER, PARAMETER :: ID_UNDOS = 40083
INTEGER, PARAMETER :: ID_CREATM = 40084
INTEGER, PARAMETER :: IDD_CREATM = 128
INTEGER, PARAMETER :: IDD_TEMPLATE001 = 129
INTEGER, PARAMETER :: IDF_GRID1 = 1075
INTEGER, PARAMETER :: ISS1 = 1077
INTEGER, PARAMETER :: ISS2 = 1078
INTEGER, PARAMETER :: ISS3 = 1079
INTEGER, PARAMETER :: IDD_CREATM1 = 130
INTEGER, PARAMETER :: ID_CGEN = 40085
INTEGER, PARAMETER :: IDF_STRING35 = 1042
INTEGER, PARAMETER :: IDD_ORDEROUT = 131
INTEGER, PARAMETER :: IDD_TEMPLATE002 = 132
INTEGER, PARAMETER :: IDF_RADIO14 = 1080
INTEGER, PARAMETER :: IDF_RADIO15 = 1081
INTEGER, PARAMETER :: IDF_RADIO16 = 1082
INTEGER, PARAMETER :: ID_selarea = 40086
INTEGER, PARAMETER :: ID_crsect = 40087
INTEGER, PARAMETER :: IDD_selcrsec = 133
INTEGER, PARAMETER :: IDD_TEMPLATE003 = 134
INTEGER, PARAMETER :: ISS4 = 1083
INTEGER, PARAMETER :: ISS5 = 1084
INTEGER, PARAMETER :: IDD_LIMITS = 135
INTEGER, PARAMETER :: IDF_RADIO17 = 1059
INTEGER, PARAMETER :: IDD_lAY = 136
INTEGER, PARAMETER :: IDD_TEMPLATE004 = 137
INTEGER, PARAMETER :: ISS6 = 1085
INTEGER, PARAMETER :: ISS7 = 1086
INTEGER, PARAMETER :: ID_EDLAY = 40088
INTEGER, PARAMETER :: IDF_RADIO18 = 1062
INTEGER, PARAMETER :: ID_ORDR = 40089
INTEGER, PARAMETER :: ID_ORDR1 = 40090
INTEGER, PARAMETER :: id_chk = 2002
INTEGER, PARAMETER :: id_chck = 2001
INTEGER, PARAMETER :: idchk = 2003
INTEGER, PARAMETER :: ID_SPLITN = 40091
INTEGER, PARAMETER :: IDD_DISPLIT = 138
INTEGER, PARAMETER :: IDD_DIRSPLIT = 139
INTEGER, PARAMETER :: ID_OUTLAY = 40093
INTEGER, PARAMETER :: ID_FORM999 = 40092
INTEGER, PARAMETER :: ID_g1d = 40094
INTEGER, PARAMETER :: IDD_SETOPT = 140
INTEGER, PARAMETER :: ID_CCLN = 40095
INTEGER, PARAMETER :: ID_CHKCCLN = 40096
INTEGER, PARAMETER :: ID_GOUTLIN = 40097
INTEGER, PARAMETER :: ID_XOUTLIN = 40098
INTEGER, PARAMETER :: IDD_SETMAXMAP = 141
INTEGER, PARAMETER :: ID_RESETLIM = 40099
INTEGER, PARAMETER :: IDD_MLIMITS = 143
INTEGER, PARAMETER :: IDD_VIEWANG = 174
INTEGER, PARAMETER :: ID_3DVIEW = 40100
INTEGER, PARAMETER :: ID_VIEWANGLE = 40101
INTEGER, PARAMETER :: ID_ROTATE = 40106
INTEGER, PARAMETER :: ID_RESETRG = 40105
INTEGER, PARAMETER :: IDD_CHKOPT = 142
INTEGER, PARAMETER :: ID_ITEM103 = 40107
INTEGER, PARAMETER :: ID_SECGRP = 40108
INTEGER, PARAMETER :: IDD_SETSEL = 144
INTEGER, PARAMETER :: ID_SELPR = 40109
INTEGER, PARAMETER :: IDD_CHK1DOPT = 145
INTEGER, PARAMETER :: ID_VROTATE = 40110
INTEGER, PARAMETER :: id_mchck = 40111
INTEGER, PARAMETER :: ID_MOVMESH = 40112
INTEGER, PARAMETER :: IDD_DIALOG047 = 146
INTEGER, PARAMETER :: IDD_DIALOG048 = 147
INTEGER, PARAMETER :: ID_SELELTYP = 40113
INTEGER, PARAMETER :: IDD_SELELTYP = 149
INTEGER, PARAMETER :: ID_OPENGP = 40114
INTEGER, PARAMETER :: ID_SAVGP = 40115
INTEGER, PARAMETER :: IDF_RADIO19 = 1063
INTEGER, PARAMETER :: ID_IGPN = 40116
INTEGER, PARAMETER :: ID_IGPC = 40117
INTEGER, PARAMETER :: ID_DISPTYP = 40118
INTEGER, PARAMETER :: ID_TRANSFORM = 40119
INTEGER, PARAMETER :: IDD_TRANSFORM = 151
INTEGER, PARAMETER :: ID_deletelm = 40120
INTEGER, PARAMETER :: IDD_ELTERR2 = 152
INTEGER, PARAMETER :: ID_FORM2D = 40121
INTEGER, PARAMETER :: ID_JOINALL = 40122
INTEGER, PARAMETER :: ID_MOVGRP = 40123
INTEGER, PARAMETER :: ID_CRGRID = 40124
INTEGER, PARAMETER :: IDD_GENBLK = 155
INTEGER, PARAMETER :: ID_SETUPLEV = 40125
INTEGER, PARAMETER :: IDD_SETWRS = 156
INTEGER, PARAMETER :: ID_findnode = 40126
INTEGER, PARAMETER :: ID_findelem = 40127
INTEGER, PARAMETER :: IDD_FORMLINE = 157
INTEGER, PARAMETER :: ID_FILLAGAP = 40129
INTEGER, PARAMETER :: IDD_MATTYP = 158
INTEGER, PARAMETER :: ID_ITEM126 = 40130
INTEGER, PARAMETER :: ID_SETTYPLEV = 40131
INTEGER, PARAMETER :: IDD_LEVSETTYP = 159
INTEGER, PARAMETER :: ID_Complex = 40132
INTEGER, PARAMETER :: ID_attach = 40133
INTEGER, PARAMETER :: IDD_CHSTYP = 161
INTEGER, PARAMETER :: ID_SAVSHP = 40128
INTEGER, PARAMETER :: ID_ADDMAP = 40134
INTEGER, PARAMETER :: ID_OUTLINFL = 40135
INTEGER, PARAMETER :: ID_GETSTRESSFIL = 40136
INTEGER, PARAMETER :: IDD_FBED = 162
INTEGER, PARAMETER :: IDD_SETYRDT = 163
INTEGER, PARAMETER :: ID_SMOOTHMAP = 40137
INTEGER, PARAMETER :: IDD_GETINTR = 164
INTEGER, PARAMETER :: ID_RVSDIAG = 40138
INTEGER, PARAMETER :: ID_TESTOUT = 40139
INTEGER, PARAMETER :: ID_LOADELTLD = 40140
INTEGER, PARAMETER :: ID_SHOWELTLD = 40141
INTEGER, PARAMETER :: IDD_CHOOSEMODEL = 165
INTEGER, PARAMETER :: IDD_SETUPELDISP = 166
INTEGER, PARAMETER :: ID_SAVELTLD = 40142
INTEGER, PARAMETER :: ID_RESHOWELTLD = 40143
INTEGER, PARAMETER :: ID_ASSIGNELTLD = 40144
INTEGER, PARAMETER :: ID_FILLTR = 40145
INTEGER, PARAMETER :: IDD_FTRIAN = 167
INTEGER, PARAMETER :: ID_addmeshtr = 40146
INTEGER, PARAMETER :: ID_UNDOGEN = 40147
INTEGER, PARAMETER :: IDD_GETFL = 168
INTEGER, PARAMETER :: ID_DDRAW = 40148

@ -0,0 +1,451 @@
SUBROUTINE SUPERT(XPT,YPT,NVERT)
USE BLKMAP
! INCLUDE 'BLK1.COM'
REAL*8 XPT(*),YPT(*)
REAL*8 XMINM,YMINM,X45
DATA VDX9/-9.E9/
! Find minimum x and y
xminm=1.e20
yminm=1.e20
x45=-1.e20
DO J=1,NVERT
IF(XPT(J) .GT. VDX9) THEN
if(xminm .GT. XPT(j) ) then
xminm=XPT(j)
end if
IF(yminm .GT. YPT(j)) then
yminm=YPT(j)
endif
ENDIF
ENDDO
! Find max at 45 degrees
DO J=1,NVERT
IF(XPT(J) .GT. VDX9) THEN
X45T=((XPT(J)-XMINM)+(YPT(J)-YMINM))/1.414
IF(x45 .LT. X45T) THEN
X45=X45T
ENDIF
ENDIF
END DO
XPT(NVERT+1)=XMINM-5
YPT(NVERT+1)=YMINM-5.
XPT(NVERT+2)=XMINM+1.414*X45+10.
YPT(NVERT+2)=YMINM-5.
XPT(NVERT+3)=XMINM-5.
YPT(NVERT+3)=YMINM+1.414*X45+10.
NELT=1
NOPEL(1,1)=NVERT+1
NOPEL(1,2)=NVERT+2
NOPEL(1,3)=NVERT+3
NVERT=NVERT+3
CALL CCENTRE(XPT(NOPEL(1,1)),XPT(NOPEL(1,2)),XPT(NOPEL(1,3)) &
&,YPT(NOPEL(1,1)),YPT(NOPEL(1,2)),YPT(NOPEL(1,3)) &
&,XCEN(1),YCEN(1),RADS(1))
RETURN
END SUBROUTINE
SUBROUTINE INSIDCIRC(XPT,YPT,J,N,ISWT)
! Test for point inside circumcircle
USE BLKMAP
! INCLUDE 'BLK1.COM'
REAL*8 XPT(*),YPT(*)
REAL*8 DISQ
! Get the distance for this element
DISQ=(XCEN(J)-XPT(N))**2+(YCEN(J)-YPT(N))**2
! Test against the radius
IF(DISQ .GT. RADS(J)*RADS(J)) THEN
ISWT=0
ELSE
ISWT=1
ENDIF
RETURN
END SUBROUTINE
SUBROUTINE PROCESS(J,NEDGE,NGAP)
! Drop triangle and form edge buffers
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
NEDGE=NEDGE+3
IEDGE(NEDGE-2,1)=NOPEL(J,1)
IEDGE(NEDGE-1,1)=NOPEL(J,2)
IEDGE(NEDGE,1) =NOPEL(J,3)
IEDGE(NEDGE-2,2)=NOPEL(J,2)
IEDGE(NEDGE-1,2)=NOPEL(J,3)
IEDGE(NEDGE,2) =NOPEL(J,1)
NOPEL(J,1)=0
NOPEL(J,2)=0
NOPEL(J,3)=0
NGAP=NGAP+1
IGAP(NGAP)=J
RETURN
END SUBROUTINE
SUBROUTINE FORMT(XPT,YPT,J,N,NGAP,K,WD)
! Form the triangle
USE BLKMAP
REAL*8 XPT(*),YPT(*)
REAL WD(*)
! INCLUDE 'BLK1.COM'
IF(NGAP .GT. 0) THEN
K=IGAP(NGAP)
NGAP=NGAP-1
ELSE
NELTS=NELTS+1
K=NELTS
ENDIF
NOPEL(K,1)=IEDGE(J,1)
NOPEL(K,2)=IEDGE(J,2)
NOPEL(K,3)=N
CALL TESTANG(XPT,YPT,K,WD)
! Now get circumcircle data
CALL CCENTRE(XPT(NOPEL(K,1)),XPT(NOPEL(K,2)),XPT(NOPEL(K,3)) &
&,YPT(NOPEL(K,1)),YPT(NOPEL(K,2)),YPT(NOPEL(K,3)) &
&,XCEN(K),YCEN(K),RADS(K))
RETURN
END SUBROUTINE
SUBROUTINE CCENTRE(X1,X2,X3,Y1,Y2,Y3,XC,YC,RC)
! get circumcentre and radius
REAL*8 X1,Y1,X2,Y2,X3,Y3,A,B,C,D,AF,R1,R2,RC,XC,YC
A=X2-X1
B=Y2-Y1
C=X3-X1
D=Y3-Y1
AF=2.*(B*C-A*D)
R1=(-D*(A**2+B**2) + B*(C**2+D**2))/AF
R2=( C*(A**2+B**2) - A*(C**2+D**2))/AF
RC=SQRT(R1**2+R2**2)
XC=X1+R1
YC=Y1+R2
RETURN
END SUBROUTINE
SUBROUTINE RIDPOINT(NVERT)
USE BLKMAP
NCOUNT=0
DO N=1,NELTS
DO K=1,3
IF(NOPEL(N,K) .GT. NVERT-3) THEN
DO L=1,3
NOPEL(N,L)=0
ENDDO
GO TO 500
ENDIF
ENDDO
NCOUNT=NCOUNT+1
DO K=1,3
NOPEL(NCOUNT,K)=NOPEL(N,K)
ENDDO
XCEN(NCOUNT)=XCEN(N)
YCEN(NCOUNT)=YCEN(N)
RADS(NCOUNT)=RADS(N)
500 CONTINUE
ENDDO
NELTS=NCOUNT
RETURN
END
SUBROUTINE SORTDB(A,NKEY,N)
!*********************************** .....SORT.....
!-
!......SORT IS A SIMPLE SHELL SORT ROUTINE IN DOUBLE PRECISION
!-
! SHELL SORT
SAVE
!
!IPK JAN94 INTEGER*2 NKEY
REAL*8 A(*)
INTEGER NKEY(*)
IF(N.LT.2) RETURN
DO 90 J=1,N
NKEY(J)=J
90 END DO
ID = N
100 ID = ID / 2
110 IB = 1
120 GO TO 200
130 IB = IB + 1
IF( IB .LE. ID ) GO TO 200
IF( ID .GT. 1 ) GO TO 100
RETURN
200 I = IB
210 K = I + ID
220 IF( A(NKEY(I)) .LE. A(NKEY(K)) ) GO TO 250
NKT = NKEY(K)
NKEY(K) = NKEY(I)
J = I
230 K = J - ID
IF( K .LT. 1 ) GO TO 240
IF( A(NKT) .GT. A(NKEY(K)) ) GO TO 240
NKEY(J) = NKEY(K)
J = K
GO TO 230
240 NKEY(J) = NKT
250 I = I + ID
IF( I + ID .LE. N ) GO TO 210
GO TO 130
END
SUBROUTINE SETEDG(NEDGE)
USE BLKMAP
! Setup to form new triangles
DO J=1,NEDGE
IF(J .LT. NEDGE) THEN
DO K=J+1,NEDGE
IF(IEDGE(K,1) .EQ. IEDGE(J,1)) THEN
IF(IEDGE(K,2) .EQ. IEDGE(J,2)) THEN
IEDGE(J,1)=0
IEDGE(J,2)=0
IEDGE(K,1)=0
IEDGE(K,2)=0
ENDIF
ELSEIF(IEDGE(K,1) .EQ. IEDGE(J,2)) THEN
IF(IEDGE(K,2) .EQ. IEDGE(J,1)) THEN
IEDGE(J,1)=0
IEDGE(J,2)=0
IEDGE(K,1)=0
IEDGE(K,2)=0
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
RETURN
END
SUBROUTINE TESTANG(XPT,YPT,K,WD)
USE BLKMAP
REAL*8 XPT(*),YPT(*)
REAL WD(*)
DATA PI/3.14159/
! IF(WD(NOPEL(K,1)) .EQ. WD(NOPEL(K,2)) .and. wd(nopel(k,1)) .gt. -9990. ) THEN
! RETURN
! ENDIF
!
IFD=0
DO N=1,NELTS
IF(N .NE. K) THEN
DO J=1,3
IF(NOPEL(K,1) .EQ. NOPEL(N,J)) THEN
IF(J .GT. 1) THEN
IF(NOPEL(K,2) .EQ. NOPEL(N,J-1)) THEN
IFD=N
ISIDE=J
GO TO 400
ENDIF
ELSE
IF(NOPEL(K,2) .EQ. NOPEL(N,3)) THEN
IFD=N
ISIDE=J
GO TO 400
ENDIF
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
RETURN
400 CONTINUE
J1=ISIDE+1
IF(J1 .GT. 3) J1=1
!
! IF(WD(NOPEL(K,3)) .EQ. WD(NOPEL(IFD,J1)) .and. wd(nopel(k,1)) .gt. -9990. ) THEN
! WRITE(148,'(12I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
! IF(NELTS .GT. 20) WRITE(148,'(12I8)') NOPEL(21,1),NOPEL(21,2),NOPEL(21,3)
! NOPEL(IFD,1)=NOPEL(K,3)
! NOPEL(IFD,2)=NOPEL(K,1)
! NOPEL(IFD,3)=NOPEL(IFD,J1)
! NOPEL(K,1)=NOPEL(IFD,3)
!
! WRITE(148,'(12I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
! IF(NELTS .GT. 20) WRITE(148,'(12I8)') NOPEL(21,1),NOPEL(21,2),NOPEL(21,3)
!
! CALL CCENTRE(XPT(NOPEL(IFD,1)),XPT(NOPEL(IFD,2)),XPT(NOPEL(IFD,3)) &
!& ,YPT(NOPEL(IFD,1)),YPT(NOPEL(IFD,2)),YPT(NOPEL(IFD,3)) &
!& ,XCEN(IFD),YCEN(IFD),RADS(K))
! CALL CCENTRE(XPT(NOPEL(K,1)),XPT(NOPEL(K,2)),XPT(NOPEL(K,3)) &
!& ,YPT(NOPEL(K,1)),YPT(NOPEL(K,2)),YPT(NOPEL(K,3)) &
!& ,XCEN(K),YCEN(K),RADS(K))
!
! RETURN
! ENDIF
A1=ATAN2(YPT(NOPEL(K,1))-YPT(NOPEL(K,3)),XPT(NOPEL(K,1))-XPT(NOPEL(K,3)))
A2=ATAN2(YPT(NOPEL(K,2))-YPT(NOPEL(K,3)),XPT(NOPEL(K,2))-XPT(NOPEL(K,3)))
IF(A1 .LT. 0) A1=A1+2.*PI
IF(A2 .LT. 0) A2=A2+2.*PI
DIFFA=A2-A1
! WRITE(148,*) 'DIFFA',K,DIFFA,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3)
IF(DIFFA .LT. 0) DIFFA=DIFFA+PI*2.
IF(DIFFA .LT. 2./3.*PI) RETURN
! WRITE(148,'(9I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
B1=ATAN2(YPT(NOPEL(IFD,J1))-YPT(NOPEL(K,2)),XPT(NOPEL(IFD,J1))-XPT(NOPEL(K,2)))
B2=ATAN2(YPT(NOPEL(K, 3))-YPT(NOPEL(K,2)),XPT(NOPEL(K, 3))-XPT(NOPEL(K,2)))
IF(B1 .LT. 0) B1=B1+2.*PI
IF(B2 .LT. 0) B2=B2+2.*PI
DIFFB=B2-B1
! WRITE(148,*) 'DIFFB',DIFFB,B2,B1
IF(DIFFB .LT. 0) DIFFB=DIFFB+2.*PI
IF(DIFFB .GT. DIFFA) RETURN
C1=ATAN2(YPT(NOPEL(K, 3))-YPT(NOPEL(K,1)),XPT(NOPEL(K, 3))-XPT(NOPEL(K,1)))
C2=ATAN2(YPT(NOPEL(IFD,J1))-YPT(NOPEL(K,1)),XPT(NOPEL(IFD,J1))-XPT(NOPEL(K,1)))
IF(C1 .LT. 0) C1=C1+2.*PI
IF(C2 .LT. 0) C2=C2+2.*PI
DIFFC=C2-C1
! WRITE(148,*) 'DIFFC',DIFFC,C2,C1
IF(DIFFC .LT. 0) DIFFC=DIFFC+2.*PI
IF(DIFFC .GT. DIFFA) RETURN
NOPEL(IFD,1)=NOPEL(K,3)
NOPEL(IFD,2)=NOPEL(K,1)
NOPEL(IFD,3)=NOPEL(IFD,J1)
NOPEL(K,1)=NOPEL(IFD,3)
! WRITE(148,'(9I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
CALL CCENTRE(XPT(NOPEL(IFD,1)),XPT(NOPEL(IFD,2)),XPT(NOPEL(IFD,3)) &
&,YPT(NOPEL(IFD,1)),YPT(NOPEL(IFD,2)),YPT(NOPEL(IFD,3)) &
&,XCEN(IFD),YCEN(IFD),RADS(IFD))
RETURN
END
SUBROUTINE TESTTR(XPT,YPT,K,WD)
USE BLKMAP
REAL WD(*)
REAL*8 XPT(*),YPT(*)
DATA PI/3.14159/
IF(WD(NOPEL(K,1)) .EQ. WD(NOPEL(K,2)) .and. wd(nopel(k,1)) .gt. -9990. ) THEN
RETURN
ENDIF
IFD=0
DO N=1,NELTS
IF(N .NE. K) THEN
DO J=1,3
IF(NOPEL(K,2) .EQ. NOPEL(N,J)) THEN
IF(J .GT. 1) THEN
IF(NOPEL(K,3) .EQ. NOPEL(N,J-1)) THEN
IFD=N
ISIDE=J
GO TO 400
ENDIF
ELSE
IF(NOPEL(K,3) .EQ. NOPEL(N,3)) THEN
IFD=N
ISIDE=J
GO TO 400
ENDIF
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
RETURN
400 CONTINUE
WRITE(148,'(9I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
write(148,'(9x,6f8.0)')wd(NOPEL(K,1)),wd(NOPEL(K,2)),wd(NOPEL(K,3)),wd(NOPEL(IFD,1)),wd(NOPEL(IFD,2)),wd(NOPEL(IFD,3))
J1=ISIDE+1
IF(J1 .GT. 3) J1=1
WRITE(148,*) J1
IF(WD(NOPEL(K,1)) .EQ. WD(NOPEL(IFD,J1)) .and. wd(nopel(k,1)) .gt. -9990. ) THEN
ITEMP=NOPEL(IFD,J1)
NOPEL(IFD,1)=NOPEL(K,3)
NOPEL(IFD,2)=NOPEL(K,1)
NOPEL(IFD,3)=ITEMP
NOPEL(K,1)=NOPEL(IFD,3)
WRITE(148,'(9I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
CALL CCENTRE(XPT(NOPEL(IFD,1)),XPT(NOPEL(IFD,2)),XPT(NOPEL(IFD,3)) &
& ,YPT(NOPEL(IFD,1)),YPT(NOPEL(IFD,2)),YPT(NOPEL(IFD,3)) &
& ,XCEN(IFD),YCEN(IFD),RADS(IFD))
RETURN
ENDIF
A1=ATAN2(YPT(NOPEL(K,2))-YPT(NOPEL(K,1)),XPT(NOPEL(K,2))-XPT(NOPEL(K,1)))
A2=ATAN2(YPT(NOPEL(K,3))-YPT(NOPEL(K,1)),XPT(NOPEL(K,3))-XPT(NOPEL(K,1)))
IF(A1 .LT. 0) A1=A1+2.*PI
IF(A2 .LT. 0) A2=A2+2.*PI
DIFFA=A2-A1
! WRITE(148,*) 'DIFFA',K,DIFFA,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3)
IF(DIFFA .LT. 0) DIFFA=DIFFA+PI*2.
IF(DIFFA .LT. 2./3.*PI) RETURN
B1=ATAN2(YPT(NOPEL(IFD,J1))-YPT(NOPEL(K,3)),XPT(NOPEL(IFD,J1))-XPT(NOPEL(K,3)))
B2=ATAN2(YPT(NOPEL(K, 1))-YPT(NOPEL(K,3)),XPT(NOPEL(K, 1))-XPT(NOPEL(K,3)))
IF(B1 .LT. 0) B1=B1+2.*PI
IF(B2 .LT. 0) B2=B2+2.*PI
DIFFB=B2-B1
! WRITE(148,*) 'DIFFB',DIFFB,B2,B1
IF(DIFFB .LT. 0) DIFFB=DIFFB+2.*PI
IF(DIFFB .GT. DIFFA) RETURN
C1=ATAN2(YPT(NOPEL(K, 1))-YPT(NOPEL(K,2)),XPT(NOPEL(K, 1))-XPT(NOPEL(K,2)))
C2=ATAN2(YPT(NOPEL(IFD,J1))-YPT(NOPEL(K,2)),XPT(NOPEL(IFD,J1))-XPT(NOPEL(K,2)))
IF(C1 .LT. 0) C1=C1+2.*PI
IF(C2 .LT. 0) C2=C2+2.*PI
DIFFC=C2-C1
! WRITE(148,*) 'DIFFC',DIFFC,C2,C1
IF(DIFFC .LT. 0) DIFFC=DIFFC+2.*PI
IF(DIFFC .GT. DIFFA) RETURN
ITEMP=NOPEL(IFD,J1)
NOPEL(IFD,1)=NOPEL(K,1)
NOPEL(IFD,2)=NOPEL(K,2)
NOPEL(IFD,3)=ITEMP
NOPEL(K,2)=NOPEL(IFD,3)
! WRITE(148,'(9I8)') K,J,IFD,NOPEL(K,1),NOPEL(K,2),NOPEL(K,3),NOPEL(IFD,1),NOPEL(IFD,2),NOPEL(IFD,3)
CALL CCENTRE(XPT(NOPEL(IFD,1)),XPT(NOPEL(IFD,2)),XPT(NOPEL(IFD,3)) &
&,YPT(NOPEL(IFD,1)),YPT(NOPEL(IFD,2)),YPT(NOPEL(IFD,3)) &
&,XCEN(IFD),YCEN(IFD),RADS(IFD))
RETURN
END

@ -0,0 +1,264 @@
SUBROUTINE TRIANG
USE WINTERACTER
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
DATA VOID10/-1.E10/,SPAC/0.0/
NELTS=0
NVERT=MAXPTS
NINTV=1
CALL TRIANOPT(NINTV,SPAC)
! FIRST WRITE EXISTING MAP TO SCRATCH
OPEN(99,FORM='BINARY',STATUS='SCRATCH')
CALL WRTMAP(99)
REWIND 99
DO N=1,NVERT
IF(MOD(N-1,NINTV) .EQ. 0) THEN
IMAP(N)=1
ELSE
IMAP(N)=0
ENDIF
ENDDO
IF(SPAC .GT. 0.) THEN
DO N=1,NVERT
IF(IMAP(N) .EQ. 1) THEN
IF(N .LT. NVERT) THEN
DO M=N+1,NVERT
DISQ=(XMAP(M)-XMAP(N))**2+(YMAP(M)-YMAP(N))**2
IF(DISQ .LT. SPAC**2) THEN
IMAP(M)=0
ENDIF
ENDDO
ENDIF
ENDIF
ENDDO
ENDIF
NN=0
DO N=1,NVERT
IF(IMAP(N) .GT. 0) THEN
NN=NN+1
XMAP(NN)=XMAP(N)
YMAP(NN)=YMAP(N)
IMAP(NN)=IMAP(N)
ENDIF
ENDDO
NVERT=NN
! WRITE(185,*) 'NEW NVERT',NVERT
call WcursorShape(CurHourGlass)
CALL DELAUNAY(NVERT)
call WcursorShape(CurArrow)
RETURN
END
! Last change: IPK 2 Feb 2003 6:25 pm
SUBROUTINE DELAUNAY(NVERT)
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*80 LIND
CHARACTER*1 ANS
DATA VDX9/-9.E9/,NEDGE/0/
! Get location of supertriangle
iprt=0
ngap=0
YLV=7.5
call supert(XMAP,YMAP,NVERT)
NELTS=1
NVERTM=NVERT-3
IF(NVERT .GT. MAXP) THEN
DEALLOCATE (NKEY)
ALLOCATE (NKEY(NVERT))
NKEY=0
ENDIF
! Sort points into ascending x order
CALL SORTDB(XMAP,NKEY,NVERTM)
! Loop on the vertices
DO NN=1,NVERT-3
! IF(MOD(NN,5) .EQ. 0) WRITE(185,*) 'LOOP',NN
if(mod(NN,2500) .eq. 0) then
WRITE(90,*) NN,' points processed'
ylv=ylv-0.3
if(ylv .lt. 0.1) then
ylv=7.9
call clscrn
endif
write(lind,6010) NN
6010 format(i8,' points processed')
call symbl &
& (1.1,ylv,0.20,LIND,0.0,80)
endif
! process next point
N=NKEY(NN)
! Skip out if inactive point
IF(N .EQ. 0) GO TO 500
IF(IMAP(N) .EQ. 0) GO TO 500
IF(XMAP(N) .LT. VDX9) GO TO 500
IF(VAL(N) .LT. -9000.) GO TO 500
! IF(NN .GT. 1700. .AND. MOD(NN,5) .EQ. 0) WRITE(185,*) 'N',N,IMAP(N),XMAP(N),VAL(N)
! WRITE(45,*) NN,N,NVERT,XMAP(N),YMAP(N)
IF(NN .LT. NVERTM) THEN
DO KK=NN+1,NVERTM
K=NKEY(KK)
! IF(NN .GT. 1700) WRITE(185,*) 'NKEY',K,KK
IF(K .NE. 0) THEN
IF(XMAP(N) .EQ. XMAP(K)) THEN
IF(YMAP(N) .EQ. YMAP(K)) THEN
WRITE(45,*) 'IDENT',N,K
NKEY(KK)=0
ENDIF
ELSE
GO TO 200
ENDIF
ENDIF
200 CONTINUE
ENDDO
ENDIF
! Set edge buffers to zero
! IF(NN .GT. 1700 .AND. MOD(NN,5) .EQ. 0) WRITE(185,*) 'AFTER 200 NEDGE',NEDGE
IF(NEDGE .GT. 0) THEN
DO J=1,NEDGE
IEDGE(J,1)=0
IEDGE(J,2)=0
END DO
ELSE
DO J=1,100
IEDGE(J,1)=0
IEDGE(J,2)=0
END DO
ENDIF
NEDGE=0
! test for point in circumcircle
DO J=1,NELTS
CALL INSIDCIRC(XMAP,YMAP,J,N,ISWT)
! If inside process edges
IF(ISWT .EQ. 1) THEN
CALL PROCESS(J,NEDGE,NGAP)
ENDIF
END DO
! Setup to form new triangles
CALL SETEDG(NEDGE)
! Now form triangles as needed
DO J=1,NEDGE
IF(IEDGE(J,1) .NE. 0) THEN
CALL FORMT(XMAP,YMAP,J,N,NGAP,KK,WD)
ENDIF
END DO
NEDGE=0
if(iprt .eq. 0) go to 500
DO J=1,NELTS
IF(NOPEL(J,1) .GT. 0) THEN
WRITE(3,'(2i5,2i10,19x,''1'')') J,(NOPEL(J,K),K=1,3)
ENDIF
END DO
IF(NN .EQ. 1) THEN
write(41,'('' 9999'')')
do j=1,nvert
write(41,'(i10,2f20.4,F10.3)') j,XMAP(j),YMAP(j),VAL(J)
enddo
write(41,'('' 9999'')')
write(41,'('' 9999'')')
write(41,'('' 0 NENTRY'')')
write(41,'('' 0 NCLM'')')
WRITE(41,'(''ENDDATA'')')
ENDIF
500 continue
END DO
! Get rid of elements from super point
CALL RIDPOINT(NVERT)
RETURN
END SUBROUTINE
SUBROUTINE TRIANOPT(NINTV,SPAC)
USE WINTERACTER
include 'd.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: NINTV
INTEGER :: IERR
REAL :: SPAC
CHARACTER*1 :: IFLAG
call wdialogload(IDD_TRIAN)
ierr=infoerror(1)
CALL WDialogSelect(IDD_TRIAN)
ierr=infoerror(1)
CALL WDialogPutInteger(IDF_INTEGER1,NINTV)
CALL WDialogPutReal(IDF_REAL1,SPAC)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,NINTV)
IF(NINTV .EQ. 0) NINTV=1
CALL WDialogGetREAL(IDF_REAL1,SPAC)
ELSE
SPAC=0.0
NINTV=1
ENDIF
RETURN
enddo
RETURN
END

@ -0,0 +1,45 @@
SUBROUTINE DEMOS
USE BLK1MOD
! INCLUDE 'BLK1.COM'
COMMON /RECOD/ IRECD,TSPC
COMMON /PAGE/ XL,XH,YL,YH
common /cols/ ibakk,icolr,iblkk
CHARACTER*255 FNAME
CHARACTER*40 LIND,dlin
xl=0.
yl=0.
xh=HSIZE
yh=8.0
ibakk=8
icolr=11
iblkk=14
OPEN(75,FILE='DINFO.OUT',FORM='FORMATTED',STATUS='UNKNOWN')
WRITE(75,*) 'IN DEMOS'
FNAME='RECORD.REC'
OPEN(9,FILE='PALMIS.MAP',STATUS='OLD', FORM='FORMATTED')
IMP=9
IIN=0
OPEN(91,FILE=FNAME,STATUS='OLD')
CALL RBLUE
nmess=45
call getfpn(tspc)
! WRITE(LIND,6005)
! 6005 FORMAT('Enter time interval between events')
! call symbl(1.1,3.5,0.25,LIND,0.0,80)
! ndig=32
! CALL GTFPNX(TSPC,NDEC,NDIG,5.0,6.0)
! write(75,'(a)') 'demos-lind',lind
! call get_label(lind,dlin)
! write(75,'(a)') 'label',dlin
! read(dlin,'(f20.2)') tspc
IRECD=2
WRITE(75,*) 'tspc', tspc
RETURN
END

@ -0,0 +1,306 @@
SUBROUTINE dograph(noptt,icurrwin)
!!!!!! (XVALUES,YVALUES,NVALUES,XMIN,XMAX,VALMIN,YMAX)
!
! Graph plotting code generated by GraphEd at 21:20 on 11 Apr 1999.
!
! XVALUES = Array of X values to plot
! YVALUES = Array of Y values to plot
! NVALUES = Number of values
! TIMMIN = Min X
! TIMMAX = Max X
! VALMIN = Min Y
! VALMAX = Max Y
!
!
! USE module containing routine definitions and symbolic names.
!
USE WINTERACTER
!
!
! Common arguments.
!
CHARACTER*6 DESCR
CHARACTER*48 XLABEL, YYLABEL
CHARACTER*48 PTITL
CHARACTER*4 AXTYPE, YAXTYPE
COMMON /XYGRPH/ XVALUES(10000,10),YVALUES(10000,10),TIMMIN,VALMIN,TIMMAX,VALMAX,NVALUES,NSETS,LINPROP(10)
COMMON /PAXC/ PTITL,AXTYPE,XLABEL,YAXTYPE,YYLABEL
COMMON /HEDS1/ NWINDWS,IWNDWS(10),ISCRNS(10),DESCR(10)
COMMON /HEDS/ NP,NE,NHTP,NMESS,NBRR,IPSW(15),IRMAIN,ISCRN,icolon(12),IQSW(2),IRDISP,ntempin,igfgsw,igfgswb,ICRIN,IPW1,WIDEL,WIDSCL,itrianout
CHARACTER*80 TITLE
CHARACTER*24 HLABL
character*40 mpnam
CHARACTER*1 ALABL(10)
COMMON /BLKA1/ TITLE,HLABL,ALABL,MPNAM
character*8 labl
character*72 data
CHARACTER*20 TITL1,TITL4
CHARACTER*64 TITL2,TITL3
COMMON /BLKA11/ TITL1,TITL2,TITL3,TITL4&
, labl(400),data(400)
!IPK JAN03
INTEGER IHANDLE1
! REAL, INTENT(IN), DIMENSION(NVALUES) :: XVALUES
! REAL, INTENT(IN), DIMENSION(NVALUES) :: YVALUES
! REAL TIMMIN,TIMMAX,VALMIN,VALMAX
! INTEGER NVALUES
nopt=abs(noptt)
WRITE(90,*) 'IN DOGRAPH',NOPT,icurrwin
! nopt = 999 skip to draw current page
! nopt = -2 skip to draw current page
! nopt = 2 draw time plots
! nopt = 4 from brkarea
if(nopt .eq. 999) go to 300
IF(NOPTT .EQ. -2) GO TO 300
if(nopt .ne. 3) then
! do this only for nopt = 4 or nopt = 2 first search for empty window
do n=1,nwindws
if(iwndws(n) .eq. 0) then
icurrwin=n
go to 290
endif
enddo
! or increase window count
nwindws=nwindws+1
if(nwindws .eq. 10) then
call WMessageBox(0,3,1,'Warning 10 windows now open','WARNING')
IF(WInfoDialog(4) .eq. 1) then
ENDIF
endif
icurrwin=nwindws
290 continue
else
! do this for nopt = 3 ie
! draw the bitmap in icurrwin and return
call backp(2,icurrwin)
return
endif
!ipk jan03
! if no window defined yet open a child window for it and give it a handle
IF(Iwndws(icurrwin) .EQ. 0) THEN
CALL WindowOpenChild(IHANDLE1,FLAGS=SysMenuOn+MinButton+MaxButton, &
TITLE='Cross-Section')
Iwndws(icurrwin)=ihandle1
ENDIF
! setup to draw bitmap in icurrwin
CALL BACKP(1,icurrwin)
300 continue
!
! Start new presentation graphics plot
!
! CALL IPgNewGraph(NSETS,NVALUES,' ',' ','X')
CALL IPgNewPlot(6,nsets,nvalues)
!
! Set Clipping Rectangle
!
CALL IPgClipRectangle('G')
!
! Set style for each data set
!
! CALL IPgStyle( 1, 0, 0, 0,223, 96)
! CALL IPgStyle( 2, 1, 0, 0, 31,128)
! CALL IPgStyle( 3, 2, 0, 0,159,160)
! CALL IPgStyle( 4, 3, 0, 0, 95,192)
! CALL IPgStyle( 5, 5, 0, 0,223,224)
ICL=255+256*255+256*256*255
IF(LINPROP(1) .EQ. 0) THEN
CALL IPgStyle( 1, 0, 0, 0,223,195)
ELSE
CALL IPgStyle( 1, 0, 3, 0,ICL,195)
ENDIF
IF(LINPROP(2) .EQ. 0) THEN
CALL IPgStyle( 2, 1, 0, 0,33405,33405)
ELSE
CALL IPgStyle( 2, 1, 3, 0,ICL,33405)
ENDIF
IF(LINPROP(3) .EQ. 0) THEN
CALL IPgStyle( 3, 2, 0, 0,8551680,8551680)
ELSE
CALL IPgStyle( 3, 2, 3, 0,ICL,8551680)
ENDIF
IF(LINPROP(4) .EQ. 0) THEN
CALL IPgStyle( 4, 3, 0, 0,65415,65415)
ELSE
CALL IPgStyle( 4, 3, 3, 0,ICL,65415)
ENDIF
IF(LINPROP(5) .EQ. 0) THEN
CALL IPgStyle( 5, 5, 0, 0,0,0)
ELSE
CALL IPgStyle( 5, 5, 3, 0,ICL,0)
ENDIF
!
! Set marker number for data sets not using default marker
!
CALL IPgMarker( 1, 1)
CALL IPgMarker( 2, 2)
CALL IPgMarker( 3, 2)
CALL IPgMarker( 4, 2)
CALL IPgMarker( 5, 2)
!
! Set units for plot
!
CALL IPgUnits( TIMMIN, VALMIN, TIMMAX, VALMAX)
!
! Set presentation graphics area
!
CALL IPgArea( .150, .100, .900, .800)
!
! Draw main title
!
CALL IGrCharSet('H')
CALL IGrCharFont( 1)
CALL IGrCharSpacing('F')
CALL IGrCharSize( 0.67, 0.67)
CALL IGrColourN( 208)
CALL IPgTitle('CROSS-SECTION','C')
!
! Label bottom X axis
!
CALL IPgXLabelPos( .70)
CALL IPgXLabel('Section Dimension','C')
!
! Label left Y axis
!
CALL IPgYLabelPos( .80)
CALL IPgYLabelLeft('Elevation','C9')
!
! Draw axes
!
CALL IGrColourN( 208)
CALL IPgAxes(TIMMIN,VALMIN)
!
! Adjust tick position for X Axes
!
CALL IPgXTickPos(VALMIN,VALMAX)
!DEC09 CALL IPgXTickPos(1,TIMMIN)
!
! Scale for bottom X Axis
!
CALL IPgXUserScale((/0.0/),0)
CALL IPgXScaleAngle( .00, .00)
CALL IPgXScalePos( .38)
CALL IPgXScale('NT')
!
! Adjust tick position for Y Axes
!
CALL IPgYTickPos( TIMMIN , TIMMAX )
!DEC09 CALL IPgYTickPos( 1,VALMIN)
!DEC09 ISIDE=1
!DEC09 CALL IPgYTickPos( ISIDE,TIMMAX)
! Scale for left Y Axis
!
CALL IPgYUserScale((/0.0/),0)
CALL IPgYScaleAngle( .00, .00)
CALL IPgYScalePos( 1.50)
CALL IPgYScaleLeft('NT')
!
! Draw graph.
!
DO ISET = 1,NSETS
CALL IPgXYPairs(XVALUES(1,iset),YVALUES(1,ISET))
END DO
call IPgKeyAll(DESCR,' ')
! CALL SYMBL(0.1,7.60,0.18,TITL2,0.0,+64)
if(nopt .ne. 999 .and. NOPTT .NE. -2) CALL BACKP(2,icurrwin)
RETURN
END SUBROUTINE dograph
SUBROUTINE BACKP(IENT,icurrwin)
! ient = 1 means either set to draw bitmap or create window for plotting ihandle(icurrwin)
! then select to draw bitmap
! ient = 2 means select drawing of window and putting the bitmap into it, folloed by return
! to main window
! ient = 3 means destroy slected window
use winteracter
implicit none
include 'D.INC'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: iw,ih,ihandle,ient,icurrwin,ihandlem
common /handP/ ihandle(10)
! write(128,*) 'ient',ient,icurrwin,ihandle(icurrwin)
if(ient .eq. 1) then
iw=WinfoWindow(WindowWidth)
ih=WinfoWindow(WindowHeight)
IF(IHANDLE(icurrwin) .EQ. 0) THEN
call WBitmapCreate(ihandle(icurrwin),iw,ih)
call IGrSelect(DrawBitmap,ihandle(icurrwin))
ELSE
call IGrSelect(DrawBitmap,ihandle(icurrwin))
ENDIF
return
elseif(ient .eq. 2) then
call IGrSelect(DrawWin)
call WBitmapPut(ihandle(icurrwin),0,1)
!!! call WBitmapDestroy(ihandle)
ihandlem=0
call WindowSelect(ihandlem)
else
CALL WBitmapDestroy(ihandle(icurrwin))
endif
return
end
SUBROUTINE DOPLOT(IMZ)
COMMON /HEDS1/ NWINDWS,IWNDWS(10),ISCRNS(10)
if(nwindws .gt. 0) then
do n=1,nwindws
if(iscrns(n) .eq. 3) then
call WindowSelect(iwndws(n))
call clscrn
call dograph(3,n)
endif
enddo
call WindowSelect(0)
endif
RETURN
END

@ -0,0 +1,12 @@
SUBROUTINE PLOTSV(I)
RETURN
END
SUBROUTINE NDPLSV
RETURN
END
SUBROUTINE SETD(I)
RETURN
END

File diff suppressed because it is too large Load Diff

@ -0,0 +1,245 @@
!----------------------------------------------------------------elevint
subroutine elevint(XX,YY,soln)
!----------------------------------------------------------------------c
! purpose: c
! To interpolate elevation from map data. c
!----------------------------------------------------------------------c
! Input data: c
! (XX, YY) -- a coordinate
!----------------------------------------------------------------------c
! Output data: c
! soln -- elevation value c
!----------------------------------------------------------------------c
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
INTEGER LISTM,NLIST
DIMENSION NLIST(200),ADIST(200)
DIMENSION LISTM(1000),listt(60,4),nlf(4),icomp(4),xnear(4)
! common /mapc/imap(maxpl)
!
! Establish size for range
!
JS=1
K=0
KPT=0
DO 120 J=1,MAXPTS
!
! Determine how long each line is
!
MLEN=J-JS
! print *,XMAP(J),VDX,MAXPTS,MLEN,J,JS
IF(CMAP(J,1) .LT. VDX) THEN
!
! Now check it.
!
K=K+1
IF(MLEN .GT. 1) THEN
! LTP=LINTYP(K)
DO 110 M=1,MLEN
IF(VAL(JS+M-1) .GT. -9000.) THEN
KPT=KPT+1
ENDIF
110 CONTINUE
ENDIF
NMAP=J
IF(MLEN .EQ. 0) GO TO 130
JS=J+1
go to 120
ENDIF
cxcur=xmap(j)
cycur=ymap(j)
120 END DO
130 CONTINUE
!
! Estimate areal density to get 100 points
!
ADEN=AMAP*40./(FLOAT(KPT)*TXSCAL**2)
!
! Find square coverage
!
XNEARS=SQRT(ADEN)
xnearo=xnears
!
! initialize range
!
ict=0
xnears=xnearo
do nang=1,4
XNEAR(nang)=XNEARO
icomp(nang)=0
enddo
!
! set imap to zero to start or -1 if no value
!
220 continue
do n=1,nmap
if(cmap(n,1) .lt. vdx) then
imap(n)=-1
elseif(val(n) .lt. -9000.) then
imap(n)=-1
else
imap(n)=0
endif
enddo
!
! initialize list and completeness test
!
do nang=1,4
icomp(nang)=0
do n=1,50
listt(n,nang)=0
enddo
enddo
!
! start processing
!
280 continue
!
! check for completeness intialize counter
!
do nang=1,4
if(icomp(nang) .eq. 0) then
nlf(nang)=0
else
ict=ict+1
endif
enddo
!
! if ict = 4 we are done
!
if(ict .lt. 4) then
!
! loop through map points
!
DO 300 N=1,NMAP
!
! skip if no useful value
!
if(imap(n) .eq. -1) go to 300
!
! use nang if we have been through before
!
if(imap(n) .gt. 0) then
nang=imap(n)
!
! skip to end if done
!
if(icomp(nang) .eq. 1) then
go to 300
endif
!
! otherwise check range skipping out if out of range
!
d1=cmap(n,1)-XX
d2=cmap(n,2)-YY
IF(ABS(D1) .GT. XNEAR(NANG)) THEN
IMAP(N)=-1
GO TO 300
ELSEIF(ABS(D2) .GT. XNEAR(NANG)) THEN
IMAP(N)=-1
GO TO 300
ENDIF
!
! process new point checking range and setting direction
!
else
d1=cmap(n,1)-XX
d2=cmap(n,2)-YY
IF(ABS(D1) .LT. XNEAR(1)) THEN
IF(ABS(D2) .LT. XNEAR(1)) THEN
if(d1 .lt. 0) then
if(d2 .lt. 0) then
imap(n)=3
nang=3
else
imap(n)=2
nang=2
endif
elseif(d2 .lt. 0) then
imap(n)=4
nang=4
else
imap(n)=1
nang=1
endif
!
! set to skip out if out of range
!
ELSE
imap(n)=-1
go to 300
ENDIF
ELSE
imap(n)=-1
go to 300
ENDIF
endif
!
! save value if total less then 50
!
NLF(NANG)=NLF(NANG)+1
IF(NLF(NANG) .LT. 51) THEN
LISTT(NLF(NANG),NANG)=N
ENDIF
300 CONTINUE
!
! now reset range if we need to
!
ictz=0
do nang=1,4
if(nlf(nang) .gt. 50) then
rat=sqrt(45./nlf(nang))
if(rat .lt. 0.2) rat=0.2
xnear(nang)=xnear(nang)*rat
elseif(nlf(nang) .eq. 0) then
if(xnear(nang) .eq. xnears) then
ictz=ictz+1
else
icomp(nang)=1
endif
else
icomp(nang)=1
endif
enddo
if(ictz .gt. 1) then
do nang=1,4
xnear(nang)=xnear(nang)*2.
xnears=xnears*2.
enddo
if(xnear(1) .lt. 4.) then
go to 220
endif
endif
!
! go back and try again
!
go to 280
endif
!
! finished now compact list
!
nlg=0
do nang=1,4
nlim=nlf(nang)
if(nlim .eq. 0) then
nlim=50
endif
do nlgg=1,nlim
if(listt(nlgg,nang) .gt. 0) then
nlg=nlg+1
listm(nlg)=listt(nlgg,nang)
endif
enddo
enddo
!
!-----perform interpolation
!
SOLN=-9999.0
CALL GRIDIN(XX,YY,SOLN,LISTM,NLG)
return
END

@ -0,0 +1,426 @@
Subroutine EltDisp(nsw)
USE WINTERACTER
USE BLK1MOD
!
include 'd.inc'
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
!
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: N,IBOX,NN,NOOP(16),NEAC(8)
INTEGER :: IERR
CHARACTER*1 :: IFLAG
DATA N/1/
ims=0
100 continue
call wdialogload(IDD_ELTDATA)
ierr=infoerror(1)
IF(NSW .NE. 0) N=ABS(NSW)
CALL WDialogPutInteger(IDF_INTEGER1,N)
NN=N
DO N1=1,8
NOOP(N1)=NOP(N,N1)
NOOP(N1+8)=NOP(N,N1)
ENDDO
IMAAT=IMAT(N)
120 CONTINUE
CALL WDialogPutInteger(IDF_INTEGER1,N)
CALL WDialogPutInteger(IDF_INTEGER2,NOOP(1))
CALL WDialogPutInteger(IDF_INTEGER3,NOOP(2))
CALL WDialogPutInteger(IDF_INTEGER4,NOOP(3))
CALL WDialogPutInteger(IDF_INTEGER5,NOOP(4))
CALL WDialogPutInteger(IDF_INTEGER6,NOOP(5))
CALL WDialogPutInteger(IDF_INTEGER7,NOOP(6))
CALL WDialogPutInteger(IDF_INTEGER8,NOOP(7))
CALL WDialogPutInteger(IDF_INTEGER9,NOOP(8))
CALL WDialogPutInteger(IDF_INTEGER10,IMAAT)
CALL WDialogSelect(IDD_ELTDATA)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modeless)
ierr=infoerror(1)
if(ims .eq. 1) go to 200
150 CONTINUE
IF(NSW .LE. 0) THEN
call wdialogload(IDD_SELELT)
ierr=infoerror(1)
CALL WDialogPutInteger(IDF_INTEGER1,N)
CALL WDialogSelect(IDD_SELELT)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,ModaL)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
ims=1
go to 100
endif
!ipksep02
ims=1
go to 100
enddo
ELSE
call wdialogload(IDD_ELTERR)
ierr=infoerror(1)
CALL WDialogPutInteger(IDF_INTEGER1,N)
CALL WDialogSelect(IDD_ELTERR)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,ModaL)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
ims=1
go to 100
endif
!ipk sep02
ims=1
go to 100
enddo
ENDIF
200 continue
DO
CALL WMessage(ITYPE,MESSAGE)
SELECT CASE (ITYPE)
CASE (PushButton)
IF(MESSAGE%VALUE1.EQ.IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
CALL WDialogGetInteger(IDF_INTEGER2,NOOP(1))
CALL WDialogGetInteger(IDF_INTEGER3,NOOP(2))
CALL WDialogGetInteger(IDF_INTEGER4,NOOP(3))
CALL WDialogGetInteger(IDF_INTEGER5,NOOP(4))
CALL WDialogGetInteger(IDF_INTEGER6,NOOP(5))
CALL WDialogGetInteger(IDF_INTEGER7,NOOP(6))
CALL WDialogGetInteger(IDF_INTEGER8,NOOP(7))
CALL WDialogGetInteger(IDF_INTEGER9,NOOP(8))
CALL WDialogGetInteger(IDF_INTEGER10,IMAAT)
ISUM=0
DO N1=1,8
NOP(N,N1)=NOOP(N1)
ISUM=ISUM+NOOP(N1)
ENDDO
IMAT(N)=IMAAT
IF(ISUM .EQ. 0) THEN
XC(N)=VOID
YC(N)=VOID
IF(N .LT. NELAST) NELAST=N
IESKP(N)=1
NCORN(N)=0
IMAT(N)=0
ENDIF
call WDialogHide()
call wdialogUNload()
RETURN
ELSEIF(MESSAGE%VALUE1.EQ.IDNEXT) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
CALL WDialogGetInteger(IDF_INTEGER2,NOOP(1))
CALL WDialogGetInteger(IDF_INTEGER3,NOOP(2))
CALL WDialogGetInteger(IDF_INTEGER4,NOOP(3))
CALL WDialogGetInteger(IDF_INTEGER5,NOOP(4))
CALL WDialogGetInteger(IDF_INTEGER6,NOOP(5))
CALL WDialogGetInteger(IDF_INTEGER7,NOOP(6))
CALL WDialogGetInteger(IDF_INTEGER8,NOOP(7))
CALL WDialogGetInteger(IDF_INTEGER9,NOOP(8))
CALL WDialogGetInteger(IDF_INTEGER10,IMAAT)
ISUM=0
DO N1=1,8
NOP(N,N1)=NOOP(N1)
ISUM=ISUM+NOOP(N1)
ENDDO
IMAT(N)=IMAAT
IF(ISUM .EQ. 0) THEN
XC(N)=VOID
YC(N)=VOID
IF(N .LT. NELAST) NELAST=N
IESKP(N)=1
NCORN(N)=0
IMAT(N)=0
ENDIF
GO TO 150
ELSEIF(MESSAGE%VALUE1.EQ.IDF_delete) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
CALL DELTEL(N)
call WDialogHide()
call wdialogUNload()
RETURN
ELSEIF(MESSAGE%VALUE1.EQ.IDCANCEL) THEN
call WDialogHide()
call wdialogUNload()
RETURN
ELSEIF(MESSAGE%VALUE1.EQ.IDFROTATE) THEN
call WDialogHide()
call wdialogUNload()
call plotot(1)
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select starting node','CHOOSE NODE')
IBOX=1
DO K=1,8
NEAC(K)=NOP(N,K)
ENDDO
CALL PROXEL(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX,NEAC)
DO K=1,NCORN(N)
IF(NOOP(K) .EQ. INODE) THEN
LL=K-1
DO L=1,NCORN(N)
LL=LL+1
IF(NCORN(N) .EQ. 6 .AND. LL .EQ. 7) LL=LL+2
NOOP(L)=NOOP(LL)
ENDDO
IF(NCORN(N) .EQ. 6) THEN
NOOP(7)=0
NOOP(8)=0
ENDIF
call wdialogload(IDD_ELTDATA)
GO TO 120
ENDIF
enddo
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Selected node not within element','CHOOSE NODE')
call wdialogload(IDD_ELTDATA)
GO TO 120
ENDIF
END SELECT
END DO
RETURN
END
SUBROUTINE GETELMNO
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*1 IFLAG
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select element','CHOOSE ELEMENT')
IBOX=1
CALL PROX(XC,YC,NE,XX,YY,IELEM,IFLAG,IESKP,IBOX)
INEG=-IELEM
CALL ELTDISP1(INEG)
RETURN
END
Subroutine EltDisp1(nsw)
USE WINTERACTER
USE BLK1MOD
!
include 'd.inc'
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
!
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: N,IBOX,NN,NOOP(16),NEAC(8)
INTEGER :: IERR
CHARACTER*1 :: IFLAG
DATA N/1/
ims=0
100 continue
call wdialogload(IDD_ELTDATA)
ierr=infoerror(1)
IF(NSW .NE. 0) N=ABS(NSW)
CALL WDialogPutInteger(IDF_INTEGER1,N)
NN=N
DO N1=1,8
NOOP(N1)=NOP(N,N1)
NOOP(N1+8)=NOP(N,N1)
ENDDO
IMAAT=IMAT(N)
120 CONTINUE
CALL WDialogPutInteger(IDF_INTEGER1,N)
CALL WDialogPutInteger(IDF_INTEGER2,NOOP(1))
CALL WDialogPutInteger(IDF_INTEGER3,NOOP(2))
CALL WDialogPutInteger(IDF_INTEGER4,NOOP(3))
CALL WDialogPutInteger(IDF_INTEGER5,NOOP(4))
CALL WDialogPutInteger(IDF_INTEGER6,NOOP(5))
CALL WDialogPutInteger(IDF_INTEGER7,NOOP(6))
CALL WDialogPutInteger(IDF_INTEGER8,NOOP(7))
CALL WDialogPutInteger(IDF_INTEGER9,NOOP(8))
CALL WDialogPutInteger(IDF_INTEGER10,IMAAT)
CALL WDialogSelect(IDD_ELTDATA)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
150 CONTINUE
DO
! Branch depending on type of message.
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
CALL WDialogGetInteger(IDF_INTEGER2,NOOP(1))
CALL WDialogGetInteger(IDF_INTEGER3,NOOP(2))
CALL WDialogGetInteger(IDF_INTEGER4,NOOP(3))
CALL WDialogGetInteger(IDF_INTEGER5,NOOP(4))
CALL WDialogGetInteger(IDF_INTEGER6,NOOP(5))
CALL WDialogGetInteger(IDF_INTEGER7,NOOP(6))
CALL WDialogGetInteger(IDF_INTEGER8,NOOP(7))
CALL WDialogGetInteger(IDF_INTEGER9,NOOP(8))
CALL WDialogGetInteger(IDF_INTEGER10,IMAAT)
ISUM=0
DO N1=1,8
NOP(N,N1)=NOOP(N1)
ISUM=ISUM+NOOP(N1)
ENDDO
IMAT(N)=IMAAT
IF(ISUM .EQ. 0) THEN
XC(N)=VOID
YC(N)=VOID
IF(N .LT. NELAST) NELAST=N
IESKP(N)=1
NCORN(N)=0
IMAT(N)=0
ENDIF
CALL HEDR
RETURN
ELSEIF (WInfoDialog(ExitButton) .EQ. IDNEXT) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
CALL WDialogGetInteger(IDF_INTEGER2,NOOP(1))
CALL WDialogGetInteger(IDF_INTEGER3,NOOP(2))
CALL WDialogGetInteger(IDF_INTEGER4,NOOP(3))
CALL WDialogGetInteger(IDF_INTEGER5,NOOP(4))
CALL WDialogGetInteger(IDF_INTEGER6,NOOP(5))
CALL WDialogGetInteger(IDF_INTEGER7,NOOP(6))
CALL WDialogGetInteger(IDF_INTEGER8,NOOP(7))
CALL WDialogGetInteger(IDF_INTEGER9,NOOP(8))
CALL WDialogGetInteger(IDF_INTEGER10,IMAAT)
ISUM=0
DO N1=1,8
NOP(N,N1)=NOOP(N1)
ISUM=ISUM+NOOP(N1)
ENDDO
IMAT(N)=IMAAT
IF(ISUM .EQ. 0) THEN
XC(N)=VOID
YC(N)=VOID
IF(N .LT. NELAST) NELAST=N
IESKP(N)=1
NCORN(N)=0
IMAT(N)=0
ENDIF
GO TO 150
ELSEIF (WInfoDialog(ExitButton) .EQ. IDF_DELETE) THEN
CALL WDialogGetInteger(IDF_INTEGER1,N)
CALL DELTEL(N)
RETURN
ELSEIF (WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
RETURN
ELSEIF (WInfoDialog(ExitButton) .EQ. IDFROTATE) THEN
call plotot(1)
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select starting node','CHOOSE NODE')
IBOX=1
DO K=1,8
NEAC(K)=NOP(N,K)
ENDDO
CALL PROXEL(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX,NEAC)
DO K=1,NCORN(N)
IF(NOOP(K) .EQ. INODE) THEN
LL=K-1
DO L=1,NCORN(N)
LL=LL+1
IF(NCORN(N) .EQ. 6 .AND. LL .EQ. 7) LL=LL+2
NOOP(L)=NOOP(LL)
ENDDO
IF(NCORN(N) .EQ. 6) THEN
NOOP(7)=0
NOOP(8)=0
ENDIF
call wdialogload(IDD_ELTDATA)
GO TO 120
ENDIF
enddo
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Selected node not within element','CHOOSE NODE')
call wdialogload(IDD_ELTDATA)
GO TO 120
ENDIF
END DO
RETURN
END
Subroutine EltERRDisp(nsw,ims)
USE WINTERACTER
USE BLK1MOD
!
include 'd.inc'
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
!
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: NSW,IBOX,NN,NOOP(16)
INTEGER :: IERR
CHARACTER*1 :: IFLAG
DATA N/1/
ims=0
100 continue
call wdialogload(IDD_ELTERR2)
ierr=infoerror(1)
CALL WDialogPutInteger(IDF_INTEGER1,NSW)
CALL WDialogSelect(IDD_ELTERR)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,ModaL)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,NSW)
ims=1
return
else
ims=0
return
endif
enddo
return
end

@ -0,0 +1,712 @@
! Last change: IPK 12 Jan 98 1:59 pm
!ipk delete old calls to char(7)
!ipk last updated Nov 18 1997
!ipk last updated June 24 1996
!
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
!
SUBROUTINE ELTS
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!
CHARACTER*1 ANS,ANSW(0:9)
DATA ANSW/'s','j','f','g','t','i','h','z','r','q'/
!
! Draw box around selections
!
2 CONTINUE
NHTP=6
NMESS=0
NBRR=0
CALL HEDR
!
! Get answer
!
3 call xyloc(XPT,YPT,ANS,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
IF(ANS .EQ. 'c') THEN
I=IBOX-1
if(i .lt. 0) go to 3
ANS=ANSW(I)
ENDIF
!
IF(ANS .EQ. 's') THEN
CALL SELECT
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'j') THEN
CALL MKELEM
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'd') THEN
CALL DELEL
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'f') THEN
CALL FINDEL
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'g') THEN
CALL GEL
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 't') THEN
CALL MATTYP
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'i') THEN
!ipk aug02
CALL FILM(0)
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'h') THEN
CALL HELPS(2)
IF(IRMAIN .EQ. 1) RETURN
ELSEIF (ANS .EQ. 'q') THEN
RETURN
ELSE
GO TO 3
ENDIF
GO TO 2
END
!
!****************************************************************
!
SUBROUTINE MATTYP
!
USE BLK1MOD
SAVE
! INCLUDE 'BLK1.COM'
!
!ipk feb97 CHARACTER*1 IFLAG
!
CHARACTER*1 IFLAG,ANSW(10)
DATA ANSW/' ',' ',' ',' ',' ',' ','n','z','r','q'/
!
!
! Assign new material type
!
!
!
data itime/0/
if(itime .eq. 0) then
mat=1
itime=1
endif
ht=0.2
!ipk feb97
4 CONTINUE
NHTP=0
NBRR=4
!ipk feb97 NBRR=0
NMESS=45
CALL HEDR
NMESS=2
XPRT=3.2
! READ(*,*) MAT
!
! Write out current material types
!
IF(NEFL .GT. 0) GO TO 100
!ipk feb97 4 HT = .20
HT = .15
DO 10 J=1,NE
IF (IMAT(J) .GT. 0 .AND. IMAT(J) .LT. 901) THEN
IF(IESKP(J) .EQ. 0) THEN
IF(IQSW(1) .EQ. 1 .OR. IQSW(2) .EQ. 1) FPN = IMAT(J)
IF(IQSW(1) .EQ. 2 .OR. IQSW(2) .EQ. 2) FPN = IGRPSER(J)
X = XC(J)
!ipk jul02 Y = YC(J) - .11
Y = YC(J) + .01
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.5) THEN
CALL NUMBR(X,Y,HT,FPN,0.0,-1)
ENDIF
ENDIF
ENDIF
10 END DO
CALL GETINT(MAT)
5 CONTINUE
IBOX=1
CALL PROX(XC,YC,NE,XX,YY,IELEM,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
XPRT=XPRT+0.5
IF(XPRT .GT. 9.6) XPRT=0.
FPN= IELEM
CALL NUMBR(XPRT,7.20,0.18,FPN,0.0,-1)
!ipk feb97 new setup
!
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
!
IF(IFLAG .EQ. 'q') THEN
RETURN
ELSEIF(IFLAG .EQ. 'e' .OR. IFLAG .EQ. 'n') THEN
!ipk nov97 add (1)
CALL PLOTOT(1)
GO TO 4
ENDIF
IF(IQSW(1) .EQ. 1 .OR. IQSW(2) .EQ. 1) IMAT(IELEM) = MAT
IF(IQSW(1) .EQ. 2 .OR. IQSW(2) .EQ. 2) IGRPSER(IELEM) = MAT
FPN = MAT
X = XC(IELEM)
Y = YC(IELEM) + .01
CALL NUMBR(X,Y,0.15,FPN,0.0,-1)
!
!ipk feb97 ELSEIF(IFLAG .EQ. 'q') THEN
!ipkfeb94 CALL WRTOUT(0)
!ipk feb97 RETURN
!
!ipk feb97 ELSE
!ipk feb97 WRITE(*,*) CHAR(7),CHAR(7)
!ipk feb97 ENDIF
!
GOTO 5
!
! Process list from prior selection
!
100 CONTINUE
DO 150 K=1,NEFL
J=NEFLAG(K)
IMAT(J)=MAT
150 END DO
NEFL=0
RETURN
END
!
SUBROUTINE FINDEL
!
USE BLK1MOD
SAVE NELSE
! INCLUDE 'BLK1.COM'
!
! Read desired element number
!
data itime/0/
if(itime .eq. 0) then
itime=1
nelse=0
endif
2 CONTINUE
NHTPSAV=NHTP
NMESSAV=NMESS
NBRRSAV=NBRR
NHTP=0
NBRR=0
NMESS=3
CALL HEDR
NMESS=3
CALL GETINT(NELSE)
! READ(*,*) NELSE
!
! Obtain location of centroid
!
!ipkdec93 IF(IMAT(NELSE) .EQ. 0) GO TO 2
IF(IMAT(NELSE) .EQ. 0) RETURN
DO 4 I=1,NP
IF(CORD(I,1) .GT. VOID) THEN
INSKP(I)=0
ENDIF
4 END DO
DO 5 I=1,NE
IF(IMAT(I) .GT. 0) THEN
IESKP(I)=0
ENDIF
5 END DO
NCN=NCORN(NELSE)
XX=0.
YY=0.
DO 150 K=1,NCN,2
XX=XX+CORD(NOP(NELSE,K),1)
YY=YY+CORD(NOP(NELSE,K),2)
150 END DO
XP=XX/FLOAT((NCN+1)/2)
YP=YY/FLOAT((NCN+1)/2)
!
! Make it center of screen and redraw
!
XMIN=XP-5.0*PSCALE
YMIN=YP-3.5*PSCALE
! CALL PLOTS(0)
!ipk nov97 add (1)
CALL PLOTOT(1)
HT=0.15
FPN=NELSE
CALL RRED
CALL NUMBR(5.,3.5,HT,FPN,0.0,-1)
CALL RBLUE
NHTP=NHTPSAV
NMESS=NMESSAV
NBRR=NBRRSAV
CALL HEDR
RETURN
END
!
SUBROUTINE DELEL
!
! Routine to define element for deleting
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*1 IFLAG
IF(NEFL .GT. 0) GO TO 150
100 CONTINUE
!
! Check out mouse
!
IBOX=0
CALL PROX(XC,YC,NE,XX,YY,IELEM,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
! Go and start again if quit called
!
IF(IFLAG .EQ. 'q') RETURN
IECHG=0
!IPK MAY03
ICHG=0
CALL DELTEL(IELEM)
GO TO 100
!
! Call routine to delete elements in list
!
150 CONTINUE
IECHG=0
!IPK MAY03
ICHG=0
DO 200 K=1,NEFL
J=NEFLAG(K)
CALL DELTEL(J)
200 END DO
NEFL=0
RETURN
END
!
SUBROUTINE DELTEL(J)
!
! Routine to delete a given element
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!
IMAT(J)=0
XC(J)=VOID
YC(J)=VOID
IF(J .LT. NELAST) NELAST=J
DO 170 KK=1,8
NOP(J,KK)=0
170 END DO
IESKP(J)=1
NCORN(J)=0
JJ=0
!IPK FEB08 TEST FOR LOWERING NE
IF(J .EQ. NE) THEN
DO J=NE,1,-1
IF(IMAT(J) .NE. 0) THEN
JJ=J
GO TO 200
ENDIF
ENDDO
200 NE=JJ
ENDIF
RETURN
END
!
SUBROUTINE SELECT
!
! Routine to select elements
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*1 ANSW(10)
CHARACTER*1 IFLAG
DATA ANSW/'d','e','n','a','g','t','h','z','r','q'/
data itime/0/
if(itime .eq. 0) then
ielem=1
itime=1
endif
!
! Draw box around selections
!
2 CONTINUE
!IPK MAY94 DROP THIS PLOTTING
! CALL PLOTOT
NEFL=0
95 NHTP=7
NMESS=0
NBRR=0
CALL HEDR
100 CONTINUE
!
! Check out mouse
!
IBOX=1
CALL PROX(XC,YC,NE,XX,YY,IELEM,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
! Return if quit called
!
IF(IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ELSEIF(IFLAG .EQ. 'c') THEN
GO TO 120
ENDIF
!
! Check for reading number
!
IF(IFLAG .EQ. 'n') THEN
NHTP=0
NMESS=45
CALL HEDR
NMESS=20
CALL GETINT(IELEM)
NEFL=NEFL+1
NEFLAG(NEFL)=IELEM
CALL FILLEM(IELEM)
GO TO 95
!
! Check for selecting all elements
!
ELSEIF(IFLAG .EQ. 'a') THEN
DO I=1,NE
IF(IMAT(I) .GT. 0) THEN
IF(IMAT(I) .LT. 901 .or. imat(i) .gt. 903) THEN
NEFL=NEFL+1
NEFLAG(NEFL)=I
CALL FILLEM(I)
ENDIF
ENDIF
ENDDO
GO TO 95
!
! Check for only rectangles
!
ELSEIF(IFLAG .EQ. 'g') THEN
DO I=1,NE
IF(NCORN(I) .EQ. 8) THEN
NEFL=NEFL+1
NEFLAG(NEFL)=I
CALL FILLEM(I)
ENDIF
ENDDO
GO TO 95
!
! Check for only triangles
!
ELSEIF(IFLAG .EQ. 't') THEN
DO I=1,NE
IF(NCORN(I) .EQ. 6) THEN
NEFL=NEFL+1
NEFLAG(NEFL)=I
CALL FILLEM(I)
ENDIF
ENDDO
GO TO 95
!
! Check for only line elements
!
ELSEIF(IFLAG .EQ. 'l') THEN
DO I=1,NE
IF((NCORN(I) .LT. 6 .and. ncorn(i) .gt. 2) .and. &
(imat(i) .lt. 901 .or. imat(i) .gt. 903)) THEN
NEFL=NEFL+1
NEFLAG(NEFL)=I
CALL FILLEM(I)
xa=(cord(nop(i,1),1)+cord(nop(i,3),1))/2.
ya=(cord(nop(i,1),2)+cord(nop(i,3),2))/2.
fpn=i
CALL NUMBR(xa,ya,0.18,FPN,0.0,-1)
ENDIF
ENDDO
GO TO 95
!
! Check for delete option
!
ELSEIF(IFLAG .EQ. 'd') THEN
CALL DELEL
!
! Check for refine option
!
ELSEIF(IFLAG .EQ. 'e') THEN
CALL REFB
IF(IRMAIN .EQ. 1) RETURN
!
! Check for help
!
ELSEIF (IFLAG .EQ. 'h') THEN
CALL HELPS(6)
IF(IRMAIN .EQ. 1) RETURN
!
ELSEIF(IFLAG .EQ. 'U') THEN
NEFLAG(NEFL)=0
NEFL=NEFL-1
CALL PLOTOT(1)
CALL HEDR
DO IELEM=1,NEFL
CALL FILLEM(NEFLAG(IELEM))
ENDDO
GO TO 100
ELSEIF(IFLAG .EQ. 'q') THEN
RETURN
ENDIF
GO TO 2
120 NEFL=NEFL+1
NEFLAG(NEFL)=IELEM
CALL FILLEM(IELEM)
IF(NCORN(ielem) .LT. 6 .and. ncorn(ielem) .gt. 2) THEN
xa=(cord(nop(ielem,1),1)+cord(nop(ielem,3),1))/2.
ya=(cord(nop(ielem,1),2)+cord(nop(ielem,3),2))/2.
fpn=ielem
CALL NUMBR(xa,ya,0.18,FPN,0.0,-1)
endif
GO TO 100
END
!
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
!
SUBROUTINE MKELEM
!
USE BLK1MOD
INCLUDE 'BFILES.I90'
! INCLUDE 'BLK1.COM'
!
CHARACTER*1 IFLAG
CHARACTER*32 IJNK
CHARACTER*23 ELTH
!ipk jan98
CHARACTER*80 LIND
CHARACTER*60 MESSAGE,MESSAG1
!ipk jun96 add messag2
CHARACTER*26 MESSAG2
DATA MESSAG2/' Press return to continue'/
!ipkjul94 add a line
MEL=MAXE
!
! Form element nodal list by clicking on nodes with cursor
!
3 CONTINUE
CALL GETELM(J)
5 CONTINUE
IECHG=0
!IPK MAY03
ICHG=0
WRITE(ELTH,5000) j
5000 FORMAT('Processing element',i5)
CALL CLRBOX
!ipk jun96 clear a strip
call clrstp(7.2,7.5)
CALL SYMBL(0.,7.70,0.18,ELTH,0.,23)
XPRT=3.5
6 DO 10 K=1,10,2
!
! Find node nearest to cursor
!
7 CONTINUE
!ipk sep94 reset ibox
IBOX=1
!ipk sep49 add call to hedr
nhtp=0
!ipk jun96 nmess=22
nmess=15
nbrr=3
call hedr
write(155,*) width(1),width(2),width(3)
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
!
! IF(IFLAG .EQ. 'z') THEN
! DO 62 I=1,NP
! IF(CORD(I,1) .GT. VOID) THEN
! INSKP(I)=0
! ENDIF
! 62 CONTINUE
! DO 63 I=1,NE
! IF(IMAT(I) .GT. 0) THEN
! IESKP(I)=0
! ENDIF
! 63 CONTINUE
CALL RBLUE
if(inode .lt. 1) return
CALL PLTNOD(INODE,1)
XPRT=XPRT+0.5
IF(XPRT .GT. 9.6) then
XPRT=0.
!ipk jun96 clear a strip
call clrstp(7.2,7.5)
endif
FPN= INODE
CALL RBLUE
CALL NUMBR(XPRT,7.30,0.18,FPN,0.0,-1)
!
IF(K .EQ. 9) THEN
IF(IFLAG .EQ. 'm') THEN
NOP(J,K-1) = INODE
WD(INODE) = 0.
!
! Five node element
!
ELSEIF (IFLAG .EQ. 'f') THEN
NOP(J,4)=NOP(J,5)
NOP(J,5)=NOP(J,7)
NOP(J,7) = 0
NOP(J,8) = 0
ENDIF
GO TO 10
ENDIF
IF (IFLAG .NE. 'r') THEN
NOP(J,K) = 0
NOP(J,K+1) = 0
ENDIF
!
! Corner node
!
IF (IFLAG .EQ. 'c') THEN
NOP(J,K) = INODE
!
! Midside node
!
ELSEIF (IFLAG .EQ. 'm') THEN
NOP(J,K-1) = INODE
GOTO 7
!
! Triangular element
!
ELSEIF (IFLAG .EQ. 't' .AND. K .EQ. 7) THEN
NOP(J,7) = 0
NOP(J,8) = 0
GOTO 20
!
! 1-d element
!
ELSEIF (IFLAG .EQ. 'l' .AND. K .EQ. 5) THEN
NOP(J,4) = 0
NOP(J,5) = 0
NOP(J,6) = 0
NOP(J,7) = 0
NOP(J,8) = 0
GOTO 20
!
! Junction element
!
ELSEIF (IFLAG .EQ. 'j' .AND. K .EQ. 3) THEN
INODE= NOP(J,1)
NOP(J,1)=0
CALL JUNGEN(J,INODE,IER)
IF(IER .EQ. 1) THEN
!
! Redo if error
!
!ipk jan98 WRITE(*,*) CHAR(7),CHAR(7)
GOTO 7
ENDIF
GO TO 20
!
! Exit input
!
ELSEIF(IFLAG .EQ. 'q') THEN
NE=NE-1
!ipkfeb94 CALL WRTOUT(0)
IRDONE=0
RETURN
!
! Redo if error
!
ELSE
!ipk jan98 WRITE(*,*) CHAR(7),CHAR(7)
GOTO 6
ENDIF
10 END DO
!
20 IF (IMAT(J) .EQ. 0) IMAT(J) = 1
!
! rearrange if nop(j,4) .ne. 0 separate it from
! a transition element
!
IF(NOP(J,4) .NE. 0 .AND. NOP(J,6) .EQ. 0) THEN
IF(IFLAG .NE. 'f' .AND. IMAT(J) .LT. 901) THEN
ITMP1 = NOP(J,1)
ITMP2 = NOP(J,2)
DO 30 KK=1,6
NOP(J,KK) = NOP(J,KK+2)
30 CONTINUE
IF(NOP(J,5) .EQ. 0) THEN
NOP(J,5)=ITMP1
NOP(J,6)=ITMP2
ELSE
NOP(J,7)=ITMP1
NOP(J,8)=ITMP2
ENDIF
ENDIF
ENDIF
NCN = 2
IF (NOP(J,3) .NE. 0) NCN = 3
IF (NOP(J,4) .NE. 0) NCN = 4
IF (NOP(J,5) .NE. 0 .AND. NOP(J,4) .NE. 0) NCN = 5
IF (NOP(J,5) .NE. 0 .AND. NOP(J,4) .EQ. 0) NCN = 6
IF (NOP(J,6) .NE. 0) NCN = 6
IF (NOP(J,7) .NE. 0) NCN = 8
!
! Check to see if duplicate node numbers have been defined
!
DO 40 KK=1,NCN-1
IF(NOP(J,KK) .EQ. 0) GO TO 40
DO 37 LL=KK+1,NCN
IF(NOP(J,KK) .EQ. NOP(J,LL)) THEN
WRITE(MESSAGE,6000) J
6000 FORMAT(' **ERROR** NODES AT ELEMENT NUMBER',I5,' ARE DUPLICATED RE&
&TRY')
WRITE(MESSAG1,6001) (NOP(J,II),II=1,8)
6001 FORMAT(' NODE LIST FOLLOWS ',8I5)
CALL CLRBOX
CALL SYMBL(0.,7.75,0.18,MESSAGE,0.,60)
CALL SYMBL(0.,7.55,0.18,MESSAG1,0.,60)
!IPK JUN96
CALL SYMBL(0.,7.35,0.18,MESSAG2,0.,25)
call keybrd(k)
!cc read(*,'(A)') ijnk
!ipk jun96 change transfer location
! GO TO 6
go to 5
ENDIF
37 CONTINUE
40 END DO
NCORN(J) = NCN
IESKP(J) = 0
NE = MAX(J,NE)
!IPK JAN98
IERC=0
CALL PLTELM(J,IERC)
!
! WRITE(IOT,'(10I5)') J, (NOP(J,K),K=1,8), IMAT(J)
!
! Return if dimensions exceeded
!
!ipk jul94 IF (J .GE. MAXE) THEN
IF (J .GE. MEL) THEN
CALL WRTOUT(0)
CALL CLSCRN
!ipk jan98 CALL SETD(24)
!ipk jan98 WRITE(*,*) ' Element number exceeds MAXE. Press retur
WRITE(lind,*) &
& ' Element number exceeds MAXE. Press return to exit'
call symbl &
& (1.1,4.0,0.20,LIND,0.0,80)
!ipk jan98 READ(*,'(A)') IJNK
ndig=1
CALL GTCHARX(IJNK,NDIG,5.0,4.0)
RETURN
ENDIF
!
! Go do another element
!
GOTO 3
!
END

@ -0,0 +1,425 @@
SUBROUTINE SETRNG(XNEARS,NMAP)
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
!
! Establish size for range
!
JS=1
K=0
KPT=0
VDX=-1.E9
write(90,*) 'maxpts', maxpts
DO 120 J=1,MAXPTS+1
!
! Determine how long each line is
!
MLEN=J-JS
! write(90,*) 'mlen',j,js,mlen,xmap(j),nmap,vdx
! write(90,*) j,js,mlen,cmap(j,1),xmap(j),vdx,maxpts
IF(XMAP(J) .LT. VDX) THEN
!IPK NOV05 IF(CMAP(J,1) .LT. VDX) THEN
!
! Now check it.
!
K=K+1
IF(MLEN .GT. 1) THEN
! LTP=LINTYP(K)
DO 110 M=1,MLEN
! write(191,*) j,m,js+m-1,nmap
IF(VAL(JS+M-1) .GT. -9000.) THEN
KPT=KPT+1
ENDIF
110 CONTINUE
ENDIF
NMAP=J
IF(MLEN .EQ. 0) GO TO 130
JS=J+1
go to 120
ENDIF
cxcur=xmap(j)
cycur=ymap(j)
120 END DO
130 CONTINUE
write(90,*) 'number of points forming map',nmap
write(90,*) 'last map coordinates',cxcur,cycur
!
! Estimate areal density to get 100 points
!
ADEN=AMAP*40./(FLOAT(KPT)*TXSCAL**2)
!
! Find square coverage
!
XNEARS=SQRT(ADEN)
xnearo=xnears
xnearf=xnears
!ipk sep97 xnearo forms the current value xnearp is limiting plus side
XNEARP=XNEARS
! xnears=2.0
WRITE(90,*) 'Radius for nearby points',XNEARS
RETURN
END
SUBROUTINE SETELV(XNEARS,NMAP,M,ISWT)
USE WINTERACTER
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
! common /mapc/imap(maxpl),NCRS(MAXPL)
! dimension ccmap(maxpl)
DIMENSION LISTM(1000),listt(1600,4),nlf(4),icomp(4),xnear(4)
dimension xnearkp(4)
DATA ITIME/0/
IF(.NOT. ALLOCATED(CCMAP)) THEN
ALLOCATE (CCMAP(MAXPL))
ENDIF
call WcursorShape(CurHourGlass)
!ipk feb94 change logic to allow 4 passes and check angles
!
! initialize range
!
ict=0
!ipk sep97 xnears=xnearo
xnearo=xnears
xnearp=xnears
xnearf=xnears
write(90,*) 'working node',m
do nang=1,4
XNEAR(nang)=XNEARS
xnearkp(nang)=0.
icomp(nang)=0
enddo
!
! set imap to zero to start or -1 if no value
!
!IPK MAY97 INITIALIZE COUNTER
ntime=0
220 continue
do n=1,nmap
if(cmap(n,1) .lt. vdx) then
imap(n)=-1
elseif(val(n) .lt. -9000.) then
imap(n)=-1
else
imap(n)=0
endif
enddo
!
!ipk sep97 Sortlist of map points in increasing x except for single poin
!
IF(ielvsw .EQ. 0 .AND. ISWT .NE. 1) THEN
!ipk mar99
do n=1,nmap
ccmap(n)=cmap(n,1)
enddo
CALL SORTMAP(CCMAP,NCRS,NMAP,IMAP)
ielvsw=1
! DO N=1,NMAP
! WRITE(90,*) N,CMAP(NCRS(N),1),IMAP(NCRS(N))
! ENDDO
ENDIF
!ipk sep97 end addition
!
! initialize list and completeness test
!
do nang=1,4
icomp(nang)=0
do n=1,1600
listt(n,nang)=0
enddo
enddo
!
! start processing
!
280 continue
!
! check for completeness intialize counter
!
ict=0
do nang=1,4
if(icomp(nang) .eq. 0) then
nlf(nang)=0
else
ict=ict+1
endif
enddo
!
! if ict = 4 we are done
!
if(ict .lt. 4) then
!
! loop through map points
!
!ipk sep97 change loop
do nang=1,4
nlf(nang)=0
icomp(nang)=0
enddo
IFND=0
NN=0
285 NN=NN+1
IF(NN .GT. NMAP) GO TO 305
! DO 300 NNN=1,NMAP
N=NN
if(val(n) .lt. -9990.) go to 285
IF(ISWT .EQ. 1) GO TO 297
IF(IFND .EQ. 1) GO TO 295
IF(XNEARO .LT. XNEARF) THEN
IFND=1
GO TO 294
ENDIF
!IPK SEP97 START SEARCH
NLOCA=NMAP/2
NSTEPS=NMAP/2
290 CONTINUE
! WRITE(90,*) 'elvset-164',NLOCA
! write(90,*) NSTEPS,NCRS(NLOCA)
! WRITE(90,*) CMAP(NCRS(NLOCA),1),CORD(M,1),XNEAR(1)
NCUR=NCRS(NLOCA)
! IF(CMAP(NCUR,1) .GT. 1.E34) THEN
! WE ARE AOUT OF RANGE
! GO TO
! ENDIF
IF(CMAP(NCUR,1)+XNEARO .LT. CORD(M,1).and. val(ncur) .gt. -9000.) THEN
! still below increase nloca
NSTEPS=NSTEPS/2
IF(NSTEPS .EQ. 0) THEN
! we are there
NLOCA=NLOCA-1
IFND=1
GO TO 293
ENDIF
NLOCA=NLOCA+NSTEPS
GO TO 290
ELSE
! too great decrease nloca
NSTEPS=(NSTEPS+1)/2
NLOCA=NLOCA-NSTEPS
IF(NLOCA .LE. 0) THEN
NLOCA=0
IFND=1
GO TO 293
ENDIF
GO TO 290
ENDIF
293 NLOCS=NLOCA
! WRITE(90,*) 'elvset-201',NLOCA,NSTEPS,NCRS(NLOCA)
! WRITE(90,*) CMAP(NCRS(NLOCA),1),CORD(M,1),XNEAR(1)
GO TO 295
294 NLOCA=NLOCS
295 CONTINUE
NLOCA=NLOCA+1
if(nloca .gt. nmap) go to 305
NCUR=NCRS(NLOCA)
!
! test to see if we are past area
!
if(ncur .eq. 0) go to 305
IF(CMAP(NCUR,1)-XNEARP .GT. CORD(M,1)) GO TO 305
if(val(ncur) .lt. -9000.) go to 295
N=NCUR
297 CONTINUE
d1=cmap(n,1)-cord(m,1)
d2=cmap(n,2)-cord(m,2)
!ipk may97 IF(ABS(D1) .LT. XNEAR(1)) THEN
!ipk may97 IF(ABS(D2) .LT. XNEAR(1)) THEN
IF(ABS(D1) .LT. max(XNEARO,xnearp)) THEN
IF(ABS(D2) .LT. max(XNEARO,xnearp)) THEN
if(d1 .lt. 0) then
if(d2 .lt. 0) then
nang=3
if(abs(d1) .lt. xnear(NANG) .and. &
& abs(d2) .lt. xnear(NANG)) then
imap(n)=3
else
imap(n)=-1
go to 300
endif
else
nang=2
if(abs(d1) .lt. xnear(NANG) .and. &
& abs(d2) .lt. xnear(NANG)) then
imap(n)=2
else
imap(n)=-1
go to 300
endif
endif
elseif(d2 .lt. 0) then
nang=4
if(abs(d1) .lt. xnear(NANG) .and. &
& abs(d2) .lt. xnear(NANG)) then
imap(n)=4
else
imap(n)=-1
go to 300
endif
else
nang=1
if(abs(d1) .lt. xnear(NANG) .and. &
& abs(d2) .lt. xnear(NANG)) then
imap(n)=1
else
imap(n)=-1
go to 300
endif
endif
!
! set to skip out if out of range
!
else
imap(n)=-1
go to 300
endif
else
imap(n)=-1
go to 300
endif
!
!IPK SEP97 END MAJOR REWRITE
!
! save value if total less then 50
!
NLF(NANG)=NLF(NANG)+1
IF(NLF(NANG) .LT. 101) THEN
LISTT(NLF(NANG),NANG)=N
ENDIF
300 CONTINUE
GO TO 285
305 CONTINUE
!
! now reset range if we need to
!
ictz=0
! write(90,*) ' '
! write(90,*) ntime
! write(90,*) 'nlf',nlf
! write(90,*) 'xnear',xnear
do nang=1,4
if(nlf(nang) .gt. 150) then
! rat=sqrt((45.+ntime*3.)/nlf(nang))
! if(rat .lt. 0.2) rat=0.2
rat=sqrt(0.1+0.06*ntime)
xnearkp(nang)=xnear(nang)
xnear(nang)=xnear(nang)*rat
!ipk may97 elseif(nlf(nang) .eq. 0) then
elseif(nlf(nang) .lt. 2) then
!ipk may97 if(xnear(nang) .eq. xnears) then
ictz=ictz+1
!ipk may97 else
!ipk may97 icomp(nang)=1
!ipk may97 endif
else
icomp(nang)=1
endif
enddo
xnearf=xnearo
! write(90,*) 'ntime,ictz,xnear',ntime,ictz
! write(90,*) 'icomp',icomp
! write(90,*) 'xneara',xnear
if(ictz .gt. 0) then
do nang=1,4
if(nlf(nang) .lt. 2) then
if(xnearkp(nang) .gt. 0.) then
xnear(nang)=xnearkp(nang)
else
xnear(nang)=xnear(nang)*1.5
endif
if(nang .eq. 2 .or. nang .eq. 3) then
if(xnear(nang) .gt. xnearo) xnearo=xnear(nang)
endif
if(nang .eq. 1 .or. nang .eq. 4) then
if(xnear(nang) .gt. xnearp) xnearp=xnear(nang)
endif
endif
!ipk may97 xnears=xnears*2.
! write(90,*) 'nang,xnear',nang,xnear(nang)
! write(90,*) 'xnearo,xnearp',xnearo,xnearp
enddo
!ipk sep97 xnears=xnears*2.
ntime=ntime+1
if(ntime .lt. 12) go to 220
! go to 220
! endif
endif
!
! go back and try again
!
!ipk may97 go to 280
ntime=ntime+1
if(ntime .lt. 16) go to 280
endif
!
! finished now compact list
!
do nang=1,4
! write(90,*)'nang',nang,nlf(nang),xnear(nang)
enddo
nlg=0
do nang=1,4
nlim=nlf(nang)
!ipksep97 if(nlim .eq. 0) then
!ipksep97 nlim=50
!ipk sep97 endif
!ipk sep97 chnage limit and act only if nlim > 0
! write(90,*) 'nlim',nlim
if(nlim .gt. 1600) nlim=1600
if(nlim .gt. 0) then
do nlgg=1,nlim
if(listt(nlgg,nang) .gt. 0) then
if(nlg .eq. 1000) nlg=999
nlg=nlg+1
listm(nlg)=listt(nlgg,nang)
endif
enddo
endif
enddo
! write(90,*) nlg
! write(90,*) m,(listm(n),n=1,nlg),xnear
!ipk feb94 end changes
! do n=1,nmap
! write(90,*) n,cmap(n,1),cmap(n,2),val(n)
! enddo
! write(90,*) 'LIST MAP POINTS NEAR ',M,CORD(M,1),CORD(M,2)
! DO N=1,NLG
! WRITE(90,*) listm(n),CMAP(LISTM(N),1),CMAP(LISTM(N),2),val(listm(n))
! ENDDO
! read(*,*) n234
!IPK JUL98 CALL GRIDIN(M,SOLN,LISTM,NLG)
XXX=CORD(M,1)
YYY=CORD(M,2)
CALL GRIDIN(XXX,YYY,SOLN,LISTM,NLG)
IF(IRMAIN .EQ. 1) then
call WcursorShape(CurArrow)
RETURN
endif
WD(M)=SOLN
FPN = WD(M)*10.
X = CORD(M,1)
Y = CORD(M,2) - .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.5) THEN
CALL RRED
CALL NUMBR(X,Y,0.1,FPN,0.0,-1)
ENDIF
! call WcursorShape(0)
call WcursorShape(CurArrow)
RETURN
END

File diff suppressed because it is too large Load Diff

@ -0,0 +1,160 @@
! last update March 6 2000 add default values for CMAP
SUBROUTINE FILE(ientry)
!
! Define input output units
!
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'BFILES.I90'
!IPK APR94
COMMON /RECOD/ IRECD,TSPC
common /cols/ ibakk,icolr,iblkk
COMMON /PAGE/ XL,XH,YL,YH
!
CHARACTER*80 LIND
!IPK APR94 CHARACTER*40 FNAM,FNAMB
CHARACTER*40 FNAM,FNAMB,FNAMC
CHARACTER*3 SUB
CHARACTER*1 ANS
LOGICAL*4 EXST,STATM
data ihere/0/
if(ihere .eq. 1) return
mpnam='elt.mpb'
ibakk=8
icolr=11
iblkk= 9
xl=0.
yl=0.
xh=HSIZE
yh=8.0
ielvsw=0
if(ientry .eq. 1) then
ihere=1
! MAXPL=200000
MAXELMP=100000
ALLOCATE (NOPEL(MAXELMP,3),XCEN(MAXELMP),YCEN(MAXELMP)&
,RADS(MAXELMP) ,NKEY(MAXELMP),CMAP(MAXPL,2)&
,XMAP(MAXPL),YMAP(MAXPL),VAL(MAXPL))
ALLOCATE (imap(maxpl),NCRS(MAXPL))
RADS=0.
XCEN=0.
YCEN=0.
endif
!ipk jan98
OPEN(UNIT=90,FILE='messgen.out',STATUS='UNKNOWN', IOSTAT=iost)
if(iost .gt. 0) then
OPEN(UNIT=90,FILE='messgen1.out',STATUS='UNKNOWN', IOSTAT=iost)
if(iost .gt. 0) then
OPEN(UNIT=90,FILE='messgen2.out',STATUS='UNKNOWN', IOSTAT=iost)
if(iost .gt. 0) then
write(*,*) 'ERROR UNABLE TO OPEN MESSGEN.OUT FILE'
write(*,*) 'PRESS RETURN TO END'
read(*,'(I5)') junk
STOP
endif
endif
endif
!ipk jan98
write(lind,6010)
6010 format(' Compilation limits are')
call symbl(1.1,1.5,0.20,LIND,0.0,80)
write(lind,6110) maxe
6110 FORMAT( ' Maximum elements =',i8)
call symbl(1.1,1.2,0.20,LIND,0.0,80)
write(lind,6111) maxp
6111 FORMAT( ' Maximum nodes =',i8)
call symbl(1.1,0.9,0.20,LIND,0.0,80)
!
! Open files
!
IBAK = 21
OPEN(IBAK,FILE='ELT.BAK',STATUS='UNKNOWN',FORM='UNFORMATTED',IOSTAT=iost)
if(iost .gt. 0) then
OPEN(IBAK,FILE='ELT1.BAK',STATUS='UNKNOWN',FORM='UNFORMATTED',IOSTAT=iost)
if(iost .gt. 0) then
OPEN(IBAK,FILE='ELT2.BAK',STATUS='UNKNOWN',FORM='UNFORMATTED',IOSTAT=iost)
if(iost .gt. 0) then
write(*,*) 'ERROR UNABLE TO OPEN ELT.BAK FILE'
write(*,*) 'PRESS RETURN TO END'
read(*,'(I5)') junk
STOP
endif
ENDIF
ENDIF
! OPEN(IBAK,FILE='ELT.BAK',STATUS='UNKNOWN',FORM='BINARY')
IS11=94
INQUIRE(FILE='startup.dat',EXIST= EXST)
IF(EXST) THEN
OPEN(IS11 ,FILE='startup.dat',STATUS='OLD',FORM='FORMATTED')
ELSE
IS11=0
ENDIF
! Initialize variables
NCLM=0
!ipk may94 add 2 lines below
XREF=0.
YREF=0.
MNP = MAXP
MEL = MAXE
!! uncertain call INITSIZ(0,0,1)
nmapf=1
NSIGF=1
DO I=1,MNP
XUSR(I) = -1.D20
YUSR(I) = -1.D20
CORD(I,1) = -1.D20
CORD(I,2) = -1.D20
WD(I) = -9999.
LAY(I) = -9999
WIDTH(I) = 0.0
SS1(I) = 0.0
SS2(I) = 0.0
WIDS(I) = 0.0
WIDBS(I)=0.
SSO(I)=0.
INSKP(I) = 1
INEW(I) = 0
!ipk mar02
lock(i)=0
bs1(I)=0.
ENDDO
!
DO I=1,MEL
DO K=1,8
NOP(I,K) = 0
ENDDO
!
IEM(I) = 0
IMAT(I) = 0
THTA(I)=0.
XC(I) = -1.E20
YC(I) = -1.E20
IESKP(I) = -1
ENDDO
!
MLIN = MAXLIN
DO I=1,MLIN
LINTYP(I) = -999
ENDDO
!IPK OCT96
DO I=1,10
ICOLON(I)=1
ENDDO
!ipk mar00 define default values for CMAP
DO J=1,MAXPTS
CMAP(J,1) = -1.e20
CMAP(J,2) = -1.e20
enddo
RETURN
END

@ -0,0 +1,269 @@
!IPK LAST UPDATE jAN 25 2001 INCREMENT NP FOR ALREADY EXISTING NODES IN NOP
!IPK LAST UPDATE APR 6 1998
SUBROUTINE FILM(ISWT)
!june93 SUBROUTINE FILM(IFILL)
!-
! ISWT = 0 means read a value for IFILL
! ISWT = 1 means use a value of 1 for IFILL
! If IFILL = 1, use all unused node nos. for filling midside nodes
! If IFILL = 0, start midside node numbering with max node no.
!-
USE WINTERACTER
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
INCLUDE 'BFILES.I90'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
INTEGER NUSED(MAXP)
!IPK MAY02
REAL*8 XX,YY
data itime/0/
if(itime .eq. 0) then
ifill=0
itime=1
endif
! call WcursorShape(1)
NHTPsv = nhtp
NMESSsv = nmess
NBRRsv = nbrr
NHTP = 0
NBRR = 0
NMESS=45
CALL HEDR
NMESS = 19
xprt=3.2
!
IF(ISWT .EQ. 0) THEN
CALL GETINT(IFILL)
ELSE
IFILL=1
ENDIF
!
!-
!-.....FIND MISSING NODE NUMBERS.....
!-
NP0 = 0
DO 10 I=1,MAXP
10 NUSED(I) = 0
DO 101 J = 1, NE
IF( IMAT(J) .EQ. 0 ) GO TO 101
DO 100 K = 1, 8
IF( NOP(J,K) .LE. 0) GOTO 100
NUSED(NOP(J,K))=999
100 END DO
101 END DO
! Form list of elements connected to nodes
IERR=0
CALL NDNECON(IERR)
IF(IERR .GT. 0) THEN
LIMIT=MAXECON
CALL NODERR(IERR,LIMIT)
GO TO 200
ENDIF
!C-
!C-.....PUT INPUTS INTO PROPER LOCATIONS.....
!C-
! DO 140 J = 1, NE
! IF( IMAT(J) .EQ. 0 ) GO TO 140
! IF( NOP(J,5) .GT. 0 ) GO TO 140
! DO 130 K = 1, 4
! IT(K) = NOP(J,K)
! NOP(J,K) = 0
! 130 CONTINUE
! KK = 0
! DO 135 K = 1, 8, 2
! KK = KK + 1
! NOP(J,K) = IT(KK)
! 135 CONTINUE
! 140 CONTINUE
!-
!-.....INSERT NEW NUMBERS.....
!-
NP0=0
IF(IFILL .EQ. 0) NP0=NP
DO 190 J = 1, NE
!ipk apr98 IF( IMAT(J) .GT. 0 .AND. IMAT(J) .LT.901) THEN
IF(( IMAT(J) .GT. 0 .AND. IMAT(J) .LT.901) .or. &
& imat(j) .gt. 903) THEN
NCN = NCORN(J)
JN = J + 1
DO 180 K = 2, NCN, 2
if((imat(j) .gt. 995 .and. imat(j) .lt. 1999) .and. (k .eq. 4 .or. k .eq. 8) &
& ) go to 180
NA = K - 1
NB = MOD(K+1,NCN)
IF(NB .EQ. 0) NB=NCN
NA = NOP(J,NA)
NB = NOP(J,NB)
AA=(WD(NA)+WD(NB))/2.
AB=(WD1(NA)+WD1(NB))/2.
IF( NOP(J,K) .EQ. 0 ) THEN
IRDONE=0
99 NP0 = NP0 + 1
IF(NP0 .GT. MAXP) THEN
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Execution terminated, nodal limits exceeded. Backup written','LIMITS EXCEEDED')
CALL WRTOUT(0)
STOP
ENDIF
IF(INEW(NP0) .EQ. 1) GO TO 99
IF (NUSED(NP0) .GT. 0) GOTO 99
NOP(J,K) = NP0
XX=(CORD(NA,1)+CORD(NB,1))/2.
YY=(CORD(NA,2)+CORD(NB,2))/2.
CORD(NP0,1)=XX
CORD(NP0,2)=YY
WD(NP0)=AA
WD1(NP0)=AB
WIDTH(NP0)=(WIDTH(NA)+WIDTH(NB))/2.
SS1(NP0)=(SS1(NA)+SS1(NB))/2.
SS2(NP0)=(SS2(NA)+SS2(NB))/2.
WIDS(NP0)=(WIDS(NA)+WIDS(NB))/2.
WIDBS(NP0)=(WIDBS(NA)+WIDBS(NB))/2.
BS1(NP0)=(BS1(NA)+BS1(NB))/2.
INEW(NP0) = 1
IF(LOCK(NA) .EQ. 1 .AND. LOCK(NB) .EQ. 1) LOCK(NP0)=1
XUSR(NP0) = XX*TXSCAL - XS
YUSR(NP0) = YY*TXSCAL - YS
INSKP(NP0) = 0
!SSO(N),-
!,BS1(N)-.....SEARCH FOR OTHER ELEMENT.....
!-
!ipk dec98 set a counter
ielct=0
!ipk0ct93 DO 170 JJ = JN, NE
DO 170 JJJ=1,NDELM(NA)
JJ=NECON(NA,JJJ)
!IPK SEP02 DO 170 JJ = 1, NE
!ipkoct93 IF( IMAT(JJ) .GT. 0 .OR. IMAT(JJ) .LT.901) THE
if(jj .eq. j) go to 170
if(imat(jj) .gt. 0) then
NNCN = NCORN(JJ)
DO 160 KK = 2, NNCN, 2
IF( NOP(JJ,KK-1) .EQ. NB ) THEN
KN = MOD(KK+1,NNCN)
IF(KN .EQ. 0) KN=NNCN
IF( NOP(JJ,KN) .EQ. NA ) THEN
NOP(JJ,KK) = NP0
!ipk dec98
ielct=ielct+1
if(ielct .eq. 2) then
GO TO 180
else
go to 170
endif
!ipk dec98 end changes
ENDIF
!IPK APR98 ADD
ELSEIF( NOP(JJ,KK-1) .EQ. NA ) THEN
KN = MOD(KK+1,NNCN)
IF(KN .EQ. 0) KN=NNCN
IF( NOP(JJ,KN) .EQ. NB ) THEN
NOP(JJ,KK) = NP0
!ipk dec98
ielct=ielct+1
if(ielct .eq. 2) then
GO TO 180
else
go to 170
endif
!ipk dec98 end changes
ENDIF
!IPK APR98
ENDIF
160 CONTINUE
ENDIF
170 CONTINUE
ELSE
NM=NOP(J,K)
IF(INEW(NM) .NE. 1) THEN
XX=(CORD(NA,1)+CORD(NB,1))/2.
YY=(CORD(NA,2)+CORD(NB,2))/2.
CORD(NM,1)=XX
CORD(NM,2)=YY
WD(NM)=AA
WD1(NM)=AB
WIDTH(NM)=(WIDTH(NA)+WIDTH(NB))/2.
SS1(NM)=(SS1(NA)+SS1(NB))/2.
SS2(NM)=(SS2(NA)+SS2(NB))/2.
WIDS(NM)=(WIDS(NA)+WIDS(NB))/2.
WIDBS(NM)=(WIDBS(NA)+WIDBS(NB))/2.
BS1(NM)=(BS1(NA)+BS1(NB))/2.
INEW(NM) = 1
IF(LOCK(NA) .EQ. 1 .AND. LOCK(NB) .EQ. 1) LOCK(NM)=1
XUSR(NM) = XX*TXSCAL - XS
YUSR(NM) = YY*TXSCAL - YS
INSKP(NM) = 0
!ipk jan01
IF(NM .GT. NP) NP=NM
ELSE
WD(NM)=AA
WD1(NM)=AB
ENDIF
ENDIF
180 CONTINUE
ENDIF
190 CONTINUE
IF (NP0 .GT. NP) NP=NP0
200 CONTINUE
NHTP = nhtpsv
NMESS = nmesssv
NBRR = nbrrsv
! call WcursorShape(0)
!IPK MAY03
ICHG=0
RETURN
END
SUBROUTINE NODERR(NODER,LIMIT)
USE WINTERACTER
include 'd.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: IERR,NODER,LIMIT
call wdialogload(IDD_NODERR)
ierr=infoerror(1)
CALL WDialogSelect(IDD_NODERR)
ierr=infoerror(1)
CALL WDialogPutInteger(IDF_INTEGER2,LIMIT)
CALL WDialogPutInteger(IDF_INTEGER3,NODER)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
RETURN
ELSE
RETURN
ENDIF
enddo
RETURN
END

@ -0,0 +1,293 @@
SUBROUTINE FILLTR
USE WINTERACTER
USE IFPORT
USE BLKMAP
CHARACTER(LEN=256) :: FILTER,FNAME
CHARACTER(LEN=80) :: DATAIN,OPTIONS
CHARACTER(LEN=96) :: LOCDIR
CHARACTER(LEN=3) :: SUB
INTEGER INOUTL,NOUTL,OUTPOL
INTEGER NTRIAN(5000,2),TWO,ZERO,ntrans(5000)
INTEGER*2 RESULT
LOGICAL EXISTS
do k=1,80
options(k:k)=' '
enddo
TWO=2
ZERO=0
INOUTL=22
OUTPOL=23
VOID = - 1.0E+10
VDX = - 1.0E+9
!
! get filename
! FILTER ="Data files|*.dat;*.txt;*.map|Map file -- *.map|*.map|"
! CALL WSelectFile(FILTER,PromptOn+DirChange+Appendext,FNAME,'Load data file')
! IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
! OPEN(INOUTL,FILE=FNAME,STATUS='OLD')
! CALL IlowerCase(FNAME)
! CALL GETSUB(FNAME,SUB)
! IF(SUB .EQ. 'map') then
! IMAPIN=1
! ELSE
! IMAPIN=0
! ENDIF
! ELSE
! WRITE(*,*) 'ERROR NO FILE'
! ENDIF
IMAPIN=1
! read outline
!
IF(IMAPIN .EQ. 1) THEN
OPEN(113,FORM='BINARY',STATUS='SCRATCH')
WRITE(113) XMAP,YMAP
REWIND (113)
DO K=1,5000
IF(XMAP(K) .LT. VDX) THEN
NOUTL=K-1
GO TO 90
ENDIF
ENDDO
90 CONTINUE
ELSE
! IF(IMAPIN .EQ. 1) READ(INOUTL,'(A80)') DATAIN
DO K=1,5000
READ(INOUTL,'(A80)') DATAIN
IF(DATAIN(1:3) .EQ. 'END' .OR. DATAIN(1:3) .EQ. 'end') then
NOUTL=K-1
GO TO 100
ELSE
READ(DATAIN,*) XMAP(K),YMAP(K)
ENDIF
ENDDO
100 CONTINUE
ENDIF
IF(XMAP(NOUTL) .EQ. XMAP(1) .AND. YMAP(NOUTL) .EQ. YMAP(1)) THEN
XMAP(NOUTL)=VOID
YMAP(NOUTL)=VOID
NOUTL=NOUTL-1
LOOPC=1
ELSE
LOOPC=0
ENDIF
DO J=1, NOUTL
NTRIAN(J,1)=J
NTRIAN(J,2)=J+1
ENDDO
NTRIAN(NOUTL,2)=1
JC=NOUTL
! read contours
NOUTBE=NOUTL+1
NOUTT=NOUTL
DO N=1,100
if(imapin .eq. 1) then
noutb=noutt+2+LOOPC
ncnt=0
DO K=NOUTB,5000
if(k .eq. noutb) then
if(xmap(k) .lt. vdx) go to 300
endif
IF(XMAP(K) .LT. VDX) THEN
NOUTT=K-1
GO TO 110
ENDIF
ncnt=ncnt+1
ENDDO
110 CONTINUE
else
READ(INOUTL,'(A80)', END=300) DATAIN
IF(DATAIN(1:3) .EQ. 'END') GO TO 300
NOUTB=NOUTT+1
NCNT=0
DO K=NOUTB,5000
READ(INOUTL,'(A80)') DATAIN
IF(DATAIN(1:3) .EQ. 'END' .OR. DATAIN(1:3) .EQ. 'end') then
NOUTT=K-1
GO TO 200
ELSE
READ(DATAIN,*) XMAP(K),YMAP(K)
NCNT=NCNT+1
ENDIF
ENDDO
200 CONTINUE
endif
IF(XMAP(NOUTT) .EQ. XMAP(NOUTB) .AND. YMAP(NOUTT) .EQ. YMAP(NOUTB)) THEN
XMAP(NOUTT)=VOID
YMAP(NOUTT)=VOID
NOUTT=NOUTT-1
LOOPC=1
ELSE
LOOPC=0
ENDIF
JC=NOUTB-1
JCB=JC+1
DO J=NOUTBE, NOUTBE+NCNT-2-LOOPC
JC=JC+1
NTRIAN(J,1)=JC
NTRIAN(J,2)=JC+1
ENDDO
IF(LOOPC .EQ. 1) THEN
NTRIAN(NOUTBE+NCNT-2,1)=JC+1
NTRIAN(NOUTBE+NCNT-2,2)=JCB
NOUTBE=NOUTBE+NCNT-1
ELSE
NOUTBE=NOUTBE+NCNT-1
ENDIF
JC=JC+1
ENDDO
! copy to a file
300 CONTINUE
OPEN(OUTPOL,FILE='TEST.POLY', STATUS='UNKNOWN')
ncnt=0
DO K=1,NOUTT
if(xmap(k) .lt. vdx) cycle
ncnt=ncnt+1
ntrans(k)=ncnt
ENDDO
WRITE(OUTPOL,*) NCNT,TWO,ZERO,ZERO
ncnt=0
DO K=1,noutt
if(xmap(k) .lt. vdx) cycle
ncnt=ncnt+1
WRITE(OUTPOL,*) ncnt,XMAP(K),YMAP(K)
ENDDO
WRITE(OUTPOL,*) NOUTBE-1,ZERO
DO J=1, NOUTBE-1
WRITE(OUTPOL,*) J,ntrans(NTRIAN(J,1)),ntrans(NTRIAN(J,2))
ENDDO
WRITE(OUTPOL,*) ZERO
FLUSH (OUTPOL)
REWIND (OUTPOL)
CLOSE (OUTPOL)
! close (inoutl)
! setup options
! OPTIONS = ' -pqa5000V TEST'
OPTIONS(1:3) = ' -p'
nct=3
iswq=1
iswy=0
id1=100
CALL PANELFILLT(ISWQ,ISWY,ID1)
IF(ISWQ .EQ. 1) THEN
NCT=NCT+1
OPTIONS(NCT:NCT)='q'
ENDIF
IF(ISWY .EQ. 1) THEN
NCT=NCT+1
OPTIONS(NCT:NCT)='q'
ENDIF
ID1=ID1**2/2
WRITE(OPTIONS(NCT+1:NCT+12),'(''a'',I6.6,'' TEST'')') ID1
! go to TRIANGLE
INQUIRE (FILE = 'test.1.ele', EXIST = exists)
if(exists) then
open(77,file= 'test.1.ele')
close(77,status='DELETE')
ENDIF
INQUIRE (FILE = 'test.1.node', EXIST = exists)
if(exists) then
open(77,file= 'test.1.node')
close(77,status='DELETE')
ENDIF
INQUIRE (FILE = 'test.1.poly', EXIST = exists)
if(exists) then
open(77,file= 'test.1.poly')
close(77,status='DELETE')
ENDIF
INQUIRE (FILE = "C:\Program Files\RMA\TRIANGLE.EXE", EXIST = exists)
if(.not. exists) then
INQUIRE (FILE = "TRIANGLE.EXE", EXIST = exists)
if(.not. exists) then
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'TRIANGLE is not available in '//CHAR(13)//&
'C:\Program Files\RMA\ directory'//CHAR(13)//'Do you wish to define directory?'&
,'WARNING TRIANGLE IS NOT AVAILABLE')
! If answer 'No', return
!
IF (WInfoDialog(4).EQ.2) return
CALL GETDIR(LOCDIR)
else
LOCDIR(1:8)='TRIANGLE'
! WRITE(155,*) LOCDIR
RESULT= RUNQQ(LOCDIR, OPTIONS)
GO TO 600
endif
endif
RESULT= RUNQQ("C:\Program Files\RMA\TRIANGLE", OPTIONS)
! RESULT= RUNQQ("TRIANGLE", OPTIONS)
600 CONTINUE
IF(IMAPIN .EQ. 1) THEN
READ(113) XMAP,YMAP
CLOSE (113)
ENDIF
IIN=10
OPEN(IIN,FILE='TEST.1.ELE', STATUS='OLD')
CALL GETNEWFIL(IIN,0,1,1)
! finish up
RETURN
END
SUBROUTINE PANELFILLT(N1,N2,N3)
use winteracter
implicit none
SAVE
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,N3,IERR,ITIME
! real ::
! character*3 ::
DATA ITIME/0/
! IF(ITIME .EQ. 0) THEN
! ITIME=1
! N1=1
! N2=0
! N3=100
! ENDIF
call wdialogload(IDD_FTRIAN)
ierr=infoerror(1)
CALL WDialogPutCheckBox(idf_check1,n1)
CALL WDialogPutCheckBox(idf_check2,n2)
CALL WDialogPutInteger(idf_integer1,n3)
CALL WDialogSelect(IDD_FTRIAN)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetCheckBox(idf_check1,n1)
CALL WDialogGetCheckBox(idf_check2,n2)
CALL WDialogGetInteger(idf_integer1,n3)
ELSEIF(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
N3=-1
ENDIF
RETURN
END

@ -0,0 +1,145 @@
SUBROUTINE FORMGP
USE WINTERACTER
USE BLK1MOD
include 'd.inc'
CHARACTER*47 MESSAGE
DATA MESSAGE /'Enter Group Number'/
DATA ITIME/0/
! SWITCH TO GROUP ACTIVITY
IF(IQSW(1) .EQ. 1) IQSW(1)=2
IF(IQSW(2) .EQ. 1) IQSW(2)=2
! IF FIRST TIME ASK TO LOAD FILE OR SET GROUPS = 1
if(ITIME .EQ. 0) THEN
! ALLOCATE ARRAY SIZES
IF(.NOT. ALLOCATED(IGRPNUM)) THEN
ALLOCATE (IGRPNUM(25,MAXE),MAXENT(25))
CALL TOPAR
ENDIF
ISW=2
ITIME=1
ELSE
CALL TOPAR
ENDIF
! ASSIGN A NUMBER TO THE NEW GROUP
call wdialogload(IDD_GETINT)
ierr=infoerror(1)
CALL WDialogSelect(IDD_GETINT)
ierr=infoerror(1)
CALL WDialogPutString(IDF_STRING1,MESSAGE)
CALL WDialogPutInteger(IDF_INTEGER1,ISW)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
! Branch depending on type of message.
!
DO
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,ISW)
GO TO 200
ENDIF
ENDDO
200 CONTINUE
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish add these elements to the current group?'//&
CHAR(13)//' ','ADD ELEMENTS?')
! If answer 'No', start afresh
!
IF (WInfoDialog(4).EQ.2) then
! STORE GROUP NUMBERS STARTING AT 1
DO K=1,NEFL
IGRPNUM(ISW,K)=NEFLAG(K)
ENDDO
MAXENT(ISW)=NEFL
ELSE
!
! FOR EACH ELEMENT SEARCH FIRST IF NOT FOUND ADD TO THE END
DO K=1,NEFL
DO J=1,MAXENT(ISW)
IF(NEFLAG(K) .EQ. IGRPNUM(ISW,J)) GO TO 240
ENDDO
MAXENT(ISW)=MAXENT(ISW)+1
IGRPNUM(ISW,MAXENT(ISW))=NEFLAG(K)
240 CONTINUE
ENDDO
ENDIF
! REMOVE FROM OLD LIST
DO I=1,25
IF(I .NE. ISW) THEN
DO J=1,MAXENT(I)
DO K=1,NEFL
IF(NEFLAG(K) .EQ. IGRPNUM(I,J)) THEN
IGRPNUM(I,J)=0
GO TO 260
ENDIF
ENDDO
260 CONTINUE
ENDDO
JT=0
LIMIT=MAXENT(I)
J=0
270 J=J+1
275 IF(J+JT .LE. LIMIT) THEN
IF(IGRPNUM(I,J+JT) .EQ. 0) THEN
JT=JT+1
GO TO 275
ENDIF
IGRPNUM(I,J)=IGRPNUM(I,J+JT)
GO TO 270
ENDIF
DO J=MAXENT(I),MAXENT(I)+1-JT,-1
IGRPNUM(I,J)=0
ENDDO
MAXENT(I)=MAXENT(I)-JT
ENDIF
ENDDO
CALL TOSER
RETURN
END
SUBROUTINE TOSER
USE BLK1MOD
DO I=1,25
DO J=1,MAXENT(I)
IGRPSER(IGRPNUM(I,J))=I
ENDDO
ENDDO
RETURN
END
SUBROUTINE TOPAR
USE BLK1MOD
MAXENT=0
IGRPNUM=0
DO K=1,NE
I=IGRPSER(K)
MAXENT(I)=MAXENT(I)+1
IGRPNUM(I,MAXENT(I))=K
ENDDO
RETURN
END

@ -0,0 +1,455 @@
subroutine formshp2(istyp,ivecact)
use winteracter
include 'D.inc'
COMMON /OPTION/ SWITCH(4),NUMV,CONTUR(99),IQUAL,XCSQ,NUMCOL
character*1 ai1a,ai1b,ai1c,ai1d,label,ai1f
character*3 sub
character*4 ai1,ai7,aai7,ai8,ai9,anrs,aii,aioff
character*10 as
character*11 name
character*80 headr
character*255 fnamein,filter
integer*2 i3s,i4s
integer status,i1,i2,i3,i4,i5,i6,i7,i8,i9,ia1,ia7,ia8,ia9,nrs&
,nars,ii,ioff,iaoff,i1a,i1b,i1c,i1d,istyp,nptemp
integer*8 i88
real*8 fp1,fp2,fp3,fp4,fp5,fp6,fp7,fp8,bx(1000),by(1000),bm(1000)&
,bxmn,bymn,bxmx,bymx,bmmn,bmmx,axmn,aymn,axmx,aymx,fz,ammn,ammx
real bed,val
integer ityp,icl
allocatable bed(:),val(:,:),ityp(:),icl(:)
LOGICAL OPENED
equivalence(ai1,ia1),(ai7,ia7),(aii,ii),(anrs,nrs),(aioff,ioff)
if(.not. allocated(bed)) then
allocate (bed(250000),val(250000,4),ityp(250000),icl(250000))
bed=0.
val=0.
ityp=0
icl=0
endif
filter='Shape file *.shp|*.shp|'
INQUIRE(99,opened= OPENED)
IF( .NOT. OPENED) THEN
CALL WSelectFile(filter,SaveDialog+PromptOn+AppendExt,FNAMEIN,'Shapefile Name')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
open(99,file=fnamein,form='binary')
sub='shx'
call ADDSUB(fnamein,sub)
open(98,file=fnamein,form='binary')
sub='dbf'
call ADDSUB(fnamein,sub)
open(97,file=fnamein,form='binary')
ELSE
RETURN
ENDIF
ENDIF
! read data file to establish sizes and max/min
nfils=50
axmn=1.e36
aymn=1.e36
ammn=1.e36
axmx=-1.e36
aymx=-1.e36
ammx=-1.e36
! if(ivecact .ne. 1) then
! read(70,'(a80)') headr
! read(70,'(a80)') headr
! read(headr(9:16),'(i8)') istyp
! endif
do i=1,250000
if(istyp .eq. 25) then
read(113,end=100) iclt,ityp(i),npts,(bx(j),by(j),bm(j),j=1,npts)
do j=1,npts
write(155,*) bx(j),by(j),bm(j)
enddo
icl(i)=iclt
write(155,*) icl(i),ityp(i),npts
do j=1,npts
axmn=min(axmn,bx(j))
aymn=min(aymn,by(j))
ammn=min(ammn,bm(j))
axmx=max(axmx,bx(j))
aymx=max(aymx,by(j))
ammx=max(ammx,bm(j))
enddo
! NEED TO FIX THIS
nfils=nfils+36+12*npts
! NEED TO FIX THIS
elseif(istyp .eq. 5) then
IF(IVECACT .EQ. 5) THEN
read(113,end=100) iclt,ityp(i),npts,(bx(j),by(j),bm(j),j=1,npts)
ELSE
read(113,end=100) iclt,npts,(bx(j),by(j),j=1,npts)
ENDIF
icl(i)=iclt
do j=1,npts
axmn=min(axmn,bx(j))
aymn=min(aymn,by(j))
axmx=max(axmx,bx(j))
aymx=max(aymx,by(j))
enddo
ammn=0.
ammx=0.
nfils=nfils+28+8*npts
elseif(istyp .eq. 3) then
read(113,end=100) npts,(bx(j),by(j),j=1,npts),d1
do j=1,npts
axmn=min(axmn,bx(j))
aymn=min(aymn,by(j))
axmx=max(axmx,bx(j))
aymx=max(aymx,by(j))
enddo
ammn=0.
ammx=0.
nfils=nfils+28+8*npts
elseif(istyp .eq. 1 .and. ivecact .eq. 0) then
read(70,9875,end=100) bx(1),by(1)
9875 format(10x,2f20.0,f10.0)
axmn=min(axmn,bx(1))
aymn=min(aymn,by(1))
axmx=max(axmx,bx(1))
aymx=max(aymx,by(1))
ammn=0.
ammx=0.
nfils=nfils+14
elseif(istyp .eq. 1 .and. ivecact .eq. 1) then
! read(113,end=100) NR,bxt,byt,d1,d2,d3,d4,d5,d6
read(113,end=100) NR,bxt,byt,d1,d2,d3,d4
9874 format(9x,8f14.0)
axmn=min(axmn,bxt)
aymn=min(aymn,byt)
axmx=max(axmx,bxt)
aymx=max(aymx,byt)
ammn=0.
ammx=0.
nfils=nfils+14
elseif(istyp .eq. 1 .and. ivecact .eq. 6) then
read(113,end=100) NR,bx(1),by(1),d1
axmn=min(axmn,bx(1))
aymn=min(aymn,by(1))
axmx=max(axmx,bx(1))
aymx=max(aymx,by(1))
ammn=0.
ammx=0.
nfils=nfils+14
endif
numdat=i
enddo
100 rewind 113
! read(70,'(a80)') headr
!c if(ivecact .eq. 1) read(70,'(a80)') headr
!c setup header
ia1=9994
call BTOL(ai1,i1)
i2=0
i3=0
i4=0
i5=0
i6=0
ia7=nfils
call BTOL(ai7,i7)
i8=1000
i9=istyp
fz=0.
write(99) i1,i2,i3,i4,i5,i6,i7,i8,i9,axmn,aymn,axmx,aymx,fz,fz,ammn,ammx
ia7=50+4*numdat
call BTOL(ai7,i7)
write(98) i1,i2,i3,i4,i5,i6,i7,i8,i9,axmn,aymn,axmx,aymx,fz,fz,ammn,ammx
ioff=50
! header now complete for shp and shx options
do i=1,numdat
if(istyp .eq. 25) then
read(113,end=100) iclt,ityp(i),npts,(bx(j),by(j),bm(j),j=1,npts)
icl(i)=iclt
nrs=32+12*npts
nrsc=nrs+4
! write(155,*) 'nrs',nrs
call btol(anrs,nars)
elseif(istyp .eq. 5) then
IF(IVECACT .EQ. 5) THEN
read(113,end=100) iclt,ityp(i),npts,(bx(j),by(j),bm(j),j=1,npts)
ELSE
read(113) iclt,npts,(bx(j),by(j),j=1,npts)
ENDIF
icl(i)=iclt
nrs=24+8*npts
nrsc=nrs+4
! write(155,*) 'nrs',nrs
call btol(anrs,nars)
elseif(istyp .eq. 3) then
read(113) npts,(bx(j),by(j),j=1,npts),val(i,1)
icl(i)=iclt
nrs=24+8*npts
nrsc=nrs+4
! write(155,*) 'nrs',nrs
call btol(anrs,nars)
elseif(istyp .eq. 1) then
if(ivecact .eq. 0) then
read(70,9875) bx(1),by(1),bed(i)
elseif(ivecact .eq. 6) then
read(113) ityp(i),bx(1),by(1),val(i,1)
else
read(113) idum,bxt,byt,(val(i,j),j=1,4)
bx(1)=bxt
by(1)=byt
endif
nrs=10
nrsc=14
! write(155,*) 'nrs',nrs
call btol(anrs,nars)
endif
ii=i
call btol(aii,nrec)
write(99) nrec,nars
if(istyp .eq. 25) then
j1=istyp
j2=1
bxmn=bx(1)
bymn=by(1)
bmmn=bm(1)
bxmx=bx(1)
bymx=by(1)
bmmx=bm(1)
do k=2,npts
bxmn=min(bxmn,bx(k))
bymn=min(bymn,by(k))
bmmn=min(bmmn,bm(k))
bxmx=max(bxmx,bx(k))
bymx=max(bymx,by(k))
bmmx=max(bmmx,bm(k))
enddo
j3=npts
j4=0
write(99) j1,bxmn,bymn,bxmx,bymx,j2,j3,j4
do k=1,npts
write(99) bx(k),by(k)
enddo
write(99) bmmn,bmmx
do k=1,npts
write(99) bm(k)
enddo
elseif(istyp .gt. 2) then
j1=istyp
j2=1
bxmn=bx(1)
bymn=by(1)
bxmx=bx(1)
bymx=by(1)
do k=2,npts
bxmn=min(bxmn,bx(k))
bymn=min(bymn,by(k))
bxmx=max(bxmx,bx(k))
bymx=max(bymx,by(k))
enddo
j3=npts
j4=0
write(99) j1,bxmn,bymn,bxmx,bymx,j2,j3,j4
! write(155,*) j1,bxmn,bymn,bxmx,bymx,j2,j3,j4
do k=1,npts
write(99) bx(k),by(k)
! write(155,*) k,bx(k),by(k)
enddo
elseif(istyp .eq. 1) then
j4=1
write(99) j4,bx(1),by(1)
endif
! write(155,*) ioff,nrs
call btol(aioff,iaoff)
write(98) iaoff,nars
ioff=ioff+nrsc
enddo
i1a=3
i1b=115
i1c=12
i1d=9
ai1a=char(i1a)
ai1b=char(i1b)
ai1c=char(i1c)
ai1d=char(i1d)
i2=numdat
if(ivecact .eq. 0 .or. ivecact .gt. 3) then
i4s=18
i3s=97
elseif(ivecact .eq. 3) then
i4s=11
i3s=65
else
i4s=37
i3s=161
endif
i5=0
write(97) ai1a,ai1b,ai1c,ai1d,i2,i3s,i4s,i5
ai1a=char(0)
ai1b='W'
write(97) i5,i5,i5,ai1a,ai1a,ai1b,ai1a
i2a=0
IF(ISTYP .EQ. 25) THEN
name='ID '
label='N'
i2=0
ai1a=char(8)
ai1b=char(0)
ai1c=char(0)
ai1f=char(13)
ai1d=char(0)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c
name='Type '
label='N'
i2=0
ai1a=char(9)
ai1b=char(0)
ai1c=char(0)
ai1f=char(13)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c,ai1f
ELSEIF(ISTYP .EQ. 5) THEN
name='ID '
label='N'
i2=0
ai1a=char(8)
ai1b=char(0)
ai1c=char(0)
ai1f=char(13)
ai1d=char(0)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c
name='Contour '
label='N'
i2=0
ai1a=char(9)
ai1b=char(2)
IF(IVECACT .EQ. 5) THEN
name='TYPE * '
label='N'
ai1b=char(0)
ENDIF
ai1c=char(0)
ai1f=char(13)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c,ai1f
elseif(istyp .eq. 3) then
name='CONTOUR '
label='N'
i2=0
ai1a=char(10)
ai1b=char(4)
ai1c=char(0)
ai1f=char(13)
ai1d=char(0)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c,ai1f
elseif(istyp .eq. 1) then
if(ivecact .eq. 6) then
name='NODE '
label='N'
i2=0
ai1a=char(8)
ai1b=char(0)
ai1c=char(0)
ai1f=char(13)
ai1d=char(0)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c
name='Bed Elev '
label='N'
i2=0
ai1a=char(9)
ai1b=char(0)
ai1c=char(0)
ai1f=char(13)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c,ai1f
else
name='VEL '
label='N'
i2=0
ai1a=char(9)
ai1b=char(4)
ai1c=char(0)
ai1f=char(13)
ai1d=char(0)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c
name='DIR '
label='N'
i2=0
ai1a=char(9)
ai1b=char(2)
ai1c=char(0)
ai1f=char(13)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c
name='DEP '
label='N'
i2=0
ai1a=char(9)
ai1b=char(3)
ai1c=char(0)
ai1f=char(13)
write(97)name,label,i2,ai1a,ai1b,i2a,i2a,i2a,ai1d,ai1c
name='WS-ELEV '
label='N'
i2=0
ai1a=char(9)
ai1b=char(3)
ai1c=char(0)
ai1f=char(13)
write(97)name,label,i2,ai1a,ai1b,i2,i2,i2,ai1d,ai1c
write(97)ai1f
endif
endif
ai1a=char(32)
ai1f=char(32)
do i=1,numdat
write(97) ai1a
if(istyp .eq. 25) then
write(as(1:8),'(i8)') icl(i)
write(97) as(1:8)
write(as(1:9),'(i9)') ityp(i)
write(97) as(1:9)
elseif(istyp .eq. 5) then
write(as(1:8),'(i8)') icl(i)
write(97) as(1:8)
if(IVECACT .EQ. 5) then
write(as(1:9),'(i9)') ityp(i)
write(97) as(1:9)
else
ficl=contur(icl(i))
write(as(1:9),'(f9.2)') ficl
write(97) as(1:9)
endif
elseif(istyp .eq. 3) then
write(as(1:10),'(f10.4)') val(i,1)
write(97) as(1:10)
elseif(istyp .eq. 1) then
if(ivecact .eq. 0) then
write(as(1:8),'(i8)') i
write(97) as(1:8)
write(as(1:8),'(f8.2)') bed(i)
write(97) as(1:8)
elseif(ivecact .eq. 6) then
write(as(1:8),'(i8)') ityp(i)
write(97) as(1:8)
write(as(1:9),'(f9.2)') val(i,1)
write(97) as(1:9)
else
write(as(1:9),'(f9.4)') val(i,1)
write(97) as(1:9)
write(as(1:9),'(f9.2)') val(i,2)
write(97) as(1:9)
write(as(1:9),'(f9.3)') val(i,3)
write(97) as(1:9)
write(as(1:9),'(f9.3)') val(i,4)
write(97) as(1:9)
endif
endif
enddo
ai1a=char(26)
write(97) ai1a
close (99)
close (98)
close (97)
return
end

@ -0,0 +1,29 @@
SUBROUTINE FRMNODQ(X1,Y1,X2,Y2,X3,Y3,X4,Y4,NPTS1,NPTS2)
USE BLK1MOD
! INCLUDE 'BLK1.COM'
! X1,X2,X3,X4 AND Y1,Y2,Y3,Y4 are vertices of quad
! NPTS1 and NPTS2 are the nominal number of elements on each side
! Work along first side AND backwards along second line
DO N=1,NPTS1-1
RATIO=FLOAT(N)/FLOAT(NPTS1)
X12=X1+RATIO*(X2-X1)
Y12=Y1+RATIO*(Y2-Y1)
X43=X4+RATIO*(X3-X4)
Y43=Y4+RATIO*(Y3-Y4)
! Now get interior points
DO M=1,NPTS2-1
RATIO=FLOAT(M)/FLOAT(NPTS2)
XNEW=X12+RATIO*(X43-X12)
YNEW=Y12+RATIO*(Y43-Y12)
CALL DEFNOD(XNEW,YNEW)
ENDDO
ENDDO
RETURN
END

@ -0,0 +1,144 @@
SUBROUTINE GETALLANGS
USE BLK1MOD
USE BLK2MOD
SAVE ICOUNTMX
DIMENSION ANGA(2),ANGB(2)
DATA ICOUNTMX/0/
IF(.NOT. ALLOCATED(NKEY1)) THEN
ALLOCATE (NKEY1(MAXE))
ENDIF
IF(.NOT. ALLOCATED(ANGOP)) THEN
ALLOCATE (ANGOP(MAXP))
ENDIF
CALL HEDR
ICOUNTMX=50
ILMIT=0
CALL GEtrev(ICOUNTMX,ILMIT)
IF(ICOUNTMX .LT. 0) RETURN
NKEY1=0
! set all the nodal angles negative
ANGOP=-1.
! get elements connected to nodes table
IERR=0
CALL NDNECON(IERR)
! loop on the elements to find mid-sides
DO N=1,NE
! work only with triangles
IF(NCORN(N) .EQ. 6) THEN
! go to each mid-side
DO K=2,6,2
N1=NOP(N,K-1)
KN=MOD(K+1,6)
N3=NOP(N,KN)
KP=MOD(K+3,6)
N2=NOP(N,KP)
NCUR=NOP(N,K)
IF(NCUR .EQ. 0) THEN
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK, &
'You have tried to reverse before executing "FILL"'//CHAR(13) &
//'Reversing terminated',&
'UNABLE TO REVERSE')
! CALL SYMBL(0.,7.30,0.20,STRELS,0.,60)
RETURN
ENDIF
! call GETANG to get angle opposite N1-N3 line
ANGTMP=GETANG(N1,N2,N3)
IF(ANGTMP .GT. ANGOP(NCUR)) ANGOP(NCUR)=ANGTMP
ENDDO
ENDIF
ENDDO
! get the angles in ascending order
CALL SORT(ANGOP,ICN,NP)
ICOUNT=0
! loop backwards and use the sorrt key ICN
DO J=NP,1,-1
MIDND=ICN(J)
! only work when angles greater than 90 deg
IF(ANGOP(MIDND) .GT. 1.5708) THEN
! check if there are two elements connected to this mid side
IF(NECON(MIDND,2) .GT. 0) THEN
! make sure the opposite elements are not quadrilaterals
IF(NCORN(NECON(MIDND,1)) .EQ. 6 .AND. NCORN(NECON(MIDND,2)) .EQ. 6) THEN
! only proceed when the first mid-side has not been processed
IF(NKEY1(NECON(MIDND,1)) .EQ. 0) THEN
NEL1=NECON(MIDND,1)
! only proceed when the second mid-side has not been processed
IF(NKEY1(NECON(MIDND,2)) .EQ. 0) THEN
! we really have a candidate lest check if it will make the angles worse
! first find the locations of the mid sides in the order data to get more angles
DO KK=1,2
DO K=2,6,2
! test for a fit
IF(NOP(NECON(MIDND,KK),K) .EQ. MIDND) THEN
! get angles before and after
! corner before
N1=NOP(NECON(MIDND,KK),K-1)
! corner after
N3=MOD(K+1,6)
N3=NOP(NECON(MIDND,KK),N3)
! test for possible equal elev
if(ilmit .eq. 1) then
if(wd(n1) .gt. -9000.) then
if(wd(n1) .eq. wd(n3)) go to 180
endif
endif
! corner opposite
N2=MOD(K+3,6)
N2=NOP(NECON(MIDND,KK),N2)
! call GETANG to get angle opposite N2-N3 LINE
ANGB(KK)=GETANG(N2,N1,N3)
! call GETANG to get angle opposite N1-N2 LINE
ANGA(KK)=GETANG(N1,N3,N2)
ENDIF
ENDDO
ENDDO
! test if the side angles are larger, if so skip out
IF(ANGOP(MIDND) .LT. ANGB(2)+ANGA(1)) GO TO 180
IF(ANGOP(MIDND) .LT. ANGB(1)+ANGA(2)) GO TO 180
! finally we can proceed
ICOUNT=ICOUNT+1
! NELPR(ICOUNT,2)=NECON(MIDND,2)
! NELPR(ICOUNT,1)=NEL1
NKEY1(NECON(MIDND,1))=1
NKEY1(NECON(MIDND,2))=1
N1=NEL1
N2=NECON(MIDND,2)
! carry out reversal
CALL REVERS(N1,N2)
! show the elements
call fillemc(n1,4)
call fillemc(n2,4)
IF(ICOUNT .GE. ICOUNTMX) GO TO 200
ENDIF
ENDIF
ENDIF
ENDIF
ELSE
GO TO 200
ENDIF
180 CONTINUE
ENDDO
200 CONTINUE
RETURN
END
FUNCTION GETANG(N1,N2,N3)
USE BLK1MOD
A=SQRT((XUSR(N1)-XUSR(N2))**2+(YUSR(N1)-YUSR(N2))**2)
B=SQRT((XUSR(N2)-XUSR(N3))**2+(YUSR(N2)-YUSR(N3))**2)
C=SQRT((XUSR(N3)-XUSR(N1))**2+(YUSR(N3)-YUSR(N1))**2)
ANG1=(A**2+B**2-C**2)/(2.*A*B)
IF(ANG1 .GT. 1.) ANG1=1.
GETANG=ACOS(ANG1)
RETURN
END

@ -0,0 +1,241 @@
SUBROUTINE GETCRS(CRSTIT)
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*8 ID1
CHARACTER*72 DLIN1,CRSTIT
!IPK JUN06
DATA VOIDCR/-1.E15/
XCRS=VOIDCR
YCRS=VOIDCR
NRIVCR1=0
NRIVCR2=0
!ipk jun11
NOREACH=0
NRIVL=0
call ginpt(icrin,id1,dlin1)
IF(ID1(1:2) .EQ. 'TC') THEN
CRSTIT=DLIN1
call ginpt(icrin,id1,dlin1)
ELSE
CALL WMessageBox(0,3,1,'Cross-section Title not found'//char(13)//&
'Cross-section file input terminated','ERROR')
return
ENDIF
N=0
200 N=N+1
IF(N .GT. MCRS) THEN
CALL WMessageBox(0,3,1,'Allowable number of sections (1000) exceeded'//char(13)//&
'Cross-section file input terminated','ERROR')
return
ENDIF
IF(ID1(1:3) .EQ. 'RCH') THEN
READ(DLIN1,'(I8)') NOREACHTMP
write(90,'(a)') 'rch',id1,dlin1
Call ginpt(icrin,id1,dlin1)
ENDIF
IF(ID1(1:3) .EQ. 'ICS') THEN
READ(DLIN1,'(2I8,8x,2f16.0)') IVMIL(N),NRIVL(IVMIL(N)),XCRS(IVMIL(N)),YCRS(IVMIL(N))
write(90,'(a)') 'ics',id1,dlin1
NOREACH(IVMIL(N))=NOREACHTMP
IF(NRIVL(IVMIL(N)) .GT. MPTS) THEN
CALL WMessageBox(0,3,1,'Allowable number of points in a cross-section (75) exceeded'//char(13)//&
'Cross-section file input terminated','ERROR')
return
ENDIF
! IF(NOREACH(N) .EQ. 0) THEN
! IF(N .GT. 1) THEN
! NOREACH(N)=NOREACH(N-1)
! ELSE
! NOREACH(N)=1
! ENDIF
! ENDIF
call ginpt(icrin,id1,dlin1)
DO I=1,NRIVL(IVMIL(N))
write(90,'(a)') 'crs',id1,dlin1
READ(DLIN1,'(3F8.0)') (CRSDAT(IVMIL(N),I,J),J=1,3)
!IPK JUN04
if(i .gt. 1) then
CRSDAT(IVMIL(N),I,2)=CRSDAT(IVMIL(N),I-1,2)+&
(CRSDAT(IVMIL(N),I,1)-CRSDAT(IVMIL(N),I-1,1))*&
(CRSDAT(IVMIL(N),I,3)+CRSDAT(IVMIL(N),I-1,3))/2.
endif
call ginpt(icrin,id1,dlin1)
ENDDO
NCRSEC=N
! TEST NCRSEC=MAX(N,IVMIL(N))
GO TO 200
ENDIF
!ipk jun06 DO N=1,NCRSEC
DO N=1,MCRS
IF(ID1(1:3) .EQ. 'XYL') THEN
READ(DLIN1,'(I8,2F16.0)') NN,XCRS(NN),YCRS(NN)
!IPK JUN06
IF(NN .GT. NCRSEC) NCRSEC=NN
call ginpt(icrin,id1,dlin1)
ELSE
GO TO 400
ENDIF
ENDDO
400 CONTINUE
DO N=1,MAXP
IF(ID1(1:3) .EQ. 'CRF') THEN
READ(DLIN1,'(2I8,F8.0,I8,F8.0)') NODCRS&
,NRIVCR1(NODCRS),WTRIVCR1(NODCRS)&
,NRIVCR2(NODCRS),WTRIVCR2(NODCRS)
call ginpt(icrin,id1,dlin1)
ELSE
GO TO 500
ENDIF
ENDDO
500 CONTINUE
CLOSE(ICRIN)
! CHECK THE DATA LOADED
IERR=0
DO N=1,NE
IF(IMAT(N) .LT. 900) THEN
IF(NCORN(N) .EQ. 3 .OR. NCORN(N) .EQ. 5) THEN
DO J=1,3,2
IF(NRIVCR1(NOP(N,J)) .NE. 0) THEN
WD1(NOP(N,J))=&
CRSDAT(NRIVCR1(NOP(N,J)),1,1)*WTRIVCR1(NOP(N,J))+&
CRSDAT(NRIVCR2(NOP(N,J)),1,1)*WTRIVCR2(NOP(N,J))
! ELSE
! WRITE(75,*) ' NO CROSS-SECTION FILE REFERENCE FOR',NOP(N,J)
! WRITE(75,*) ' EXECUTION TERMINATED'
! WRITE(*,*) ' NO CROSS-SECTION FILE REFERENCE FOR',NOP(N,J)
! WRITE(*,*) ' EXECUTION TERMINATED'
! IERR=IERR+1
ELSE
WD1(NOP(N,J))=WD(NOP(N,J))
ENDIF
!
ENDDO
WD1(NOP(N,2))=(WD1(NOP(N,1))+WD1(NOP(N,3)))/2.
!
ELSE
DO J=1,NCORN(N)
WD1(NOP(N,J))=WD(NOP(N,J))
ENDDO
ENDIF
ENDIF
ENDDO
RETURN
END
SUBROUTINE WRTCRS(ICROUT,CRSTIT)
USE BLK1MOD
! INCLUDE 'BLK1.COM'
! COMMON/ICN1/ ICN(MAXP)
CHARACTER*8 ID1,ENDDAT
CHARACTER*72 CRSTIT
!IPK JUN06
DATA VOIDCRP/-1.E14/
DO J=1,MAXP
ICN(J)=0
END DO
! First sort out the potential midsides
! Note that transition elements caues a problem
! Find these first
DO 200 N=1,NE
if(NCORN(N) .GT. 5) GO TO 200
IF(NCORN(N) .EQ. 5 .AND. IMAT(N) .LT. 901) THEN
!
! We have a transition mark node number as if it were corner
!
ICN(NOP(N,3))=1
ICN(NOP(N,1))=2
ICN(NOP(N,4))=2
ICN(NOP(N,5))=2
ELSE
!
! Store ICN = 2 for corner nodes
!
NCN=NCORN(N)
!IPKOCT93 IF(IMAT(N) .GT. 900) THEN
IF(IMAT(N) .GT. 900 .AND. IMAT(N) .LT. 904) THEN
MST=1
ELSE
MST=2
ENDIF
DO 180 M=1,NCN,MST
ICN(NOP(N,M))=2
180 CONTINUE
ENDIF
200 END DO
ID1='TC '
WRITE(ICROUT,'(A8,A72)') ID1,CRSTIT
DO N=1,NCRSEC
!ipk jun06
!! IF(NRIVL(N) .GT. 0) THEN
ID1='RCH '
WRITE(ICROUT,'(A8,I8)') ID1,NOREACH(IVMIL(N))
ID1='ICS '
!! write(icrout,'(A8,2I8,8x,2f16.4)') ID1,IVMIL(N),NRIVL(N),XCRS(N),YCRS(N)
!!jul15 write(icrout,'(A8,2I8,8x,2f16.4)') ID1,N,NRIVL(N),XCRS(N),YCRS(N)
write(icrout,'(A8,2I8,8x,2f16.4)') ID1,IVMIL(N),NRIVL(IVMIL(N)),XCRS(IVMIL(N)),YCRS(IVMIL(N))
ID1='CRS '
DO I=1,NRIVL(IVMIL(N))
if(crsdat(IVMIL(N),i,2) .gt. 999999.) then
WRITE(ICROUT,'(A8,3F8.0)') ID1,(CRSDAT(IVMIL(N),I,J),J=1,3)
elseif(crsdat(IVMIL(N),i,2) .gt. 99999.) then
WRITE(ICROUT,'(A8,3F8.1)') ID1,(CRSDAT(IVMIL(N),I,J),J=1,3)
else
WRITE(ICROUT,'(A8,3F8.2)') ID1,(CRSDAT(IVMIL(N),I,J),J=1,3)
endif
ENDDO
!ipk jun06
!! ENDIF
ENDDO
DO N=1,NCRSEC
!ipk jun06
IF(XCRS(N) .GT. VOIDCRP) THEN
ID1='XYL '
WRITE(ICROUT,'(A8,I8,2F16.4)') ID1,IVMIL(N),XCRS(IVMIL(N)),YCRS(IVMIL(N))
!ipk jun06
ENDIF
ENDDO
ID1='CRF '
DO N=1,NP
IF(ICN(N) .EQ. 2) THEN
IF(NRIVCR1(N) .GT. 0) THEN
WRITE(ICROUT,'(A8,2I8,F8.4,I8,F8.4)') ID1,N&
,NRIVCR1(N),WTRIVCR1(N)&
,NRIVCR2(N),WTRIVCR2(N)
ENDIF
ENDIF
ENDDO
ENDDAT='ENDDATA '
WRITE(ICROUT,'(A8)') ENDDAT
RETURN
END

@ -0,0 +1,485 @@
!IPK LAST UPDATE OCT 23 2015 ADD DECODAT OPTION FOR INPUT
!IPK LAST UPDATE nov 20 2014 IMPLEMENT BINARY FILE SAVE FOR ELEMENT INFLOW DATA
!IPK LAST UPDATE nov 17 2014 initialise TPRVH FOR ALL TYPES
!IPK last update oct 22 2012 initialize TPRVH
!IPK LAST UPDATE MAY 04 2011 FIX BUG CAUSED WHEN SPANNING MULTIPLE FILES
!IPK LAST UPDATE SEPT 3 2007 ADD FULL DATE TO INPUT
!IPK last update sept 01 2007 permit comma delimited entry of data
!IPK LAST UPDATE SEP 06 2004 ADD ERROR FILE
! Last change: IPK 19 Sep 2000 11:44 am
!IPK LAST UPDATE APR 16 1997
!IPK last update Jan 23 1996
!IPK last update jan 9 1996
SUBROUTINE GETEQ
!IPK APR97 SAVE
use winteracter
USE BLKELTLD
include 'D.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
!IPK AUG05 SAVE
INTEGER JCNV(12)
CHARACTER*32 FNAM
CHARACTER*8 ID
CHARACTER*80 QHTITLE,DLIN
CHARACTER*10 DATE
character*255 fnamein,filter
!IPK oct 12 add initial value
data tprvh/0./,ITIME/0/
DATA JCNV/0,31,59,90,120,151,181,212,243,273,304,334/
LOGICAL OPENED
IF(ITIME .EQ. 0) THEN
DAYOFY=-9999
ITIME=1
IQEUNIT=0
IBINEL=0
IRMATYP=10
NQHYD=0
NQP=0
ENDIF
call wdialogload(IDD_CHOOSEMODEL)
ierr=infoerror(1)
CALL WDialogSelect(IDD_CHOOSEMODEL)
ierr=infoerror(1)
call wdialogputRadioButton(idf_radio1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
call wdialoggetradiobutton(idf_radio1,ntyp)
GO TO 50
ENDIF
enddo
50 CONTINUE
IF(NTYP .EQ. 1) IRMATYP=2
IF(NTYP .EQ. 2) IRMATYP=10
IF(NTYP .EQ. 3) THEN
IRMATYP=11
NQP=1
call wdialogload(IDD_GETINT)
ierr=infoerror(1)
CALL WDialogSelect(IDD_GETINT)
ierr=infoerror(1)
CALL WDialogPutString(IDF_STRING1,'NUMBER OF WQ GRAPH ENTRIES')
CALL WDialogPutInteger(IDF_INTEGER1,NQP)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
! Branch depending on type of message.
!
DO
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,NQP)
! TEMPORARY LIMIT
IF(NQP .GT. 3) NQP=3
GO TO 70
ELSE
RETURN
ENDIF
ENDDO
ENDIF
!IPK NOV14 ADD IBINEL TO TEST
70 CONTINUE
IF(IQEUNIT .EQ. 0 .and. ibinel .eq. 0) THEN
INQUIRE(201,opened= OPENED)
filter='Element Input files|*.elt;*.elf;*.dat;*.txt;*.grh|All files --|*.*|'
IF( .NOT. OPENED) THEN
CALL WSelectFile(filter,PromptOn+DirChange,FNAMEIN,'Element Load File Name')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
OPEN(201,FILE=FNAMEIN,STATUS='OLD')
ELSE
RETURN
ENDIF
ENDIF
IQEUNIT=201
ENDIF
IF(NQHYD .EQ. 0) THEN
!IPK NOV14 READ AND ALLOCATE DATA FROM BINARY FILE
IF(IBINEL .GT. 0) THEN
TSTARTS=(DAYOFY-1)*24.+TIME-TETH
READ(IBINEL)NEDPTS,NQHYD,TSTARTKP,IYRKP
YEARC=0.
IF(IYRR .NE. IYRKP) THEN
IF(IYRR .GT. IYRKP) THEN
80 CALL HRYRT(IYRKP,HRYR)
YEARC=YEARC+HRYR
IYRKP=IYRKP+1
IF(IYRR .GT. IYRKP) GO TO 80
ELSE
90 CALL HRYRT(IYRKP,HRYR)
YEARC=YEARC-HRYR
IYRKP=IYRKP-1
IF(IYRR .LT. IYRKP) GO TO 90
ENDIF
ENDIF
ALLOCATE(DYE(NEDPTS,NQHYD),TAE(NEDPTS,NQHYD),HAE(NEDPTS,NQHYD),HDE(NEDPTS,NQHYD,3),ILAYRE(NEDPTS,NQHYD))
do j=1,NQHYD
READ(IBINEL) NCLINE(j),NEST(j),IYDATE(j),NHYE(J)
READ(IBINEL) (DYE(I,j),TAE(I,j),HAE(I,j),I=1,nedpts)
DO I=1,NEDPTS
TAE(I,J)=TAE(I,J)+TSTARTKP-TSTARTS-YEARC
ENDDO
enddo
GO TO 199
ENDIF
!IPK NOV14 END UPDATE
NEDPTS=0
CALL ALLOCFL(NEDPTS,NELDS,IQEUNIT,3)
!
! set starting time in hours of the year
! teth contains the first time step
95 READ(IQEUNIT,'(A8,A72)') ID,QHTITLE
!IPK sep07 CHECK FOR COMMA'S
98 IFREE=0
DO K=1,8
IF(ID(K:K) .NE. ',') THEN
IFREE=0
ELSE
KFIRST=K+1
IFREE=1
GO TO 99
ENDIF
ENDDO
99 IF(IFREE .EQ. 1) THEN
QHTITLE=ID(KFIRST:8)//QHTITLE(1:71+KFIRST)
ENDIF
READ(IQEUNIT,'(A8,A72)') ID,DLIN
IF(ID(1:3) .EQ. 'QEI' .OR. ID(1:3) .EQ. 'QT ') THEN
101 NQHYD=NQHYD+1
!IPK sep07 CHECK FOR COMMA'S
!IPK nov14 initialise TPRVH
tprvh=0
IFREE=0
DO K=1,8
IF(ID(K:K) .NE. ',') THEN
IFREE=0
ELSE
KFIRST=K+1
IFREE=1
GO TO 102
ENDIF
ENDDO
102 IF(IFREE .EQ. 1) THEN
DLIN=ID(KFIRST:8)//DLIN(1:71+KFIRST)
ENDIF
!IPK APR97 TEST FOR LIMIT
IF(NQHYD .GT. NELDS) THEN
!IPK SEP04
CLOSE(75)
OPEN(75,file='ERROR.OUT')
WRITE(75,*) 'ERROR STOP TOO MANY ELEMENT INFLOWS'
WRITE(*,*) 'ERROR STOP TOO MANY ELEMENT INFLOWS'
STOP 'ERROR STOP TOO MANY ELEMENT INFLOWS'
ENDIF
NHYE(NQHYD)=0
!IPK sep07
if(ifree .eq. 0) then
READ(DLIN,'(3I8,2F16.2)',ERR=801) NCLINE(NQHYD),NEST(NQHYD),IYDATE(NQHYD),XYCEL(NQHYD,1),XYCEL(NQHYD,2)
GO TO 811
801 READ(DLIN,'(3I8)') NCLINE(NQHYD),NEST(NQHYD),IYDATE(NQHYD)
811 CONTINUE
else
READ(DLIN,*) NCLINE(NQHYD),NEST(NQHYD),IYDATE(NQHYD)
endif
IF(NCLINE(NQHYD) .EQ. 0) NCLINE(NQHYD)=-9999
!
IYD=IYDATE(NQHYD)
!IPK may11 set IYDOLD
IYDOLD=IYD
DO 120 I=1,NEDPTS+1
READ(IQEUNIT,'(A8,A72)') ID,DLIN
!IPK sep07 ADD QN
IF(ID(1:3) .EQ. 'TI ') GO TO 98
IF(ID(1:3) .EQ. 'QEI' .OR. ID(1:3) .EQ. 'QT ') THEN
! NHYE(NQHYD)=NHYE(NQHYD)+1
!IPK jan96 add day of year to logic
! DYE(NHYE(NQHYD),NQHYD)=1.E+6
! TAE(NHYE(NQHYD),NQHYD)=1.E+8
! HAE(NHYE(NQHYD),NQHYD)=HAE(NHYE(NQHYD)-1,NQHYD)
GO TO 101
ELSEIF(ID(1:2) .EQ. 'QE' .OR. ID(1:2) .EQ. 'QN' .OR. ID(1:2) .EQ. 'QD' .or. ID(1:2) .EQ. 'QM') THEN
!IPK jan96 add day of year to logic
!IPK sep07 CHECK FOR COMMA'S
IFREE=0
DO K=1,8
IF(ID(K:K) .NE. ',') THEN
IFREE=0
ELSE
KFIRST=K+1
IFREE=1
GO TO 105
ENDIF
ENDDO
105 IF(IFREE .EQ. 1) THEN
DLIN=ID(KFIRST:8)//DLIN(1:71+KFIRST)
ENDIF
!IPK sep07 ALLOW FOR QN
IF(ID(1:2) .EQ. 'QE' .OR. ID(1:2) .EQ. 'QD') THEN
IF(IFREE .EQ. 0) THEN
READ(ID(5:8),'(F4.0)') DYE(I,NQHYD)
IF(IRMATYP .EQ. 2) READ(DLIN,'(2F8.0)') TAE(I,NQHYD),HAE(I,NQHYD)
IF(IRMATYP .EQ. 10) READ(DLIN,'(F8.0,I8,4F8.0)') TAE(I,NQHYD),ILAYRE(I,NQHYD),HAE(I,NQHYD),(HDE(I,NQHYD,K),K=1,3)
IF(IRMATYP .EQ. 11) READ(DLIN,'(F8.0,4F8.0)') TAE(I,NQHYD),HAE(I,NQHYD),(HDE(I,NQHYD,K),K=1,NQP)
else
IF(IRMATYP .EQ. 2) READ(DLIN,*) TAE(I,NQHYD),HAE(I,NQHYD)
IF(IRMATYP .EQ. 10) READ(DLIN,*) DYE(I,NQHYD),TAE(I,NQHYD),ILAYRE(I,NQHYD),HAE(I,NQHYD),(HDE(I,NQHYD,K),K=1,3)
IF(IRMATYP .EQ. 11) READ(DLIN,*) TAE(I,NQHYD),HAE(I,NQHYD),(HDE(I,NQHYD,K),K=1,NQP)
endif
!IPK SEP07 ADD DATE INPUT
ELSE
!IPK oct15 add decodat option
IF(IFREE .EQ. 1) THEN
READ(DLIN,'(A10)') DATE
READ(DLIN(12:80),*) TAE(I,NQHYD),HAE(I,NQHYD)
READ(DATE,'(I2,1X,I2,1X,I4)') IDAYY,IMTHH,IYYR
DYE(I,NQHYD)=IDAYY+JCNV(IMTHH)
IF(MOD(IYYR,4) .EQ. 0 .AND. IYYR .NE. 2000) THEN
IF(IMTHH .GT. 2) DYE(I,NQHYD)=DYE(I,NQHYD)+1
ENDIF
ELSE
CALL DECODDAT(DLIN,DYE(I,NQHYD),TAE(I,NQHYD))
IF(IRMATYP .EQ. 2) READ(DLIN(17:24),'(F8.0)') HAE(I,NQHYD)
IF(IRMATYP .EQ. 10) READ(DLIN(17:64),'(I8,4F8.0)') ILAYRE(I,NQHYD),HAE(I,NQHYD),(HDE(I,NQHYD,K),K=1,3)
IF(IRMATYP .EQ. 11) READ(DLIN(17:64),'(4F8.0)') HAE(I,NQHYD),(HDE(I,NQHYD,K),K=1,NQP)
ENDIF
!IPK oct15 end decodat update
ENDIF
IF(DAYOFY .LT. 0) THEN
DAYOFY=DYE(I,NQHYD)
TSTARTS=(DAYOFY-1)*24.
IYRR=IYD
ENDIF
NHYE(NQHYD)=NHYE(NQHYD)+1
! IF(I .EQ. 1) THEN
!
! reduce input time to time since that set to start simulation
!
110 CONTINUE
! IF(MOD(IYD,4) .EQ. 0) THEN
! ILP=1
! ELSE
! ILP=0
! ENDIF
! IF(IYD .EQ. IYRR) THEN
!
! If now for for the same year
!
TCUR1=(DYE(I,NQHYD)-1.)*24.+TAE(I,NQHYD)
!
! set time as the difference
!
TAE(I,NQHYD)=TCUR1
! WRITE(75,*) I,TAE(I,NQHYD),HAE(I,NQHYD)
! ELSEIF(IYD .LT. IYRR) THEN
! IF(MOD(IYD,4) .EQ. 0) THEN
! TPRVH=TPRVH+366.*24.
! ELSE
! TPRVH=TPRVH+365.*24.
! ENDIF
! IYD=IYD+1
! GO TO 110
! ELSE
!IPK SEP04
! CLOSE(75)
! OPEN(75,file='ERROR.OUT')
!IPK SEP00
! WRITE(*,*) ' Element inflows for wrong year'
! WRITE(*,*) ' Execution stopped'
! WRITE(75,*) ' Element inflows for wrong year'
! WRITE(75,*) ' Excution stopped'
! STOP
! ENDIF
! ELSE
!IPK may11 reset IYD
! IYD=IYDOLD
! IF(DYE(I,NQHYD) .LT. DYE(I-1,NQHYD)) THEN
! TCUR1=TCUR1-365.*24.
!IPK MAY11 IF(ILP .EQ. 1) TCUR1=TCUR1-24.
!IPK MAY11 IYD=IYD+1
! IF(MOD(IYD,4) .EQ. 0) THEN
! ILP=1
! ELSE
! ILP=0
! ENDIF
!IPK may11
! IYDOLD=IYDOLD+1
! IF(ILP .EQ. 1) TCUR1=TCUR1-24.
! ENDIF
! TCUR=(DYE(I,NQHYD)-1.)*24.+TAE(I,NQHYD)
! TAE(I,NQHYD)=TAE(I-1,NQHYD)+TCUR-TCUR1
! TCUR1=TCUR
! WRITE(75,*) I,TAE(I,NQHYD),HAE(I,NQHYD)
! ENDIF
ELSE
! NHYE(NQHYD)=NHYE(NQHYD)+1
!IPK jan96 add day of year to logic
! DYE(NHYE(NQHYD),NQHYD)=1.E+6
! TAE(NHYE(NQHYD),NQHYD)=1.E+8
! HAE(NHYE(NQHYD),NQHYD)=HAE(NHYE(NQHYD)-1,NQHYD)
! IF(IRMATYP .EQ. 10) THEN
! DO K=1,3
! HDE(NHYE(NQHYD),NQHYD,K)=HDE(NHYE(NQHYD)-1,NQHYD,K)
! ENDDO
! ENDIF
GO TO 199
ENDIF
120 CONTINUE
!IPK SEP04
CLOSE(75)
OPEN(75,file='ERROR.OUT')
!IPK SEP00
WRITE(*,*) 'Execution terminated more lines than allowed in element graph'
WRITE(75,*)'Execution terminated more lines than allowed in element graph'
stop
ENDIF
199 continue
ENDIF
200 CONTINUE
CLOSE(IQEUNIT)
IQEUNIT=0
DO I=1,NQHYD
IF(XYCEL(I,1) .EQ. 0. .AND. XYCEL(I,2) .EQ. 0) THEN
JJ=NCLINE(I)
CALL GETXCL(JJ,XYCEL(I,1),XYCEL(I,2))
ENDIF
ENDDO
RETURN
END
!IPK NOV14 ADD LEAP YEAR ROUTINE
SUBROUTINE HRYRT(IYRKP,HRYR)
IF(MOD(IYRKP,4) .EQ. 0) THEN
ILP=1
HRYR=366.*24.
ELSE
ILP=0
HRYR=365.*24.
ENDIF
RETURN
END
!IPK NEW WITH VERSION 9.0H OCT 25 2015
! DECODE JULIAN DAY FROM DAY/MONTH/YEAR DATA
SUBROUTINE DECODDAT(DATAIN,DAYJUL,TIME)
CHARACTER*72 DATAIN
REAL DAYJUL,TIME
INTEGER IMTS(12,2),IDAY,IMO,IYR,HR,MIN
DATA IMTS/0,31,59,90,120,151,181,212,243,273,304,334,0,31,60,91,121,152,182,213,244,274,305,335/
!
! LOOP THROUGH COLUMNS ADDING A COMMA
IDBLNK=0
DO I=1,16
IF(DATAIN(I:I) .EQ. ':') THEN
IHSW=0
DATAIN(I:I)=','
ELSEIF(DATAIN(I:I) .EQ. '.') THEN
IHSW=1
ENDIF
IF(DATAIN(I:I) .EQ. '/') DATAIN(I:I)=','
IF(I .GT. 8 .AND. DATAIN(I:I) .EQ. ' ') THEN
IF(IDBLNK .EQ. 0) THEN
DATAIN(I:I)=','
IDBLNK=1
IHSW=1
ELSE
DATAIN(I:I)='0'
ENDIF
ENDIF
ENDDO
! write(155,*) ihsw,datain(1:16)
IF(IHSW .EQ. 0) THEN
READ(DATAIN(1:16),*) IDAY,IMO,IYR,HR,MIN
TIME=HR+MIN/60.
ELSE
READ(DATAIN(1:16),*) IDAY,IMO,IYR,TIME
! write(155,*) IDAY,IMO,IYR,TIME
ENDIF
IF(MOD(IYR,4) .EQ. 0) THEN
DAYJUL=IMTS(IMO,2)+IDAY
ELSE
DAYJUL=IMTS(IMO,1)+IDAY
ENDIF
RETURN
END
SUBROUTINE ALLOCFL(MAXPT,MAXTYP,IUNIT,ITYP)
USE BLKELTLD
CHARACTER*8 ID
NELDS=200
MAXPT=0
!IPK JUN09 RESTORE MAXTYP1
MAXTYP1=0
NQLM=0
200 CONTINUE
READ(IUNIT,'(A8)', END=500) ID
!IPK JUN09 ADD TO IF OPTIONS
IF(ID(1:2) .EQ. 'TT' .OR. ID(1:2) .EQ. 'TH' .OR. ID(1:2) .EQ. 'TE' .OR. ID(1:2) .EQ. 'TI' &
& .OR. ID(1:3) .eq. 'CLQ' .OR. ID(1:3) .eq. 'CLH' &
& .OR. ID(1:3) .eq. 'QEI' .OR. ID(1:3) .eq. 'QT ' &
& .OR. ID(1:3) .EQ. 'TIT' .OR. ID(1:3) .EQ. 'CTL') THEN
!IPK SEP14 ADD TYPE 4 (STAGE FLOW) OPTION
!IPK JUN09 RESTORE MAXTYP1
MAXTYP1=MAXTYP1+1
! MAXTYP1=MAXTYP1+1
!IPK JUN09 IF(NQLM .GT. MAXQPT) MAXPT=NQLM
IF(NQLM .GE. MAXPT) MAXPT=NQLM+1
NQLM=0
GO TO 200
ELSEIF(ID(1:6) .EQ. 'ENDDAT') THEN
!IPK JUN09 ADD TO NQLM
IF(NQLM .GT. MAXPT) MAXPT=NQLM+1
GO TO 500
ELSE
NQLM=NQLM+1
GO TO 200
ENDIF
500 CONTINUE
!IPK JUN09
write(90,*) maxtyp,maxtyp1,maxpt,nelds
IF(MAXTYP1 .GT. MAXTYP) MAXTYP=MAXTYP1
ALLOCATE (TAE(MAXPT,MAXTYP),HAE(MAXPT,MAXTYP),DYE(MAXPT,MAXTYP),HDE(MAXPT,MAXTYP,3),ILAYRE(MAXPT,MAXTYP))
ALLOCATE (NCLINE(NELDS),NHYE(NELDS),IYDATE(NELDS),NEST(NELDS),XYCEL(NELDS,2))
TAE=0.
HAE=0.
HDE=0.
DYE=0.
XYCEL=0.
ILAYRE=0
REWIND IUNIT
RETURN
END

@ -0,0 +1,779 @@
SUBROUTINE GETNEWFIL(IIN,IGFG,ITRIAN,ISWT)
INCLUDE 'BFILES.I90'
! WRITE CURRENT DATA TO A SCRATCH FILE
IF(IACTVFIL .GT. 0 .AND. ISWT .NE. -1) THEN
IFILOUT=IACTVFIL+50
WRITE(90,*) 'INGETNEWFIL IFILOUT',IFILOUT
CALL WRTFIL(IFILOUT)
CALL ZEROOUT
IACTVFIL=ITOTFIL
ELSEIF(IACTVFIL .EQ. 0) THEN
IACTVFIL=1
ENDIF
IF(ISWT .EQ. 1) THEN
ITOTFIL=ITOTFIL+1
FNAMKEP='TEST.1.ELE'
IACTVFIL=ITOTFIL
FNAMEOUT(IACTVFIL)='TEST.1.ELE'
WRITE(90,*) 'ITOTFIL,IACTVFIL',ITOTFIL,IACTVFIL
WRITE(90,'(A80)') (FNAMEOUT(KKK),KKK=1,3)
ELSE
FNAMKEP='TEST.1.ELE'
ENDIF
IF(ABS(ITRIAN) .EQ. 1) THEN
CALL READGFG(IIN,ITRIAN)
! TEST FOR GFG FORMAT
ELSEIF(IGFG .EQ. 1) THEN
CALL READGFG(IIN,0)
! TEST FOR rm1 FORMAT
ELSEIF(IIN .EQ. 10) THEN
CALL READRM1(IIN)
! TEST FOR rm1 FORMAT
!ipk feb08 replace iin of 11 with 12
ELSEIF(IIN .EQ. 12 .and. IGFG .EQ. 0) THEN
CALL READGEO(IIN)
ELSEIF(IIN .EQ. 12 .and. IGFG .EQ. 2) THEN
CALL RDBIN(IIN)
ENDIF
IF(ITRIAN .EQ. -1) RETURN
IFILOUT=IACTVFIL+50
WRITE(90,*) 'IFILOUT', IFILOUT
CALL WRTFIL(IFILOUT)
IACTVFIL=1
CALL LOADFIL
CALL RESCAL
CALL HEDR
RETURN
END
! Write data to a file
SUBROUTINE WRTFIL(IFILOUT)
USE BLK1MOD
CHARACTER*80 ALINE
CHARACTER*10 FMT
! INCLUDE 'BLK1.COM'
CLOSE (IFILOUT)
FMT(1:8)='TEMPFIL.'
WRITE(FMT(9:10),'(I2)') IFILOUT
! OPEN(IFILOUT,STATUS='scratch',FORM='binary')
WRITE(90,*) 'IFILOUT',IFILOUT
! OPEN(IFILOUT,STATUS='scratch',FORM='unformatted')
OPEN(IFILOUT,FILE=FMT,STATUS='UNKNOWN',FORM='BINARY')
ISLP=0
IPRT=1
IPNN=1
IPEN=1
IPO=1
IRO=1
IPP=0
IRFN=0
IGEN=0
NXZL=0
NITST=1
ISCTXT=0
IFILL=0
IALTGM=1
NLAYD=0
HORIZ=10.
VERT=8.
XSALE=0.
YSALE=0.
XFACT=0.
YFACT=0.
AR=0.
ANG=0.
xadded=0.
yadded=0.
ntempin=0.
WRITE(90,*) 'IN WRTFIL', IFILOUT,NP,NE,IPRT
WRITE(IFILOUT) TITLE,NP,NE
WRITE(IFILOUT) ISLP,IPRT,IPNN,IPEN,IPO,IRO,IPP,IRFN &
& ,IGEN,NXZL,NITST,ISCTXT,IFILL,IALTGM,NLAYD,xadded,yadded,ntempin
WRITE(90,*) ISLP,IPRT,IPNN,IPEN,IPO,IRO,IPP,IRFN &
& ,IGEN,NXZL,NITST,ISCTXT,IFILL,IALTGM,NLAYD,xadded,yadded,ntempin
WRITE(IFILOUT) HORIZ,VERT,XSALE,YSALE,XFACT,YFACT,AR,ANG
WRITE(90,*) 'IPP',IPP
IF(IPP .GT. 0) WRITE(IFILOUT) ALINE
WRITE(IFILOUT) ((NOP(J,K),K=1,8),IMAT(J),THTA(J),J=1,NE)
WRITE(IFILOUT) &
(XUSR(J),YUSR(J),WD(J),WIDTH(J),SS1(J),SS2(J),WIDS(J), &
& WIDBS(J),SSO(J),BS1(J),J=1,NP)
WRITE(IFILOUT) NLST
IF(NLST .GT. 0) THEN
WRITE(IFILOUT) (LLIST(J),J=1,NLST), &
& ((ILIST(J,I),I=1,LLIST(J)),J=1,NLST)
ENDIF
WRITE(IFILOUT) NENTRY,NLAYD,NCLM
IF(NENTRY .GT. 0) THEN
WRITE(IFILOUT) ((NEF(I,J),J=1,3),I=1,NENTRY)
ENDIF
IF(NLAYD .GT. 0) THEN
WRITE(IFILOUT) (LAY(I),I=1,NP)
ENDIF
IF(NCLM .GT. 0) THEN
WRITE(IFILOUT) ((ICCLN(I,J),J=1,350),I=1,NCLM)
ENDIF
REWIND IFILOUT
RETURN
END
SUBROUTINE READRM1(IIIN)
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*48 DLIN
IIN=IIIN
! Read in header lines
ISET=1
WRITE(90,*) 'GOING TO HEADIN'
CALL HEADIN(IIN,ISET)
! Read in existing elements
WRITE(90,*) 'GOING TO RDELEM'
CALL RDELEM(IIN)
! Read in nodal coordinates
WRITE(90,*) 'GOING TO RDCORD'
CALL RDCORD(IIN)
! Close input file
CLOSE(IIN)
! Scale for plotting
IF(NP .GT. 0) THEN
DO J=1,NP
IF (CORD(J,1) .GT. VDX) THEN
XMIN=MIN(XMIN,CORD(J,1))
XMAX=MAX(XMAX,CORD(J,1))
YMIN=MIN(YMIN,CORD(J,2))
YMAX=MAX(YMAX,CORD(J,2))
ENDIF
ENDDO
ENDIF
RETURN
END
! Read GEO file
SUBROUTINE READGEO(IIIN)
USE BLK1MOD
CHARACTER*1000 HEADER
CHARACTER*8 ID8
CHARACTER*32 IJNK
CHARACTER*80 ALINE,DLIN
! INCLUDE 'BLK1.COM'
INCLUDE 'BFILES.I90'
INTEGER*2 NOP2(MAXE,8)
IIN=IIIN
read(iin,err=100) header
if(header(1:6) .eq. 'RMAGEN') then
inopt=2
else
inopt=1
rewind iin
endif
read(iin) n1,m1
rewind iin
write(90,*) 'Apparent nodes and elements from file are'
write(90,'(i15,i10)') n1,m1
if(n1 .gt. maxp .or. m1 .gt. maxe) then
!
!...... Perhaps the file format is wrong, close and reopen
!
WRITE(DLIN,'(A32)') 'Parameter limits may be violated'
call symbl(0.5,4.5,0.20,dlin,0.0,32)
WRITE(DLIN,'(A35)') 'Retrying with alternate file format'
call symbl(0.5,4.2,0.20,dlin,0.0,35)
close (iin)
open(iin ,file=fnamkep,status='old',form='unformatted')
read(iin) n1,m1
write(90,*) 'Revised nodes and elements from file are'
write(90,'(i15,i10)') n1,m1
if(n1 .gt. maxp .or. m1 .gt. maxe) then
WRITE(DLIN,'(A31)') 'Parameter limits still violated'
call symbl(0.5,3.9,0.20,dlin,0.0,31)
WRITE(DLIN,'(A27)') 'Apparent nodes and elts are'
call symbl(0.5,3.6,0.20,dlin,0.0,27)
WRITE(DLIN,'(2i10)') n1,m1
call symbl(0.5,3.3,0.20,dlin,0.0,20)
WRITE(DLIN,'(A24)') 'Press enter to terminate'
call symbl(0.5,4.5,0.20,dlin,0.0,24)
CALL GTCHARX(ijnk,ndig,5.0,4.0)
!cipk aug00 read(*,'(i1)') junk
call quit_pgm
endif
endif
rewind iin
!
!
if(inopt .eq. 2) then
read(iin,err=100) header
READ(IIN,ERR=100) &
& N1,M1,((CORD(J,K),K=1,2),ALPHA,WD(J),J=1,N1), &
& ((NOP(J,K),K=1,8),IMAT(J),THTA(J),I3,J=1,M1) &
& , (WIDTH(J),SS1(J),SS2(J),WIDS(J),J=1,N1)
DO J=1,N1
XUSR(J)=CORD(J,1)
YUSR(J)=CORD(J,2)
ENDDO
!
else
READ(IIN,ERR=100) &
& N1,M1,((CORDSN(J,K),K=1,2),ALPHA,WD(J),J=1,N1), &
& ((NOP2(J,K),K=1,8),IMAT(J),THTA(J),I32,J=1,M1) &
& , (WIDTH(J),SS1(J),SS2(J),WIDS(J),J=1,N1)
DO J=1,N1
DO K=1,2
CORD(J,K)=CORDSN(J,K)
ENDDO
XUSR(J)=CORD(J,1)
YUSR(J)=CORD(J,2)
ENDDO
DO J=1,M1
!ipk feb08
ncorn(j)=0
DO K=1,8
NOP(J,K)=NOP2(J,K)
!ipk feb08
if(nop(j,k) .gt. 0) ncorn(j)=k
ENDDO
ENDDO
endif
read(IIN,err=120,end=120) id8
if(id8(1:6) .eq. 'part-2') then
read(IIN,err=104) (widbs(j),sso(j),j=1,n1)
read(IIN,err=120,end=120) id8
endif
! Add part 3 write for continuity lines
if(id8(1:6) .eq. 'part-3') then
!ipk aug02 IF(NCLM .GT. 0) THEN
READ(IIN,ERR=104) NCLM,((ICCLN(I,J),J=1,350),I=1,NCLM)
!ipk aug02 ENDIF
read(IIN,err=120,end=120) id8
endif
!IPK DEB02 Add part 4 write for lock and BS1 lines and reordering
if(id8(1:6) .eq. 'part-4') then
read(iin,err=104,end=120) (lock(j),bs1(j),j=1,n1)
read(iin,err=104,end=120) &
nlst,((ilist(j,k),k=1,maeln),llist(j),j=1,maxln)
endif
DO J=1,M1
!ipk feb08
ncorn(j)=0
DO K=1,8
!ipk feb08
if(nop(j,k) .gt. 0) ncorn(j)=k
ENDDO
ENDDO
GO TO 120
100 READ(IIN,ERR=104) &
& N1,M1,((CORDSN(J,K),K=1,2),ALPHA,WD(J),J=1,N1), &
& ((NOP2(J,K),K=1,8),IMAT(J),THTA(J),I32,J=1,M1)
DO J=1,N1
DO K=1,2
CORD(J,K)=CORDSN(J,K)
ENDDO
XUSR(J)=CORD(J,1)
YUSR(J)=CORD(J,2)
ENDDO
DO J=1,M1
!ipk feb08
ncorn(j)=0
DO K=1,8
NOP(J,K)=NOP2(J,K)
!ipk feb08
if(nop(j,k) .gt. 0) ncorn(j)=k
ENDDO
ENDDO
GO TO 120
104 WRITE(90,*) 'Error reading binary geometry file'
!ipk jan98 CALL SETD(23)
call clscrn()
WRITE(aline,*) 'Error reading binary geometry file'
call symbl &
& (1.1,3.3,0.20,aline,0.0,80)
WRITE(aline,*) 'Press enter to exit'
call symbl &
& (1.1,3.0,0.20,aline,0.0,80)
ndig=1
CALL GTCHARX(IJNK,NDIG,5.0,7.6)
CALL Quit_Pgm
STOP
120 CONTINUE
NP=N1
NE=M1
! Close input file
CLOSE(IIN)
! Scale for plotting
IF(NP .GT. 0) THEN
DO J=1,NP
IF (CORD(J,1) .GT. VDX) THEN
XMIN=MIN(XMIN,CORD(J,1))
XMAX=MAX(XMAX,CORD(J,1))
YMIN=MIN(YMIN,CORD(J,2))
YMAX=MAX(YMAX,CORD(J,2))
ENDIF
ENDDO
ENDIF
RETURN
END
SUBROUTINE READGFG(IUNIT,ISW)
USE BLK1MOD
INCLUDE "BFILES.I90"
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
CHARACTER*1 ANS
CHARACTER*32 ANS32
CHARACTER*3 ID
CHARACTER*77 DLIN
CHARACTER*150 DLIN1
CHARACTER*80 LIND
DIMENSION NTMP(9),NTEMPLIN(200,10),ATT(9)
REAL*8 CX,CY,VALS(7)
MEL=MAXE
ylv=7.5
IIN=IUNIT
IPRT=1
IPNN=1
IPEN=1
IPO=1
IRO=1
IPP=0
IRFN=0
IGEN=0
NXZL=0
NITST=1
ISCTXT=0
IFILL=0
IALTGM=1
NLAYD=0
HORIZ=10.
VERT=8.
XSALE=0.
YSALE=0.
XFACT=0.
YFACT=0.
AR=0.
ANG=0.
xadded=0.
yadded=0.
ntempin=0.
KLIN=0
IF(ABS(ISW) .EQ. 1) GO TO 500
DO I=1,10000
READ(IIN,'(A3,A77)') ID,DLIN
IF(ID .EQ. 'T1 ') THEN
TITLE(1:77)=DLIN
GO TO 10
ENDIF
ENDDO
10 CONTINUE
REWIND IIN
! READ ELEMENT AND CCLINE DATA
20 CONTINUE
DO ICOUNTC=1,200000
DO JJ=1,150
DLIN1(JJ:JJ)=' '
ENDDO
READ(IIN,'(A3,A150)', END=175) ID,DLIN1
IF(ID .EQ. 'GE ' .or. ID .EQ. 'GO') THEN
! Count the number of variables
I=0
ICOUNT=0
25 CONTINUE
IF(DLIN1(I+1:I+1) .NE. ' ') THEN
GO TO 30
ELSE
I=I+1
GO TO 25
ENDIF
30 I=I+1
IF(I .EQ. 151) THEN
ICOUNT =ICOUNT+1
GO TO 40
ENDIF
IF(DLIN1(I:I) .EQ. ' ' .OR. DLIN1(I:I) .EQ. ',') THEN
ICOUNT=ICOUNT+1
35 CONTINUE
IF(I+1 .EQ. 151) GO TO 40
IF(DLIN1(I+1:I+1) .EQ. ' ') THEN
I=I+1
GO TO 35
ELSE
GO TO 30
ENDIF
ELSE
GO TO 30
ENDIF
ENDIF
ENDDO
40 CONTINUE
IF(ID .EQ. 'GO') THEN
KLIN=KLIN+1
READ(DLIN1,*) (NTEMPLIN(KLIN,K),K=1,ICOUNT)
GO TO 20
ENDIF
IF(ICOUNT .GT. 10) THEN
READ(DLIN1,*) J, (NTMP(K),K=1,9),THT
ELSE
READ(DLIN1,*) J, (NTMP(K),K=1,9)
ENDIF
IF (J .GE. MEL) THEN
CALL SETD(23)
!cipk aug00
WRITE(lind,*) ' Element number exceeds MAXE in RDELEM'
call symbl (1.1,ylv-0.3,0.20,lind,0.0,80)
ndig=1
WRITE(90,*) ' Element number exceeds MAXE in RDELEM'
WRITE(lind,6000)
CALL GTCHARX(ANS32,IJNK,5.0,4.0)
CALL Quit_Pgm
STOP
ENDIF
!
! Check to ensure there are no duplicate numbers in input stream
! of element connections
!
DO K=1,7
IF(NTMP(K) .NE. 0) THEN
DO L=K+1,8
IF(NTMP(K) .EQ. NTMP(L)) THEN
CALL SETD(23)
DO KK=1,8
NOP(J,KK) = NTMP(KK)
ENDDO
IMAT(J)=NTMP(9)
call eltdisp(j)
DO KK=1,8
NTMP(KK) = NOP(J,KK)
ENDDO
NTMP(9)=IMAT(J)
GO TO 45
ENDIF
ENDDO
ENDIF
ENDDO
45 CONTINUE
DO K=1,8
NOP(J,K) = NTMP(K)
ND = NTMP(K)
IF (ND .GT. 0) THEN
INEW(ND) = 2
NP = MAX(NP,ND)
ENDIF
ENDDO
!
NCN = 2
IF (NOP(J,3) .NE. 0) NCN = 3
IF (NOP(J,4) .NE. 0) NCN = 4
IF (NOP(J,5) .NE. 0 .AND. NOP(J,4) .NE. 0) NCN = 5
IF (NOP(J,5) .NE. 0 .AND. NOP(J,4) .EQ. 0) NCN = 6
IF (NOP(J,6) .NE. 0) NCN = 6
IF (NOP(J,7) .NE. 0) NCN = 8
NCORN(J) = NCN
IESKP(J) = 0
IMAT(J) = NTMP(9)
THTA(J)=THT
IEM(J) = J
DO 50 K=2,NCN,2
ND = NTMP(K)
IF (ND .GT. 0) THEN
IF(NCN .EQ. 5 .AND. K .EQ. 4) GO TO 50
WD(ND)=0.
ENDIF
50 CONTINUE
NE = MAX(J,NE)
!
GOTO 20
!
175 CONTINUE
REWIND IIN
70 CONTINUE
DO ICOUNTC=1,100000
DO JJ=1,150
DLIN1(JJ:JJ)=' '
ENDDO
READ(IIN,'(A3,A150)', END=400) ID,DLIN1
IF(ID .EQ. 'GNN' .OR. ID .EQ. 'GWN') THEN
! Count the number of variables
I=0
ICOUNT=0
75 CONTINUE
IF(DLIN1(I+1:I+1) .NE. ' ') THEN
GO TO 80
ELSE
I=I+1
GO TO 75
ENDIF
80 I=I+1
IF(I .EQ. 151) THEN
ICOUNT =ICOUNT+1
GO TO 90
ENDIF
IF(DLIN1(I:I) .EQ. ' ' .OR. DLIN1(I:I) .EQ. ',') THEN
ICOUNT=ICOUNT+1
85 CONTINUE
IF(I+1 .EQ. 151) GO TO 90
IF(DLIN1(I+1:I+1) .EQ. ' ') THEN
I=I+1
GO TO 85
ELSE
GO TO 80
ENDIF
ELSE
GO TO 80
ENDIF
ENDIF
ENDDO
90 CONTINUE
DO K=1,7
VALS(K)=0.
ENDDO
READ(DLIN1,*) J,(VALS(K),K=1,ICOUNT-1)
IF(ID .EQ. 'GNN') THEN
CX=VALS(1)
CY=VALS(2)
BELEV=VALS(3)
NP = MAX(NP,J)
CORD(J,1) = CX
CORD(J,2) = CY
XUSR(J) = CX
YUSR(J) = CY
WD(J) = BELEV
INSKP(J)=0
INEW(J) = 1
GO TO 70
ELSE
WDTHX=VALS(1)
SS1X=VALS(2)
SS2X=VALS(3)
WDSX=VALS(4)
WIDTH(J)=WDTHX
SS1(J)=SS1X
SS2(J)=SS2X
WIDS(J)=WDSX
GO TO 70
ENDIF
400 CONTINUE
! CHECKOUT THE CCLINE DATA
KK=0
IF(KLIN .GT. 0) THEN
NCLM=1
IF(NTEMPLIN(1,1) .EQ. 1) THEN
DO K=1,KLIN
DO J=1,10
IF(K .EQ. 1 .AND. J .EQ. 1) GO TO 410
IF(NTEMPLIN(K,J) .LT. 0) THEN
NCLM=NCLM+1
KK=0
GO TO 420
ELSEIF(NTEMPLIN(K,J) .EQ. 0) THEN
GO TO 420
ELSE
KK=KK+1
ICCLN(NCLM,KK)=NTEMPLIN(K,J)
ENDIF
410 CONTINUE
ENDDO
420 CONTINUE
ENDDO
NCLM=NCLM-1
ENDIF
ENDIF
RETURN
500 CONTINUE
IF(ISW .EQ. -1) THEN
NESV=NE
NPSV=NP
ENDIF
READ(IUNIT,*) NE,NCNTR,NATTR
IMIDS=0
DO JJ=1,NE
READ(IUNIT,*) J,(NTMP(K),K=1,NCNTR),(ATT(K),K=1,NATTR)
IF(ISW .EQ. -1) J=J+NESV
IF (J .GE. MEL) THEN
CALL SETD(23)
WRITE(lind,*) ' Element number exceeds MAXE in RDELEM'
call symbl &
& (1.1,ylv-0.3,0.20,lind,0.0,80)
ndig=1
WRITE(90,*) ' Element number exceeds MAXE in RDELEM'
WRITE(lind,6000)
CALL GTCHARX(ANS32,IJNK,5.0,4.0)
CALL Quit_Pgm
STOP
ENDIF
DO KK=1,3
IF(ISW .EQ. -1) THEN
NOP(J,2*KK-1) = NTMP(KK)+NPSV
ELSE
NOP(J,2*KK-1) = NTMP(KK)
ENDIF
NOP(J,2*KK)=0
ENDDO
IF(NATTR .GT. 0) THEN
IMAT(J)=ATT(1)
ELSE
IMAT(J)=1
ENDIF
NCORN(J)=6
IESKP(J)=0
ENDDO
NE=J
CLOSE(IUNIT)
DO L=255,1,-1
IF(FNAMKEP(L:L) .EQ. '.') THEN
FNAMKEP(L+1:L+4)='node'
OPEN(IUNIT,FILE=FNAMKEP,STATUS='OLD',ACTION='READ')
GO TO 510
ENDIF
ENDDO
510 CONTINUE
READ(IUNIT,*) NPPP,NDUM,NATTR
DO KK=1,NPPP
READ(IUNIT,*) J,CX,CY,(VALS(K),K=1,NATTR)
IF(ISW .EQ. -1) J=J+NPSV
IF(J .EQ. 0) THEN
J=NPPP
JZ=1
ENDIF
BELEV=-9999.
WEL=0.
LOCK1=0
IF(NATTR .GT. 0) BELEV=VALS(1)
IF (J .GE. MAXP) THEN
call clscrn()
WRITE(dlin,*) ' Node number exceeds MAXP in RDCORD',j
call symbl &
& (1.1,3.3,0.20,dlin,0.0,80)
WRITE(90,*) ' Node number exceeds MAXP in RDCORD'
WRITE(DLIN,*) ' Press enter to exit'
call symbl &
& (1.1,3.0,0.20,dlin,0.0,80)
ndig=1
CALL GTCHARX(ANS32,ndig,5.0,4.0)
CALL Quit_Pgm
STOP
ENDIF
NP = MAX(NP,J)
XUSR(J) = CX
YUSR(J) = CY
CORD(J,1) = (XUSR(J)+XS)/TXSCAL
CORD(J,2) = (YUSR(J)+YS)/TXSCAL
WD(J) = BELEV
WIDTH(J)=0.
SS1(J)=0.
SS2(J)=0.
WIDS(J)=0.
WIDBS(J)=0.
SSO(J)=0.
INSKP(J)=0
INEW(J) = 1
LOCK(J)=LOCK1
BS1(J)=0.
ENDDO
CLOSE(IUNIT)
6000 FORMAT(' Press enter to exit')
END
SUBROUTINE ZEROOUT
USE BLK1MOD
! INCLUDE 'BLK1.COM'
MNP = MAXP
MEL = MAXE
DO I=1,MEL
DO M=1,8
NOP(I,M)=0
ENDDO
IESKP(I)=-1
IEM(I) = 0
IMAT(I) = 0
THTA(I)=0.
XC(I) = -1.E20
YC(I) = -1.E20
ENDDO
DO I=1,MNP
XUSR(I) = -1.D20
YUSR(I) = -1.D20
CORD(I,1) = -1.D20
CORD(I,2) = -1.D20
WD(I) = -9999.
LAY(I) = -9999
WIDTH(I) = 0.0
SS1(I) = 0.0
SS2(I) = 0.0
WIDS(I) = 0.0
WIDBS(I)=0.
SSO(I)=0.
INSKP(I) = 1
INEW(I) = 0
!ipk mar02
lock(i)=0
bs1(I)=0.
ENDDO
NP=0
NE=0
RETURN
END

@ -0,0 +1,109 @@
SUBROUTINE GETGRP
USE BLK1MOD
CHARACTER*8 IDSAV,ID
CHARACTER*72 DLINSAV,DLIN
IDSAV=ID
DLINSAV=DLIN
! ALLOCATE ARRAY SIZES
IF(.NOT. ALLOCATED(IGRPNUM)) THEN
ALLOCATE (IGRPNUM(25,MAXE),MAXENT(25))
IGRPNUM=0
ENDIF
!
! NOW READ DATA TO FILE
CALL GINPT(IGRP,ID,DLIN)
IF(ID(1:3) .EQ. 'TIT') THEN
! READ TITLE
READ(DLIN,'(A72)') HEDR
CALL GINPT(IGRP,ID,DLIN)
ENDIF
MAXIGRP=0
301 READ(DLIN,'(I8)') IGRPA
CALL GINPT(IGRP,ID,DLIN)
NL=1
NH=9
401 CONTINUE
IF(ID(1:3) .EQ. 'NGP') THEN
READ(DLIN,'(9I8)') (IGRPNUM(IGRPA,I),I=NL,NH)
CALL GINPT(IGRP,ID,DLIN)
IF(IGRPNUM(IGRPA,NH) .NE. 0) THEN
NL=NL+9
NH=NH+9
GO TO 401
ENDIF
ENDIF
! SET MAXIMA FROM INPUT FILE
IF(MAXIGRP .LT. IGRPA) MAXIGRP=IGRPA
MAXENT(IGRPA)=NH
IF(ID(1:3) .EQ. 'GRP') GO TO 301
CALL TOSER
ID=IDSAV
DLIN=DLINSAV
CALL PLOTOT(1)
RETURN
END
SUBROUTINE WRTGP
USE WINTERACTER
USE BLK1MOD
include 'd.inc'
CHARACTER(LEN=256) :: FILTER
CHARACTER(LEN=96) :: FNAME
LOGICAL :: OPENED
IGRPOUT=29
INQUIRE(29, OPENED=OPENED)
if(.not. opened) then
Filter='TXT file -- *.txt|*.txt|'
CALL WSelectFile(Filter,SaveDialog+PromptOn+AppendExt+DirChange,FNAME,'Save Group File')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
OPEN(IGRPOUT,FILE=FNAME,STATUS='UNKNOWN',ACTION='WRITE')
ELSE
RETURN
ENDIF
ENDIF
CALL TOPAR
REWIND IGRPOUT
WRITE(IGRPOUT,'(a)') 'TIT GROUP FILE'
DO K=1,25
IF(MAXENT(K) .GT. 0) THEN
WRITE(IGRPOUT,6001) K
LROWS=MAXENT(K)/9+1
LASTCOL=MOD(MAXENT(K),9)
IF(LASTCOL .EQ. 0) THEN
IF(IGRPNUM(K,MAXENT(K)) .EQ. 0) THEN
LROWS=LROWS-1
ENDIF
ENDIF
NL=-8
DO LL=1,LROWS
NL=NL+9
NH=NL+8
WRITE(IGRPOUT,6002) (IGRPNUM(K,L),L=NL,NH)
ENDDO
ENDIF
ENDDO
6001 FORMAT('NGP ',I8)
6002 FORMAT('GRP ',9I8)
RETURN
END

@ -0,0 +1,175 @@
SUBROUTINE GETSTRESSFIL
USE WINTERACTER
USE BLK1MOD
include 'd.inc'
ALLOCATABLE WDTEMP(:)
CHARACTER*256 FILTER,FNAME
INTEGER IYRR,IMON,IDAY
REAL HOUR
LOGICAL OPENED
DATA IYRR/2015/,IMON/1/,IDAY/1/
DATA HOUR/0.0/
IF(.NOT. ALLOCATED(WDTEMP)) THEN
ALLOCATE (WDTEMP(NP))
ENDIF
DO N=1,NP
WDTEMP(N)=WD(N)
ENDDO
100 CONTINUE
ISWT=-1
IWRTMP=0
IF(IMP .GT. 0) THEN
! FIRST WRITE EXISTING MAP TO SCRATCH
OPEN(98,FORM='BINARY',STATUS='SCRATCH')
CALL WRTMAP(98)
REWIND 98
IWRTMP=1
ENDIF
CALL GMAP
CALL GRIDSB(ISWT)
INQUIRE(104, OPENED=OPENED)
IF(OPENED) GO TO 200
Filter='Output file -- *.dat|*.dat|'
CALL WSelectFile(Filter,SaveDialog+PromptOn+AppendExt+DirChange,FNAME,'Save Stress File')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
IOT=104
OPEN(IOT,FILE=FNAME,STATUS='UNKNOWN')
ELSE
GO TO 500
ENDIF
200 CONTINUE
CALL SETDT(IYRR,IMON,IDAY,HOUR)
WRITE(IOT,'(''DATE '',3I8,F8.3)') IYRR,IMON,IDAY,HOUR
DO J=1,NP
IF (INEW(J) .EQ. 1) THEN
WRITE(IOT,'(''WAVESS '',I8,F8.4)') J,WD(J)
ENDIF
ENDDO
WRITE(IOT,'(''ENDBLOCK'')')
FLUSH(IOT)
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to process another map file?'//&
CHAR(13)//' ','PROCESS ANOTHER?')
!
! If answer 'No', return
!
IF (WInfoDialog(4).EQ.2) THEN
WRITE(IOT,'(''ENDDATA'')')
FLUSH(IOT)
GO TO 500
ENDIF
GO TO 100
!
! Delete all unused nodes
!
CALL DELETM(2)
500 DO N=1,NP
WD(N)=WDTEMP(N)
ENDDO
DEALLOCATE (WDTEMP)
IF(IWRTMP .GT. 0) THEN
CALL RDMAP(2,98,0,0)
CLOSE (98)
ENDIF
RETURN
END
SUBROUTINE SETDT(N1,N2,N3,R1)
use winteracter
implicit none
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,N3,IERR
real :: R1
character*3 :: sub
call wdialogload(IDD_SETYRDT)
ierr=infoerror(1)
CALL WDialogPutInteger(idf_integer1,n1)
CALL WDialogPutInteger(idf_integer2,n2)
CALL WDialogPutInteger(idf_integer3,n3)
CALL WDialogPutReal(idf_real1,r1)
CALL WDialogSelect(IDD_setyrdt)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
DO
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(idf_integer1,n1)
CALL WDialogGetInteger(idf_integer2,n2)
CALL WDialogGetInteger(idf_integer3,n3)
CALL WDialogGetReal(idf_real1,r1)
RETURN
ENDIF
ENDDO
RETURN
END
SUBROUTINE GMAP
USE WINTERACTER
include 'd.inc'
CHARACTER(LEN=255) :: FNAME
CHARACTER(LEN=3) :: SUB,SUB1
INTEGER IMP
CALL WSelectFile(ID_STRING1,PromptOn,FNAME,'Load Map File')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
CALL IlowerCase(FNAME)
CALL GETSUB(FNAME,SUB)
IF(SUB .EQ. 'map') then
IMP=9
OPEN(9,FILE=FNAME,STATUS='OLD',action='read')
ELSEIF(SUB .EQ. 'asc' .or. SUB .EQ. 'grd') then
IMP=94
OPEN(94,FILE=FNAME,STATUS='OLD',action='read')
ELSEIF(SUB .EQ. 'mpb') then
imp=92
OPEN(IMP ,FILE=FNAME,STATUS='OLD',form='unformatted',action='read')
ELSEIF(SUB .EQ. 'mbb') then
imp=92
OPEN(IMP ,FILE=FNAME,STATUS='OLD',form='binary',action='read')
ELSEIF(SUB .EQ. 'rm1') then
imp=13
OPEN(IMP ,FILE=FNAME,STATUS='OLD',action='read')
ELSEIF(SUB .EQ. 'shp') then
IMP=113
OPEN(113,FILE=FNAME,STATUS='OLD',FORM ='BINARY',action='read')
SUB='DBF'
CALL ADDSUB(FNAME,SUB)
OPEN(114,FILE=FNAME,STATUS='OLD',FORM ='BINARY',action='read')
ENDIF
ENDIF
CALL RDMAP(2,IMP,0,0)
CLOSE (IMP)
RETURN
END

@ -0,0 +1,139 @@
! Last change: IPK 2 Feb 2003 6:25 pm
SUBROUTINE DELAUNAY1(XMAP1,YMAP1,NVERT)
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
CHARACTER*80 LIND
CHARACTER*1 ANS
REAL*8 XMAP1(*),YMAP1(*)
DATA VDX9/-9.E9/,NEDGE/0/
! Get location of supertriangle
iprt=0
ngap=0
call supert(XMAP1,YMAP1,NVERT)
NELTS=1
NVERTM=NVERT-3
! Sort points into ascending x order
CALL SORTDB(XMAP1,NKEY,NVERTM)
! Loop on the vertices
YLV=7.5
DO NN=1,NVERT-3
if(mod(NN,2500) .eq. 0) then
ylv=ylv-0.3
if(ylv .lt. 0.1) then
ylv=7.9
call clscrn
endif
write(lind,6010) NN
6010 format(i8,' points processed')
call symbl &
& (1.1,ylv,0.20,LIND,0.0,80)
endif
! process next point
N=NKEY(NN)
! Skip out if inactive point
IF(N .EQ. 0) GO TO 500
IF(XMAP1(N) .LT. VDX9) GO TO 500
IF(NN .LT. NVERTM) THEN
DO KK=NN+1,NVERTM
K=NKEY(KK)
IF(K .NE. 0) THEN
IF(XMAP1(N) .EQ. XMAP1(K)) THEN
IF(YMAP1(N) .EQ. YMAP1(K)) THEN
WRITE(45,*) 'IDENT',N,K
NKEY(KK)=0
ENDIF
ELSE
GO TO 200
ENDIF
ENDIF
200 CONTINUE
ENDDO
ENDIF
! Set edge buffers to zero
IF(NEDGE .GT. 0) THEN
DO J=1,NEDGE
IEDGE(J,1)=0
IEDGE(J,2)=0
END DO
ELSE
DO J=1,100
IEDGE(J,1)=0
IEDGE(J,2)=0
END DO
ENDIF
NEDGE=0
! test for point in circumcircle
DO J=1,NELTS
CALL INSIDCIRC(XMAP1,YMAP1,J,N,ISWT)
! If inside process edges
IF(ISWT .EQ. 1) THEN
CALL PROCESS(J,NEDGE,NGAP)
ENDIF
END DO
! Setup to form new triangles
CALL SETEDG(NEDGE)
! Now form triangles as needed
DO J=1,NEDGE
IF(IEDGE(J,1) .NE. 0) THEN
CALL FORMT(XMAP1,YMAP1,J,N,NGAP,KK)
ENDIF
END DO
NEDGE=0
if(iprt .eq. 0) go to 500
DO J=1,NELTS
IF(NOPEL(J,1) .GT. 0) THEN
WRITE(3,'(2i5,2i10,19x,''1'')') J,(NOPEL(J,K),K=1,3)
ENDIF
END DO
IF(NN .EQ. 1) THEN
write(41,'('' 9999'')')
do j=1,nvert
write(41,'(i10,2f20.4,F10.3)') j,XMAP1(j),YMAP1(j),VAL(J)
enddo
write(41,'('' 9999'')')
write(41,'('' 9999'')')
write(41,'('' 0 NENTRY'')')
write(41,'('' 0 NCLM'')')
WRITE(41,'(''ENDDATA'')')
ENDIF
500 continue
END DO
! Get rid of elements from super point
CALL RIDPOINT(NVERT)
RETURN
END SUBROUTINE

@ -0,0 +1,238 @@
SUBROUTINE TRIANINT(NMAP,M,ISWT,ITIME)
USE BLKMAP
USE BLK1MOD
SAVE
! INCLUDE 'BLK1.COM'
DIMENSION WGT(8)
REAL*8 XMINL,YMINL,XMAXL,YMAXL
! data itime/0/
! LOOK FOR MATCHING POINTS
DO K=1,MAXPTS
DISQ=(XUSR(M)-XMAP(K))**2+(YUSR(M)-YMAP(K))**2
IF(DISQ .LT. 1.) THEN
WD(M)=VAL(K)
FPN = WD(M)*10.
X = CORD(M,1)
Y = CORD(M,2) - .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.5) THEN
CALL RRED
CALL NUMBR(X,Y,0.1,FPN,0.0,-1)
endif
GO TO 300
ENDIF
ENDDO
! Search for element that has circumcircle around the node
IF(ISWT .NE. 0) THEN
IF(ITIME .EQ. 0) NSTART=1
ELSE
NSTART=1
ENDIF
DO N=NSTART,NELTS
IF(NOPEL(N,1) .EQ. 0) GO TO 200
if(RADS(N) .eq. 0.) then
CALL CCENTRE(XMAP(NOPEL(N,1)),XMAP(NOPEL(N,2)),XMAP(NOPEL(N,3)) &
&,YMAP(NOPEL(N,1)),YMAP(NOPEL(N,2)),YMAP(NOPEL(N,3)) &
&,XCEN(N),YCEN(N),RADS(N))
endif
IF(RADS(N)+XCEN(N) .GE. XUSR(M)) THEN
NSTART=N
GO TO 210
ENDIF
200 CONTINUE
ENDDO
210 CONTINUE
WRITE(155,*) M,NSTART
DO N=NSTART,NELTS
IF(NOPEL(N,1) .EQ. 0) GO TO 250
if(RADS(N) .eq. 0.) then
CALL CCENTRE(XMAP(NOPEL(N,1)),XMAP(NOPEL(N,2)),XMAP(NOPEL(N,3)) &
&,YMAP(NOPEL(N,1)),YMAP(NOPEL(N,2)),YMAP(NOPEL(N,3)) &
&,XCEN(N),YCEN(N),RADS(N))
endif
xminl=min(XMAP(NOPEL(N,1)),XMAP(NOPEL(N,2)),XMAP(NOPEL(N,3)))
xmaxl=max(XMAP(NOPEL(N,1)),XMAP(NOPEL(N,2)),XMAP(NOPEL(N,3)))
yminl=min(YMAP(NOPEL(N,1)),YMAP(NOPEL(N,2)),YMAP(NOPEL(N,3)))
ymaxl=max(YMAP(NOPEL(N,1)),YMAP(NOPEL(N,2)),YMAP(NOPEL(N,3)))
! IF(M .EQ. 6316) THEN
! WRITE(156,'(2I6,6F15.2)') M,N,XUSR(M),XMINL,XMAXL,YUSR(M),YMINL,YMAXL
! ENDIF
if(xusr(m) .lt. xminl-0.01 .or. xusr(m) .gt. xmaxl+0.01) then
go to 250
elseif(yusr(m) .lt. yminl-0.01 .or. yusr(m) .gt. ymaxl+0.01) then
go to 250
endif
! IF(M .EQ. 6316) WRITE(156,*) 'PASSED X AND Y TEST',N
DISQ=(XUSR(M)-XCEN(N))**2+(YUSR(M)-YCEN(N))**2
IF(DISQ .LE. RADS(N)**2*1.0001) THEN
! IF(M .EQ. 6316) write(156,*) m,n,disq,rads(n)**2,xusr(m),xcen(n)
! We have a candidate
CALL GETWT(N,XUSR(M),YUSR(M),WGT,1)
DO K=1,3
IF(WGT(K) .LT. -1E-4 .OR. WGT(K) .GT. 1.0001) THEN
WRITE(142,*) 'REJECT',m,n,disq,rads(n)**2,wgt(1),wgt(2),wgt(3)
GO TO 250
ENDIF
ENDDO
WD(M)=WGT(1)*VAL(NOPEL(N,1))+WGT(2)*VAL(NOPEL(N,2))+WGT(3)*VAL(NOPEL(N,3))
FPN = WD(M)*10.
X = CORD(M,1)
Y = CORD(M,2) - .11
IF(X .GT. 0. .AND. X .LT. HSIZE .AND. &
& Y .GT. 0. .AND. Y .LT. 7.5) THEN
CALL RRED
CALL NUMBR(X,Y,0.1,FPN,0.0,-1)
endif
GO TO 300
ENDIF
250 CONTINUE
ENDDO
300 CONTINUE
ITIME=1
RETURN
END
SUBROUTINE GETWT(N,XSW,YSW,WGT,ISWT)
!-
!......SUBROUTINE TO EVALUATE FUNCTION AT GRID POINTS
!-
!- N = ELEMENT NUMBER
!_ XSW = X COORDINATE OF DESIRED POINT
!_ YSW = Y COORDINATE OF DESIRED POINT
! WGT(8) = ARRAY OF WEIGHTING FUNCTIONS
! ISWT = SWITCH FOR CHOICE BETWEEN LINEAR AND QUADRATIC WEIGHTING
! = 1 FOR LINEAR
! = 2 FOR QUADRATIC
! FROM COMMON
! NOP = LIST OF NODAL CONNECTIONS AROUND AN ELEMET
! CORD = REAL*8 ARRAY OF NODAL COORDINATES
!
USE BLKMAP
USE BLK1MOD
REAL*8 XN,DNX,DNY,XSW,YSW
DOUBLE PRECISION XG,YG,XK,YK,XP,YP
! INCLUDE 'BLK1.COM'
!-
DIMENSION X(9),Y(9),WGT(8)
!-
DATA TOL/0.01/
!-
!-
!......DETERMINE ELEMENT TYPE
!-
!IPKOCT93 ADD
if(n .eq. 1910) then
aaa=0
endif
NCN=6
IT=2
!-
!......ESTABLISH LOCAL COORDINATES FOR EACH NODE POINT OF ELEMENT
!-
K1=NOPEL(N,1)
X(1)=0.
Y(1)=0.
DO 300 K=3,NCN,2
K2=NOPEL(N,K/2+1)
X(K)=XMAP(K2)-XMAP(K1)
Y(K)=YMAP(K2)-YMAP(K1)
300 END DO
X(2)=X(3)/2.
Y(2)=Y(3)/2.
X(4)=(X(3)+X(5))/2.
Y(4)=(Y(3)+Y(5))/2.
X(6)=X(5)/2.
Y(6)=Y(5)/2.
xminl=min(x(1),x(3),x(5))
yminl=min(y(1),y(3),y(5))
xmaxl=max(x(1),x(3),x(5))
ymaxl=max(y(1),y(3),y(5))
!-
!......ESTABLISH LOCAL COORDINATES OF DESIRED POINT
!-
XP=XSW-XMAP(K1)
YP=YSW-YMAP(K1)
if(xp .lt. xminl .or. xp .gt. xmaxl) then
wgt(1)=2.0
return
elseif(yp .lt. yminl .or. yp .gt. ymaxl) then
wgt(1)=2.0
return
endif
XG=0.
YG=0.
!-
!......ITERATE TO FIND LOCAL COORDINATE
!-
DO 400 ITER=1,10
DXKDX=0.
DXKDY=0.
DYKDX=0.
DYKDY=0.
XK=-XP
YK=-YP
DO 350 K=2,NCN
XK=XK+XN(IT,K,XG,YG)*X(K)
YK=YK+XN(IT,K,XG,YG)*Y(K)
DXKDX=DXKDX+DNX(IT,K,XG,YG)*X(K)
DYKDX=DYKDX+DNX(IT,K,XG,YG)*Y(K)
DXKDY=DXKDY+DNY(IT,K,XG,YG)*X(K)
DYKDY=DYKDY+DNY(IT,K,XG,YG)*Y(K)
350 END DO
DET=DXKDX*DYKDY-DXKDY*DYKDX
DX=(-DYKDY*XK+DXKDY*YK)/DET
DY=( DYKDX*XK-DXKDX*YK)/DET
XG=XG+DX
YG=YG+DY
IF(ABS(DX).LT.TOL .AND. ABS(DY).LT.TOL) GO TO 420
400 END DO
!-
!......NOW GET WEIGHTING FUNCTIONS FOR QUAD FUNCTION
!-
420 CONTINUE
DO K=1,NCN
WGT(K)=XN(IT,K,XG,YG)
END DO
IF(ISWT .EQ. 1) THEN
!-
!- REDUCE TO LINEAR FUNCTION BY ADDING TERMS
!-
DO K=2,NCN,2
WGT(K-1)=WGT(K-1)+WGT(K)/2.
IF(K .LT. NCN) THEN
WGT(K+1)=WGT(K+1)+WGT(K)/2.
ELSE
WGT(1)=WGT(1)+WGT(K)/2.
ENDIF
ENDDO
!-
!- THEN COMPACT ARRAY
!-
DO K=1,NCN/2
WGT(K)=WGT(2*K-1)
ENDDO
ENDIF
RETURN
END

@ -0,0 +1,47 @@
SUBROUTINE GINPT(irm2,ID,DLIN)
CHARACTER ID*8,DLIN*72
100 CONTINUE
READ(irm2,7000) ID,DLIN
write(90,7000) id,dlin
!ipk jul03
call to_upper(id)
7000 FORMAT(A8,A72)
do i=1,8
if(id(i:i) .eq. char(9)) go to 200
enddo
do i=1,72
if(dlin(i:i) .eq. char(9)) go to 200
enddo
IF(ID(1:1) .EQ. ':') GO TO 100
IF(ID(1:1) .EQ. ';') GO TO 100
IF(ID(1:3) .EQ. 'com') GO TO 100
IF(ID(1:3) .EQ. 'COM') GO TO 100
IF(ID(1:3) .EQ. 'Com') GO TO 100
IF(ID(1:8) .EQ. ' ') GO TO 100
RETURN
200 continue
write(*,*) 'Error Tab character found in the following line'
write(90,*) 'Error Tab character found in the following line'
write(90,7000) id,dlin
write(*,7000) id,dlin
stop
END
SUBROUTINE TO_UPPER(STR)
CHARACTER*(*) STR
CHARACTER*1 CH
L = LEN(STR)
DO I=1,L
CH = STR(I:I)
IF ( ICHAR(CH) .GT. 96 .AND. ICHAR(CH) .LE. 122) THEN
STR(I:I) = CHAR(ICHAR(CH)-32)
ENDIF
ENDDO
END

@ -0,0 +1,127 @@
SUBROUTINE GOUTLIN
USE WINTERACTER
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
CHARACTER(LEN=255) :: FNAME,FILTER
CHARACTER(LEN=4) :: SUB
LOGICAL OPENED
CHARACTER*1 IFLAG,ANS(10)
! DIMENSION XOUT(1000),YOUT(1000)
DATA ANS/' ',' ',' ',' ',' ',' ','n','z','r','q'/
IF(.NOT. ALLOCATED(XOUT)) THEN
ALLOCATE (XOUT(5000,10),YOUT(5000,10))
ENDIF
N=0
IOUTOUT=25
INQUIRE(25, OPENED=OPENED)
if(.not. opened) then
Filter='OUTLINE file -- *.dat|*.dat|POLY file -- *.poly|*.poly|'
CALL WSelectFile(Filter,SaveDialog+PromptOn+AppendExt+DirChange,FNAME,'Save Outline File')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
CALL IlowerCase(FNAME)
CALL GETSUB(FNAME,SUB)
OPEN(IOUTOUT,FILE=FNAME,STATUS='UNKNOWN',ACTION='WRITE')
ELSE
GO TO 1
ENDIF
ENDIF
1 CONTINUE
IF(SUB(1:3) .EQ. 'dat') THEN
IOUTSW=0
ELSE
IOUTSW=1
ENDIF
!IPK GET STRING OF MAP COORDINATES
!
! Draw box around selections
!
2 CONTINUE
NHTPSV=NHTP
NMESSV=NMESS
NBRRSV=NBRR
NHTP=0
NBRR=1
NMESS=45
CALL HEDR
!
! Get answer
!
! 3 call xyloc(XPT,YPT,ANS,IBOX)
3 call xyloc(XPT,YPT,IFLAG,IBOX)
!
IF(IRMAIN .NE. 1 .and. ibox .ne. 10) THEN
N=N+1
XTMP = XPT*TXSCAL - XS
YTMP = YPT*TXSCAL - YS
IF(IOUTSW .EQ. 0) THEN
WRITE(IOUTOUT,*) XTMP,YTMP
ELSE
XOUT(N,1)=XTMP
YOUT(N,1)=YTMP
ENDIF
GO TO 3
ENDIF
IF(IOUTSW .EQ. 1) THEN
NDIM=2
NZERO=0
NONE=1
WRITE(IOUTOUT,*)N,NDIM,NZERO,NZERO
DO I=1,N
WRITE(IOUTOUT,*) I,XOUT(I,1),YOUT(I,1)
ENDDO
WRITE(IOUTOUT,*) N,NZERO
DO I=1,N-1
WRITE(IOUTOUT,*) I,I,I+1
ENDDO
WRITE(IOUTOUT,*) N,N,NONE
WRITE(IOUTOUT,*) NZERO
ENDIF
NHTP=NHTPSV
NMESS=NMESSV
NBRR=NBRRSV
CALL HEDR
RETURN
END
SUBROUTINE GETSUB4(FNAME,SUB)
CHARACTER(LEN=255) :: FNAME
CHARACTER(LEN=4) :: SUB
INTEGER ,EXTERNAL :: LENSTR
INTEGER :: LNNAM,K
LNNAM=LENSTR(FNAME)
SUB=' '
DO K=LNNAM,1,-1
IF(FNAME(K:K) .EQ. '.') THEN
IF(LNNAM .GT. K+3) THEN
SUB=FNAME(K+1:K+4)
ELSEIF(LNNAM .GT. K+2) THEN
SUB(1:3)=FNAME(K+1:K+3)
SUB(4:4)=' '
ELSE
SUB=' '
ENDIF
GO TO 110
ENDIF
ENDDO
110 CONTINUE
RETURN
END

@ -0,0 +1,872 @@
!IPK LAST UPDATE FEB 11 2002 ADD LOCK AS VARIABLE
!ipk last update Feb 10 1997
SUBROUTINE GRIDSB(ISWTIN)
!
! Routines to control interpolation of nodal elevations
!
USE WINTERACTER
USE BLKMAP
USE BLK1MOD
include 'd.inc'
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!iPK APR94
COMMON /RECOD/ IRECD,TSPC
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
!
!IPKJAN94 INTEGER*2 LISTM
! INTEGER LISTM
!ipk feb94 add ARF then remove may97
! DIMENSION LISTM(1000),listt(1600,4),nlf(4),icomp(4),xnear(4)
!ipk feb03 common /mapc/imap(maxpl),NCRS(MAXPL)
!ipk sep97 add NCRS above
!
!ipknov93 CHARACTER*1 ANS,ANSW(10)
CHARACTER*1 ANS,ANSW(10),IFLAG
CHARACTER*63 STRELS
DATA STRELS/' You have tried set to set elevation with no mapfile"'/
!
DATA ANSW/'m','a','f','s','k','u','t','w','h','q'/
!JUN08 DATA ISWTAGN/0/
!ipk feb94 add DATA and FUNCTION below
! DATA ARF/-180.,-90.,0.,90.,180./
! ANGN(K,L)=
! + ATAN2((CMAP(K,2)-CORD(L,2)),(CMAP(K,1)-CORD(L,1)))*57.296
!
! Draw box around selections
!
!IPK SEP97
100 CONTINUE
IDONET=0
NHTP = 9
NMESS = 0
NBRR = 0
IF(ISWTIN .EQ. -1) GO TO 190
CALL HEDR
!
! Get answer
!
110 call xyloc(XPT,YPT,ANS,IBOX)
IF(IRMAIN .EQ. 1) RETURN
IF(ANS .EQ. 'c') THEN
if(ibox .eq. 0) go to 110
ANS=ANSW(IBOX)
ENDIF
IF(ANS .EQ. 'm') THEN
!
! This option allows changes to bottom elevations
!
CALL ADDPTH
IF(IRMAIN .EQ. 1) RETURN
GO TO 100
ELSEIF (ANS .EQ. 'a') THEN
!
! All nodes
!
ISWT = -1
DO N=1,NP
IF(INEW(N) .EQ. 1) WD(N)=-9999.
ENDDO
ELSEIF(ANS .EQ. 'f') THEN
!
! Fill nodes
!
ISWT = 0
ELSEIF(ANS .EQ. 's') THEN
!
! Single node at a time
!
ISWT = 1
!ipk feb02 add lock/unlock and remove cdata
ELSEIF(ANS .EQ. 'k') THEN
!
! lock node
!
! Get M from mouse
!
115 CONTINUE
NHTP=0
NMESS=21
NBRR=3
CALL HEDR
IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,M,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
if(iflag .eq. 'q') go to 100
lock(m)=1
go to 115
ELSEIF(ANS .EQ. 'u') THEN
!
! unlock node
!
! Get M from mouse
!
120 CONTINUE
NHTP=0
NMESS=21
NBRR=3
CALL HEDR
IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,M,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
if(iflag .eq. 'q') go to 100
lock(m)=0
go to 120
ELSEIF(ANS .EQ. 't') THEN
!
! Create data for layers
!
CALL ADDLAY
IF(IRMAIN .EQ. 1) RETURN
GO TO 100
ELSEIF(ANS .EQ. 'w') THEN
!
! This option allows changes to nodal widths
!
CALL ADDWID
IF(IRMAIN .EQ. 1) RETURN
GO TO 100
!
! Call to help screen
!
ELSEIF(ANS .EQ. 'h') THEN
CALL HELPS(4)
IF(IRMAIN .EQ. 1) RETURN
GO TO 100
!
ELSEIF(ANS .EQ. 'q') THEN
!
! Writeout and return
!
CALL WRTOUT(0)
RETURN
ENDIF
190 CONTINUE
IF(IMP .EQ. 0) THEN
CALL SYMBL(0.,7.25,0.20,STRELS,0.,63)
go to 100
endif
!
! Establish size for range
!
call setrng(xnears,nmap)
ITIME=0
ICOUNTF=0
MM=0
200 MM=MM+1
! write(90,*) 'gridsb-111',mm,np,iswt,inew(mm)
IF(MM .LE. NP) THEN
!
! Decode which alternative we are processing
! ipk feb 03 determine interpolation method
!
IF(MM .EQ. 1 .AND. ISWTAGN .EQ. 0) THEN
IF(IRECD .EQ. 2) THEN
iswtintp=0
iswtagn=0
go to 210
ENDIF
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to interpolate '//&
CHAR(13)//'from the triangulated map file?' ,&
'Select Interpolation method?')
! If answer 'Yes' set interpolate switch to 1
!
IF (WInfoDialog(4) .EQ. 2) then
iswtintp=0
ELSE
iswtintp=1
ENDIF
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Ask this question again?'//&
CHAR(13)//' ' ,&
'Ask again?')
! If answer 'Yes' set again switch to 0
!
IF (WInfoDialog(4) .EQ. 2) then
iswtagn=1
ELSE
iswtagn=0
ENDIF
ENDIF
210 CONTINUE
IF(iswtintp .eq. 1) then
if(iswt .ne. 1) then
! Sort the x-coordinates
call sortdb(xusr,ncrs,np)
else
ncrs(mm)=mm
endif
m=ncrs(mm)
else
m=mm
endif
! IPK OCT 2 1991
IF(ISWT .EQ. 1) THEN
! Single node at a time ISWT = 1
!
! Get M from mouse and set MM to NP
!
NHTP=0
NMESS=21
!ipk jun08 NBRR=0
NBRR=1
CALL HEDR
IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
if(iflag .eq. 'q') go to 100
M=INODE
MM=NP
endif
IF(INEW(M) .EQ. 0) GO TO 200
! IPK END OCT 2 1991
IF(ISWT .EQ. -1) THEN
! All nodes ISWT = -1
!ipk feb02
if(lock(m) .eq. 1) go to 200
ELSEIF(ISWT .EQ. 0) THEN
! Fill nodes ISWT = 0
!ipk feb02
IF(WD(M) .GT. -9000. .or. lock(m) .eq. 1) go to 200
ENDIF
! write(90,*) 'gridsb-138', m,mm,iswt,wd(m),xnears
IF(ISWTINTP .EQ. 0) THEN
if(lock(m) .eq. 0) CALL SETELV(XNEARS,NMAP,M,ISWT)
ELSE
if(nelts .eq. 0) then
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'No triangulated exists'//&
CHAR(13)//'Do you wish to triangulate now?' ,&
'NO TRIANGULATION AVAILABLE?')
! If answer 'Yes' set triangulate now
!
IF (WInfoDialog(4) .EQ. 2) then
return
ELSE
call triang
IDONET=1
ENDIF
endif
if(lock(m) .eq. 0) CALL TRIANINT(NMAP,M,ISWT,ITIME)
ENDIF
! write(90,*) 'gridsb-141', m,iswt,wd(m)
if(wd(m) .lt. -9997.) THEN
icountf=icountf+1
WD(M)=-9998.
ENDIF
GO TO 200
ENDIF
IF(IDONET .EQ. 1) THEN
CALL RDMAP(2,99,0,0) ! XXXXX
CLOSE(99)
ENDIF
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to plot contours?'//&
CHAR(13)//' ','PLOT CONTOURS?')
!
! If answer 'No', return
!
IF (WInfoDialog(4).EQ.2) THEN
go to 220
ENDIF
215 menus=13
call conout(menus)
MENUS=12
CALL CONOUT(MENUS)
!ipkjan94 IF(ISWT .EQ. -1) GO TO 210
220 if(icountf .gt. 0) then
CALL FMESS(ICOUNTF,ISWTT)
!
! If answer 'Yes', use search for adjacent nodes
!
IF(ISWTT .EQ. 1) then
call fillin(icountf)
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to plot contours again?'//&
CHAR(13)//' ','PLOT CONTOURS?')
!
! If answer 'No', return
!
IF (WInfoDialog(4).EQ.2) THEN
IF(ICOUNTF .GT. 0) GO TO 220
ELSE
GO TO 215
ENDIF
END IF
endif
IF(ISWTIN .EQ. -1) RETURN
IF(ISWT .EQ. 1) THEN
!ipk jun08 CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
IF(IRMAIN .EQ. 1) RETURN
if(iflag .eq. 'q') go to 100
M=INODE
MM=NP-1
GO TO 200
ELSEIF(ISWT .EQ. -1) THEN
GO TO 100
ENDIF
!ipk jun08 IF(ABS(ISWT) .EQ. 1) GO TO 100
RETURN
END
!ipk jul98 revise call
!IPK SUBROUTINE GRIDIN(I,SOLN,LISTM,NLG)
SUBROUTINE GRIDIN(XZ,YZ,SOLN,LISTM,NLG)
!
! Routine to interpolate values from map to node points
!
! I is the location in the CORD array to be interpolated
! SOLN is the interpolated value developed
! NLG is the number of entries in the map array
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!IPK JAN94 INTEGER*2 LISTM,NLIST,NKEY
!IPK DEC09 INTEGER LISTM,NLIST,NKEY
INTEGER LISTM,NLIST
DIMENSION LISTM(*)
DIMENSION NLIST(1000),ADIST(1000),WT(1000)
!
! Function statements
!
DIST(K,X,Y)=SQRT((CMAP(K,1)-X)**2+(CMAP(K,2)-Y)**2)
!IPK FEB97 ANG(K,X,Y)=ATAN2((CMAP(K,2)-Y),(CMAP(K,1)-X))*57.296
ANG(K,X,Y)=ATAN2((CMAP(K,1)-X),(CMAP(K,2)-Y))*57.296
!
! Initialize
!
TOL=120.
! DO KK=1,NLG
! WRITE(90,*) 'LISTM',KK,LISTM(KK)
! ENDDO
!
! Form list of distances from I to data locations
!
NTMP=0
IPAS=1
!IPK JUL98 X=CORD(I,1)
!PK JUL98 Y=CORD(I,2)
X=XZ
Y=YZ
140 CONTINUE
DO 150 KK=1,NLG
K=LISTM(KK)
IF(K .EQ. NTMP) THEN
ADIST(KK)=-VOID
ELSE
ADIST(KK)=DIST(K,X,Y)
ENDIF
150 END DO
!
! Sort order for nearest points
!
CALL SORT(ADIST,NKEY,NLG)
do nnnn=1,nlg
nn=nkey(nnnn)
nzz=listm(nn)
! WRITE(90,*) NZZ,X,Y,cmap(nzz,1),cmap(nzz,2)
! ATMP=ANG(NZZ,X,Y)
! write(90,*) nnnn,adist(nnnn),val(nzz),ATMP
enddo
! read(*,*) aaa
KK=1
!
! Search through sorted list
!
INIT=1
180 DO 260 K=1,NLG
NN=NKEY(K)
IF(NN .EQ. 0) GO TO 260
N=LISTM(NN)
!
! Initialize
!
IF(N .EQ. NTMP) GO TO 260
IF(INIT .EQ. 1) THEN
NLIST(1)=N
YY=(CMAP(N,2)-Y)
XX=(CMAP(N,1)-X)
IF(YY .EQ. 0. .AND. XX .EQ. 0.) THEN
RANGEF=0.
RANGEB=360.
ELSE
RANGEF=ANG(N,X,Y)
RANGEB=ANG(N,X,Y)+360.
ENDIF
INIT=2
GO TO 260
ENDIF
!
! Skip out if already processed
!
YY=(CMAP(N,2)-Y)
XX=(CMAP(N,1)-X)
IF(YY .EQ. 0. .AND. XX .EQ. 0.) THEN
ANGLE=0.
ELSE
ANGLE=ANG(N,X,Y)
ENDIF
200 CONTINUE
! write(90,*) 'angls',n,angle,rangef,rangeb,val(n)
!
! Test if angle greater than high value
!
IF(ANGLE .GT. RANGEF) THEN
!
! Test if the new point is within the allowable range
!
IF(ANGLE .LT. RANGEF+TOL) THEN
!
! Process this point
!
RANGEF=ANGLE
KK=KK+1
NLIST(KK)=N
NKEY(K)=0
!
! Test if we now have enough points to exit
!
IF(RANGEF+TOL .GT. RANGEB) THEN
GO TO 300
ELSE
GO TO 180
ENDIF
!
! Test if angle lies inside the already spanned area
! If so it cannot be used
!
ELSEIF(ANGLE .GT. RANGEB) THEN
NKEY(K)=0
!
! Test if it close enough to the low value
!
ELSEIF(ANGLE .GT. RANGEB-TOL) THEN
!
! Process this point
!
RANGEB=ANGLE
KK=KK+1
NLIST(KK)=N
NKEY(K)=0
!
! Test if we have enough points to exit
!
IF(RANGEF+TOL .GT. RANGEB) THEN
GO TO 300
ELSE
GO TO 180
ENDIF
!
! Not a usable point at this time, move on to next point
!
ELSE
GO TO 260
!
! Increase angle by 360 and test again
!
ENDIF
ELSE
ANGLE=ANGLE+360.
GO TO 200
ENDIF
260 END DO
!
! We have finished loop without completing polygon
!
GO TO 500
!
! Process least squares fit on this list
!
300 CONTINUE
! WRITE(90,*) 'least squares list',KK,x,y
! WRITE(90,*) (NLIST(N),N=1,KK)
! do n=1,kk
! write(90,*) nlist(n),cmap(nlist(n),1),cmap(nlist(n),2)
! + ,val(nlist(n)),dist(nlist(n),x,y)
! enddo
!ipk feb97 changes to refine processing
!
! Check if points are close together relative to the centre point
!
! write(90,*) kk,x,y,nlg
do n=1,kk
l=nlist(n)
dc=dist(l,x,y)
xx=cmap(l,1)
yy=cmap(l,2)
if(n .lt. kk) then
do m=n+1,kk
ll=nlist(m)
dr=dist(ll,xx,yy)
if(dr .lt. 0.1*dc) then
if(kk .gt. 3) then
ds=dist(ll,x,y)
if(ds .lt. dc) then
ndrp=n
else
ndrp=m
endif
!
! drop this point
!
do mm=ndrp,kk-1
nlist(mm)=nlist(mm+1)
enddo
kk=kk-1
go to 300
else
go to 310
endif
endif
enddo
endif
enddo
310 continue
!ipk feb97 end changes for processing
! WRITE(90,*) '310',kk
! WRITE(90,*) (NLIST(N),N=1,KK)
!ipk feb97 chnage to add weighting
do n=1,kk
!ipk jul98 if(dist(nlist(n),CORD(I,1),CORD(I,2)) .gt. 0.) then
!ipk jul98 wt(n)=1./dist(nlist(n),CORD(I,1),CORD(I,2))
if(dist(nlist(n),XZ,YZ) .gt. 0.) then
wt(n)=1./dist(nlist(n),XZ,YZ)
else
soln=val(nlist(n))
return
endif
enddo
!IPK JUL98 CALL ALSQ(KK,NLIST,I,SOLN,WT)
CALL ALSQ(KK,NLIST,XZ,YZ,SOLN,WT)
!ipk feb97 end changes
!
! final value is SOLN
!
RETURN
500 TOL=TOL+25.
IF(TOL .GT. 180.) GO TO 550
IF(RANGEF+TOL .GT. RANGEB) THEN
GO TO 300
ENDIF
GO TO 180
550 CONTINUE
!c write(90,*) ' in trouble split',rangef,rangeb
SPLIT=(RANGEF+RANGEB)/2.-180.
AMIN=180.
DO 600 N=1,KK
IF(NLIST(N) .EQ. NTMP) GO TO 600
YY=(CMAP(NLIST(N),2)-Y)
XX=(CMAP(NLIST(N),1)-X)
IF(YY .EQ. 0. .AND. XX .EQ. 0.) THEN
ANGL=0.
ELSE
ANGL=ANG(NLIST(N),X,Y)
ENDIF
IF(IPAS .EQ. 2) GO TO 600
!
! Find line closest to split
!
IF(ABS(SPLIT-ANGL) .LT. AMIN) THEN
AMIN=ABS(SPLIT-ANGL)
! write(90,*) 'ntmp reset',ntmp,nlist(n),amin,split
NTMP=NLIST(N)
ENDIF
ANGLP=ANGL-360.
IF(ABS(SPLIT-ANGLP) .LT. AMIN) THEN
AMIN=ABS(SPLIT-ANGLP)
NTMP=NLIST(N)
ENDIF
! 580 WRITE(90,*) NLIST(N),ANGL
600 END DO
IF(IPAS .EQ. 1) THEN
IPAS=2
X=CMAP(NTMP,1)
Y=CMAP(NTMP,2)
TOL=120.
write(90,*) 'INTERP FOR ',xz,yz,' MOVED TO',x,y,ntmp
GO TO 140
ENDIF
WRITE(90,*) 'ERROR NO POLYGON RANGEF,RANGEB',RANGEF,RANGEB,SPLIT
WRITE(90,*) 'OPPOSITE NODE AND ANGULAR DIFF',NTMP,AMIN
SOLN=-9998.
RETURN
END
!
! FUNCTION ANG(K,X,Y)
!
! INCLUDE 'BLK1.COM'
!
! YY=(CMAP(K,2)-Y)
! XX=(CMAP(K,1)-X)
! IF(YY .EQ. 0. .AND. XX .EQ. 0.) THEN
! ANG=0.
! ELSE
! ANG=ATAN2(YY,XX)*57.296
! ENDIF
! RETURN
! END
SUBROUTINE SORT(A,NKEY,N)
!*********************************** .....SORT.....
!-
!......SORT IS A SIMPLE SHELL SORT ROUTINE
!-
! SHELL SORT
SAVE
!
!IPK JAN94 INTEGER*2 NKEY
DIMENSION A(*),NKEY(1)
IF(N.LT.2) RETURN
DO 90 J=1,N
NKEY(J)=J
90 END DO
ID = N
100 ID = ID / 2
110 IB = 1
120 GO TO 200
130 IB = IB + 1
IF( IB .LE. ID ) GO TO 200
IF( ID .GT. 1 ) GO TO 100
RETURN
200 I = IB
210 K = I + ID
220 IF( A(NKEY(I)) .LE. A(NKEY(K)) ) GO TO 250
NKT = NKEY(K)
NKEY(K) = NKEY(I)
J = I
230 K = J - ID
IF( K .LT. 1 ) GO TO 240
IF( A(NKT) .GT. A(NKEY(K)) ) GO TO 240
NKEY(J) = NKEY(K)
J = K
GO TO 230
240 NKEY(J) = NKT
250 I = I + ID
IF( I + ID .LE. N ) GO TO 210
GO TO 130
END
!ipk feb97 add weighting
!iok jul98 SUBROUTINE ALSQ(NPTS,NLIST,I,SOLN,WT)
SUBROUTINE ALSQ(NPTS,NLIST,xx,yy,SOLN,WT)
!
! Least squares routine
!
! INCLUDE 'PARAM.COM'
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!IPK JAN94 INTEGER*2 NLIST
REAL*8 A,R,B,S,X,Y,ATR,ATR2,BTR,C,T,X3,X2,X1
DIMENSION A(3,3),R(3),B(2,2),S(2),wt(*)
DIMENSION NLIST(*)
!
! Initialize matrices
!
!ipk jul98 X=CORD(I,1)
!ipk jul98 Y=CORD(I,2)
X=XX
Y=YY
! write(*,*) (nnn,cmap(nnn,1),cmap(nnn,2),nnn=1,16)
! write(*,*) (nlist(n),n=1,npts)
DO 160 K=1,3
R(K)=0.
DO 150 J=1,3
A(J,K)=0.
150 CONTINUE
160 END DO
!
! Form A and R matrices
!
DO 200 N=1,NPTS
KK=NLIST(N)
! write(*,*) cmap(kk,1),cmap(kk,2),val(kk)
!ipk feb97 add weighting
A(1,1)=A(1,1)+1.0*wt(n)
A(1,2)=A(1,2)+CMAP(KK,1)*wt(n)
A(1,3)=A(1,3)+CMAP(KK,2)*wt(n)
A(2,2)=A(2,2)+CMAP(KK,1)**2*wt(n)
A(2,3)=A(2,3)+CMAP(KK,1)*CMAP(KK,2)*wt(n)
A(3,3)=A(3,3)+CMAP(KK,2)**2*wt(n)
R(1)=R(1)+VAL(KK)*wt(n)
R(2)=R(2)+CMAP(KK,1)*VAL(KK)*wt(n)
R(3)=R(3)+CMAP(KK,2)*VAL(KK)*wt(n)
!ipk feb97 end addition of weighting
200 END DO
! read(*,*) al
!
! Solve equations
!
ATR=A(1,2)/A(1,1)
ATR2=A(1,3)/A(1,1)
B(1,1)=A(2,2)-ATR*A(1,2)
B(1,2)=A(2,3)-ATR*A(1,3)
S(1)=R(2)-ATR*R(1)
B(2,2)=A(3,3)-ATR2*A(1,3)
S(2)=R(3)-ATR2*R(1)
BTR=B(1,2)/B(1,1)
C=B(2,2)-BTR*B(1,2)
T=S(2)-BTR*S(1)
X3=T/C
X2=S(1)/B(1,1)-BTR*X3
X1=R(1)/A(1,1)-ATR*X2-ATR2*X3
!
! Substitute to get interpolated value
!
SOLN=X1+X2*X+X3*Y
RETURN
END
!
!ipksep97 new routine for soring map lines
!
SUBROUTINE SORTMAP(A,NKEY,N,IMAP)
!*********************************** .....SORT.....
!-
!......SORT IS A SIMPLE SHELL SORT ROUTINE
!-
! SHELL SORT
SAVE
!
!IPK JAN94 INTEGER*2 NKEY
DIMENSION A(*),NKEY(1),IMAP(*)
DATA VOID/1.E35/
IF(N.LT.2) RETURN
DO 90 J=1,N
NKEY(J)=J
IF(IMAP(J) .LT. 0) A(J)=VOID
90 END DO
ID = N
100 ID = ID / 2
110 IB = 1
120 GO TO 200
130 IB = IB + 1
IF( IB .LE. ID ) GO TO 200
IF( ID .GT. 1 ) GO TO 100
RETURN
200 I = IB
210 K = I + ID
220 IF( A(NKEY(I)) .LE. A(NKEY(K)) ) GO TO 250
NKT = NKEY(K)
NKEY(K) = NKEY(I)
J = I
230 K = J - ID
IF( K .LT. 1 ) GO TO 240
IF( A(NKT) .GT. A(NKEY(K)) ) GO TO 240
NKEY(J) = NKEY(K)
J = K
GO TO 230
240 NKEY(J) = NKT
250 I = I + ID
IF( I + ID .LE. N ) GO TO 210
GO TO 130
END
subroutine fillin(icountf)
USE BLKMAP
USE BLK1MOD
USE BLK2MOD
DIST(N,M)=(cord(n,1)-cord(m,1))**2+(cord(n,2)-cord(m,2))**2
CALL KCON(0)
MCOUNT=0
MCOUNTF=0
DO N=1,NP
IF(WD(N) .LT. -9997. .and. WD(N) .GT. -9998.5) THEN
MCOUNT=MCOUNT+1
DISTCUR=1.E20
NADJCT=0
DO K=1,NDELM(N)
J=NECON(N,K)
DO I=1,NCORN(J)
NC=NOP(J,I)
IF(NC .NE. 0 .AND. NC .NE. N) THEN
IF(WD(NC) .GT. -9997.) THEN
distance=dist(n,nc)
if(distance .lt. distcur) then
distcur=distance
nadjct=nc
endif
ENDIF
ENDIF
ENDDO
ENDDO
if(nadjct .gt. 0) then
wd(n)=wd(nadjct)
else
mcounfT=mcountf+1
ENDIF
if(mcount .eq. icountf) THEN
ICOUNTF=MCOUNTF
return
ENDIF
endif
enddo
ICOUNTF=MCOUNTF
return
end
SUBROUTINE FMESS(N1,N2)
use winteracter
implicit none
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,N2,IERR
! real ::
character*3 :: sub
call wdialogload(IDD_FBED)
ierr=infoerror(1)
CALL WDialogPutInteger(idf_integer1,n1)
CALL WDialogSelect(IDD_FBED)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
DO
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
N2=1
RETURN
ELSEIF(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
N2=0
RETURN
ENDIF
ENDDO
RETURN
END

@ -0,0 +1,334 @@
!IPk last updated July 15 1998
!IPk last updated Nov 18 1997
!IPk last updated Oct 31 1996 fix bug in map option
!IPK LAST UPDATED OCT 16 1996
!IPk last updated Oct 14 1996
!IPk last updated Oct 25 1995
SUBROUTINE HEDR
SAVE
! Routine to draw NSIZ header boxes at top of page with the HEAD label
CHARACTER*80 TITLE
CHARACTER*24 HLABL
CHARACTER*1 ALABL(10)
CHARACTER*40 MPDUM
COMMON /SSIZE/ HSIZE
COMMON /BLKA1/ TITLE,HLABL,ALABL,MPDUM
!IPk oct 95 lines defining MPDUM added
!ipk jan01 Expand IPSW to 10
COMMON /HEDS/ NP,NE,NHTP,NMESS,NBRR,IPSW(15),IRMAIN,ISCRN,icolon(12),IQSW(2),IRDISP,ntempin,igfgsw,igfgswb,ICRIN,IPW1,WIDEL,WIDSCL,itrianout
!IPk feb94 HEAD array and NHEDL enlarged
!IPk oct96 HEAD AND NHEDL MESS, ENLARGED
common /cols/ ibakk,icolr,iblkk
CHARACTER*8 HED(10),HEAD(10,16)
CHARACTER*47 MESOUT,MESS(48)
!ipk lan01 add to MESS
!ipk jan99 add to MESS
!ycw mar97 change HEADR(5,5) to HEADR(6,7)
!ipk add extra headr
CHARACTER*8 HEADR(6,10)
DIMENSION NHEDL(16)
DIMENSION X(5),Y(5),IRV(10)
!IPk feb 94 this statement reconstructed
!IPK OCT 96 THIS STATMENT DONE AGAIN
DATA HEAD/ ' (e)lts ','(n)odes ','(o)rder ',' (h)elp ',' ',&
'cc(l)ine',' csec(t)',' (z)oom ',' (r)draw',' (q)uit ','(n)od bk',& !1/2
' (e)l bk',&
're(f)ine','spli(t) ','c(l)ean ',5*' ','pr(l)st ','get(g)rp'& ! 2/3
,'(p)rgrp ','c(o)ptnd','cop(t)el',' (h)elp ',' ',' (z)oom ',' (r)draw',' (q)uit'& !3
,' (a)dd ',' (m)ove ',' (d)el ',' (f)ind ',' (g)line',' (e)lev '& !4
,' (h)elp ',' (z)oom ',' (r)draw',' (q)uit ',' (m)ap ',' (o)utln'& !4/5
,' (e)lts ','(n)odes ',' ne(t)w ',' t(y)pe ','cc(l)ine',' (d)ata '& !5
,'(b)elev ',' d(r)aw ',' (s)el ',' (j)oin ',' (f)ind ',' (g)blok'& !5/6
,' (t)ype ',' f(i)ll ',' (h)elp ',' (z)oom ',' (r)draw',' (q)uit '& !6
,' (d)el ','r(e)fin ',' (n)umb ',' (a)ll ','rectn(g)','(t)riang'& !7
,' (h)elp ',' (z)oom ',' (r)draw',' (q)uit ',' (f)our ','two(l)g '& !7/8
,'two(s)h ','spli(t) ','re(v)rs ','clea(n) ',' ','s(m)plfy',' ',' (q)uit '& !8
,'(m)an/el','(a)ll/el','(f)il/el','(s)in/el',' loc(k) ','(u)nlock'& !9
,'(t)hree ','man/(w)d',' (h)elp ','(q)uit ','al(l)mid','cen(m)id'& !9/10
,'sin(g)le','un(u)sed',' (f)ill ',' (j)oin ',' (h)elp ',' (z)oom '& !0
,' (r)draw',' (q)uit ','a(s)ave ','(b)save ','(m)save ',' (p)save'& !10/11
,2*' ',' (h)elp ',' (z)oom ',' (r)draw',' (q)uit ',' z(e)ro '& !11/12
,' (o)ne ',' (t)wo ','t(h)ree ',' (f)our ',' f(i)ve ',' (s)ix '& !12
,' se(v)en',' ei(g)ht',' (q)uit ',' (w)idth',' ss(1) ',' ss(2) '& !12/13
,'strw(d) ','str(e)lv','str(s)lp',' (b)s1 ',' (z)oom ',' (r)draw'& !13
,' (q)uit ','(d)elete','s(e)t999','se(t)elv','set(l)ay',' loc(k) ','(u)nlock','(f)orm-t',' (z)oom ',' (r)draw'& !13/14
,' (q)uit ','(d)elete','r(e)fin ','se(t)yp ','s(m)plfy','form(g)p','elev und',' ',' (z)oom ',' (r)draw'& !14/15
,' (q)uit ','(m)an/el','(a)ll/el','(f)il/el',' ',' ',' '& !15/16
,' ',' ',' (h)elp ','(q)uit '/
!IPk apr95 changed structure of messages added 3 more entries
DATA MESS /'Enter node to search for',' Enter material type',& ! 1,2
'Enter element to search for ',& ! 3
'Enter numbr of layers ',& ! 4
'Enter width ',& ! 5
'Click mouse at end of line ',& ! 6
'Enter nmbr of nodes in line ',& ! 7
'Click at corners of block ',& ! 8
'Enter nmbr of elts in x-dir ',& ! 9
'Enter nmbr of elts in y-dir ',& ! 10
'Click to move boundaries or (q)uit to save ',& ! 11
'Click on elements', 'Enter starting list number ',& ! 12,13
'Enter bottom elevation', 'Click on node ',& ! 14,15
'Click location of new node', 'Click at node to move ',&! 16,17
'Click at node to delete ',& ! 18
'Type 1 to use all nodes else type 0 ',& ! 19
'Enter element to select','Click location of node',& ! 20,21
'Enter ss1','Enter ss2','Enter strwid','Enter storage elevation',& ! 22,23,24,25
'Click mouse on node','click mouse on next node',& ! 26,27
'ERROR - Midside node selected - Select node again',& ! 28
'Plotting a selected cross section',& ! 29
'Click two locations to form a cross section',&! 30
'Click to adjust the cross section',& ! 31
'Compute cross section parameters',& ! 32
'Click a node for the cross section',& ! 33
'Click two locations to form the width','Click to adjust the line','Click two locations to form left slope',& ! 34 35 36
'Click two locations to form right slope','Click a location'& ! 37 38
,'Enter storage elevation','Enter storage slope',& ! 39 40
'Click at two locations to determine distance'& ! 41
,'Enter continuity line number use 0 to end','Click at location on image to define register point'& ! 42 43
,'Enter 1-d cross-section bed slope','Click at location to define outline point'& ! 44 45
,' ','Click two locations to define move'& ! 46 47
,'Click locations to form outline'/ ! 48
! last line Jan 2001
! line above added Jan 1999
DATA HEADR /&
' (q)uit ',5*' ',&
' (r)draw',' (q)uit ',4*' ',&
' (z)oom ',' (r)draw', ' (q)uit ',3*' ',&
' (n)ext ',' (z)oom ', ' (r)draw',' (q)uit ',2*' ',&
' (b)ack ',' cn(n)ect', ' (z)oom ',' (r)draw',' (q)uit ',' ',&
' (l)ine ',' (d)rawcs', ' (z)oom ',' (r)draw',' (q)uit ',' ',&
' (d)ist ',' (w)idth', ' (1)slop',' (2)slop',' b(e)lev',' (q)uit',&
' (d)el ',' (z)oom ', ' (r)draw',' (q)uit ',2*' ',&
' s(a)ve ',' (z)oom ', ' (r)draw',' (q)uit ',2*' ',&
' u(n)do ',' (c)ancl', ' (z)oom ',' (r)draw',' (q)uit ',1*' '/
DATA IRV/1 , 2 , 5 , 3 , 4 , 7 , 10 , 6 , 9, 5/
DATA NHEDL/10,5,10,10,10,10,10,10,10,10,10,10,10,10,10,10/
! DATA IBAKK/12/,ICOLR/11/
IF(NHTP .NE. 0) THEN
! Clear upper box area
CALL CLRBOX
! Copy appropriate heading for output
NSIZ=NHEDL(NHTP)
DO 120 N=1,NSIZ
HED(N)=HEAD(N,NHTP)
120 CONTINUE
! Draw box around selections with colour
!
Y(1)=7.5
Y(2)=7.5
Y(3)=7.995
Y(4)=7.995
Y(5)=7.5
XPT=0.
DO 150 I=1,NSIZ
X(1)=XPT
X(4)=XPT
X(5)=XPT
! XPT=XPT+1.0
XPT=XPT+HSIZE/10.
X(2)=XPT
X(3)=XPT
IF(I .EQ. 10) THEN
IBLK=IBAKK
!IPK OCT96 ADD COLOR OPTIONS
ELSEIF((NHTP .EQ. 5 .AND. IPSW(IRV(I)) .EQ. 1) .OR. &
(NHTP .EQ. 12 .AND. ICOLON(I) .EQ. 1)) THEN
IBLK=iblkk
ELSE
IBLK=IBAKK
ENDIF
CALL POLYFL(X,Y,5,IBLK)
CALL RBLACK
CALL PLOTT(X(1),Y(1),3)
CALL PLOTT(X(2),Y(2),2)
CALL PLOTT(X(3),Y(3),2)
CALL PLOTT(X(4),Y(4),2)
CALL PLOTT(X(1),Y(1),2)
150 CONTINUE
XSY=0.
YSY=7.65
DO 200 N=1,NSIZ
!ipk mar01
CALL SYMBL(XSY,YSY,0.20,HED(N),0.0, 8)
! XSY=XSY+1.0
XSY=XSY+HSIZE/10.
200 CONTINUE
ENDIF
IF(NMESS .GT. 0) THEN
! Clear upper box area
CALL CLRBOX
! Write out message
MESOUT=MESS(NMESS)
!ipk mar01
CALL SYMBL(0.,7.65,0.20,MESOUT,0.,47)
ENDIF
IF(NBRR .NE. 0) THEN
! Put box on right
! Draw box around selections
NBX=NBRR
if(NBX.gt.5) NBX=NBRR-1 !ycw mar97
IF(NBX .GT. 6) NBX=4
if(nbrr .eq. 10) NBX=5
! XLEFT=10-NBX
XLEFT=(10-NBX)*HSIZE/10.
DO 250 K=1,NBX
X(1)=XLEFT
X(4)=XLEFT
X(5)=XLEFT
! XLEFT=XLEFT+1.0
XLEFT=XLEFT+HSIZE/10.
X(2)=XLEFT
X(3)=XLEFT
IBLK=IBAKK
CALL POLYFL(X,Y,5,IBLK)
CALL RBLACK
CALL PLOTT(X(1),Y(1),3)
CALL PLOTT(X(2),Y(2),2)
CALL PLOTT(X(3),Y(3),2)
CALL PLOTT(X(4),Y(4),2)
CALL PLOTT(X(1),Y(1),2)
!ipk mar01
CALL SYMBL(XLEFT-1.,7.65,0.20,HEADR(K,NBRR),0.0,8)
250 CONTINUE
! ENDIF
ENDIF
RETURN
END
! Get xy location of cursor in screen coordinates (inches)
subroutine xyloc(xscrn,yscrn,iflag,ibox)
save
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
CHARACTER*80 TITLE
CHARACTER*24 HLABL
CHARACTER*1 ALABL(10)
CHARACTER*40 MPDUM
COMMON /SSIZE/ HSIZE
COMMON /BLKA1/ TITLE,HLABL,ALABL,MPDUM
!IPk oct 95 lines defining MPDUM added
!ipk jan01 Expand IPSW to 10
COMMON /HEDS/ NP,NE,NHTP,NMESS,NBRR,IPSW(15),IRMAIN,ISCRN,icolon(12),IQSW(2),IRDISP,ntempin,igfgsw,igfgswb,ICRIN,IPW1,WIDEL,WIDSCL,itrianout
character*1 iflag
common /blktek/ xmin, xmax, ymin, ymax,&
xpiv, ypiv, cthet, sthet,&
xscal, yscal, theta, thetdg,&
pgscl,scrnx,scrny,ix,iy
! IRDISP= 0 means no redisplay
irdisp=0
100 continue
! iy=ymax
! write(90,*) 'to tekgin nhtp',nhtp
call tekgin(xscrn,yscrn,iflag)
! write(90,*) 'back tekgin nhtp',nhtp,xscrn,yscrn,IRDISP
! write(90,'(a)') 'iflag',iflag
if(iflag .eq. 'P') then
call hedr
!IPk nov97 add (0)
call plotot(0)
call hedr
!ipk may01
irdisp=1
go to 100
endif
!IPk mar94 if(yscrn .gt. 7.0 .and. iflag .eq. 'c') then
if(yscrn .gt. 7.5 .and. iflag .eq. 'c') then
! ibox=ifix(xscrn+0.9999)
ibox=ifix(xscrn*10./HSIZE+0.9999)
iflag='c'
elseif(iflag .eq. 'M') then
irmain = 1
elseif(iflag .ne. 'c') then
ibox=1
else
ibox=0
endif
if(irmain .eq. 1) return
! Check for zoom command
if(nhtp .eq. 2 .or. nhtp .eq. 5 .or. nhtp .eq. 12 .or.&
nhtp .eq. 8 .or. nhtp .eq. 9) then
return
elseif(nhtp .eq. 0 .and. (nbrr .eq. 0 .or. nbrr .eq. 2&
.or. nbrr .eq. 7)) then
return
elseif(ibox .eq. 8 .or. iflag .eq. 'z') then
n1=nhtp
n2=nbrr
nhtp=0
nbrr=0
CALL ZOOM
nhtp=n1
nbrr=n2
!ipk may01
irdisp=1
if(irmain .eq. 1) return
call hedr
IF(N2 .EQ. 10) CALL PLTPT
go to 100
elseif(ibox .eq. 9 .or. iflag .eq. 'r') then
! Save display parameters
n1=nhtp
n2=nmess
n3=nbrr
CALL RDRW(0)
if(n2 .eq. 11) call pltpt
!ipk may01
irdisp=1
if(irmain .eq. 1) return
! Restore display parameters
nhtp=n1
nmess=n2
nbrr=n3
call hedr
go to 100
endif
return
end

@ -0,0 +1,99 @@
!ipk last update Nov 18 1997
!
SUBROUTINE HELPS(NTPIN)
USE WINTERACTER
!
! Master routine controlling the help facility
!
!
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'BFILES.I90'
!
CHARACTER(LEN=256) :: FILTER
CHARACTER*32 ANS
CHARACTER*78 AHP
character*55 strels
! INTEGER*2 IPAG
! INTEGER*2 NT
DIMENSION NPOS(11),NFIN(10)
LOGICAL*4 EXST
INQUIRE(FILE=DIRECT,EXIST=EXST)
IF(.not. EXST) THEN
CALL CLSCRN
! WRITE(strels,6000)
! 6000 format( 'Help files not available, press enter to return to menu')
! CALL SYMBL(0.2,7.0,0.25,STRELS,0.0,55)
! NDIG=1
! call gtcharx(ans,ndig,6.0,7.0)
Filter='HTM file -- *.htm|*.htm|'
! CALL WSelectFile(FILTER,PromptOn,DIRECT,'Help files not available - BROWSE')
CALL WSelectFile(FILTER,LoadDialog+MustExist,DIRECT,'Help files not available - BROWSE')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
GO TO 200
ELSE
CALL PLOTOT(1)
RETURN
ENDIF
ENDIF
!
! Write list of options and request choice
!
200 CONTINUE
!
! Decode choice and open appropriate file
!
IF(NTPIN .EQ. 0) THEN
if(nhtp .lt. 3) then
call WHelpfile(DIRECT)
elseif(nhtp .eq. 3) then
call WHelpfile(DIRECT,'REORDER')
elseif(nhtp .eq. 4) then
call WHelpfile(DIRECT,'NODE')
elseif(nhtp .eq. 5) then
call WHelpfile(DIRECT,'REDRAW')
elseif(nhtp .eq. 6) then
call WHelpfile(DIRECT,'ELEMENT')
elseif(nhtp .eq. 7) then
call WHelpfile(DIRECT,'SELECT')
elseif(nhtp .eq. 8) then
call WHelpfile(DIRECT,'REFINE')
elseif(nhtp .eq. 9) then
call WHelpfile(DIRECT,'ELEVATION')
elseif(nhtp .eq. 10) then
call WHelpfile(DIRECT,'DELETE')
elseif(nhtp .eq. 11) then
call WHelpfile(DIRECT,'SAVE')
elseif(nhtp .eq. 12) then
call WHelpfile(DIRECT,'MAP')
elseif(nhtp .eq. 13) then
call WHelpfile(DIRECT,'WIDTH')
elseif(nhtp .eq. 14) then
call WHelpfile(DIRECT,'POLNODE')
elseif(nhtp .eq. 15) then
call WHelpfile(DIRECT,'POLELEM')
endif
ELSEIF(NTPIN .EQ. 1) THEN
call WHelpfile(DIRECT,'FILE')
ELSEIF(NTPIN .EQ. 2) THEN
call WHelpfile(DIRECT,'ELEMENT')
ELSEIF(NTPIN .EQ. 3) THEN
call WHelpfile(DIRECT,'NODE')
ELSEIF(NTPIN .EQ. 4) THEN
call WHelpfile(DIRECT,'ELEVATION')
ELSEIF(NTPIN .EQ. 5) THEN
call WHelpfile(DIRECT,'REORDER')
ELSEIF(NTPIN .EQ. 6) THEN
call WHelpfile(DIRECT,'SELECT')
ELSEIF(NTPIN .EQ. 7) THEN
call WHelpfile(DIRECT,'DELETE')
ELSEIF(NTPIN .EQ. 8) THEN
call WHelpfile(DIRECT,'SAVE')
ENDIF
RETURN
END

@ -0,0 +1,162 @@
SUBROUTINE INITSIZ(IIN1,N1,M1,K1)
USE WINTERACTER
USE BLK1MOD
USE BLK2MOD
USE BLKMAP
INCLUDE 'D.INC'
IF(K1 .EQ. 0) THEN
MAXPL=200000
MAXP=200000
MAXE=120000
MAXSTO=2
MAXLIN=3000
MAXECON=60
MAXECON1=30
MAXLN=20
MAELN=300
RETURN
ENDIF
IMIDS=0
IF(IIN1 .EQ. 10. .AND. IGFG .EQ. 0 .AND. ITRIAN .EQ. 0) THEN
CALL RDRM1(IIN1,N1,M1,IMIDS)
ENDIF
IF(ITRIAN .EQ. 0) NMIDS=1
iqsw(1)=1
iqsw(2)=0
CALL WMenuSetState(ID_ITYPN,ItemChecked,1)
IF(N1 .GT. MAXP .OR. M1 .GT. MAXE .AND. IMIDS .EQ. 0) then
CALL WMessageBox(YesNo, QuestionIcon, 1,'Do you wish to add 20,000 nodes and elements to the limit (YES) or reset sizes (NO)','LIMITS EXCEEDED')
IF (WInfoDialog(4) .ne. 2) then
! yes
MAXP=N1+20000
MAXE=M1+20000
ELSE
CALL RESETSIZ
ENDIF
ELSEIF((N1 .GT. MAXP/3 .OR. M1 .GT. MAXE) .AND. IMIDS .EQ. 1) then
CALL WMessageBox(YesNo, QuestionIcon, 1,'This is a large unfilled network, do you wish to reset sizes?','LIMITS EXCEEDED')
IF (WInfoDialog(4) .ne. 2) then
! yes
CALL RESETSIZ
ENDIF
endif
ALLOCATE (CORD(MAXP,2),XUSR(MAXP),YUSR(MAXP),XC(MAXE),YC(MAXE)&
,NOP(MAXE,8),IMAT(MAXE),THTA(MAXE),IMATL(MAXE),CORDSN(MAXP,2)&
,WD(MAXP) ,WD1(MAXP),INSKP(MAXP), IESKP(MAXE),NCORN(MAXE)&
,WIDTH(MAXP), SS1(MAXP), SS2(MAXP), WIDS(MAXP)&
,IJUN(MAXP),INEW(MAXP),IEM(MAXE),LINTYP(MAXLIN),NEFLAG(MAXP),NEF(MAXP,3),LAY(0:MAXP+1),WTLAY(0:MAXP+1,9)&
,WIDBS(MAXP),SSO(MAXP),NODDEL(MAXP),IELDEL(MAXE)&
,NOPSV(MAXE,8),nefsv(MAXP,3),IMATSV(MAXE),LOCK(MAXP),BS1(MAXP),EDIF(0:MAXP),IGRPSER(MAXE),IOD(MAXP))
IJUN=0
lay=0
IGRPSER=1
ALLOCATE (NRIVCR1(MAXP),WTRIVCR1(MAXP),NRIVCR2(MAXP),WTRIVCR2(MAXP))
ALLOCATE (xusrsto(MAXP,MAXSTO),yusrsto(MAXP,MAXSTO),wdsto(MAXP,MAXSTO),&
WIDTHsto(MAXP,MAXSTO), SS1sto(MAXP,MAXSTO), SS2sto(MAXP,MAXSTO), WIDSsto(MAXP,MAXSTO)&
,WIDBSsto(MAXP,MAXSTO),SSOsto(MAXP,MAXSTO),bs1sto(MAXP,MAXSTO)&
,nopsto(MAXE,8,MAXSTO),imatsto(MAXE,MAXSTO),thtasto(MAXE,MAXSTO))
ALLOCATE (ICCLNSTO(50,350,MAXSTO)&
,NPSTO(MAXSTO),NESTO(MAXSTO),NLSTSTO(MAXSTO),NCLMSTO(MAXSTO))
ALLOCATE (ILISTSTO(MAXLN,MAELN,MAXSTO),LLISTSTO(MAXLN,MAXSTO))
ALLOCATE (MLIST(MAXE),ENXT(MAXE),NDELM(MAXP),LIST(MAXP) &
,NINC(MAXP),NELIM(MAXE))
ALLOCATE (ICON(MAXE,MAXECON))
ALLOCATE (NECON(MAXP,MAXECON))
ALLOCATE (MSN(MAXP),ICN(MAXP))
ALLOCATE (ILIST(MAXLN,MAELN),LLIST(MAXLN))
RETURN
END
SUBROUTINE RESETSIZ
USE WINTERACTER
USE BLK1MOD
USE BLKMAP
include 'd.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: NTYP,NLOCC
call wdialogload(IDD_MLIMITS)
ierr=infoerror(1)
CALL WDialogSelect(IDD_MLIMITS)
ierr=infoerror(1)
CALL WDialogPutINTEGER(IDF_INTEGER1,MAXP)
CALL WDialogPutINTEGER(IDF_INTEGER2,MAXE)
CALL WDialogPutINTEGER(IDF_INTEGER3,MAXPL)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,MAXP)
CALL WDialogGetINTEGER(IDF_INTEGER2,MAXE)
CALL WDialogGetINTEGER(IDF_INTEGER3,MAXPL)
GO TO 100
ENDIF
enddo
100 CONTINUE
return
end
SUBROUTINE SETGFGTRIAN(I1,I2,N2,M2)
USE BLK1MOD
! Define a common block with file names etc
INCLUDE 'BFILES.I90'
CHARACTER (LEN=255) :: FNAMTMP
IGFG=I1
ITRIAN=I2
IF(ITRIAN .EQ. 1) THEN
READ(10,*) M2
REWIND (10)
itunit=14
FNAMTMP=FNAMKEP
DO L=255,1,-1
IF(FNAMTMP(L:L) .EQ. '.') THEN
FNAMTMP(L+1:L+4)='node'
OPEN(ITUNIT,FILE=FNAMTMP,STATUS='OLD',ACTION='READ')
READ(ITUNIT,*) N2
CLOSE(ITUNIT)
RETURN
ENDIF
ENDDO
ENDIF
RETURN
END

File diff suppressed because it is too large Load Diff

@ -0,0 +1,438 @@
SUBROUTINE GRELV
!
! THIS ROUTINE COMPUTES THE GRIDDED ELEVATION
!
use winteracter
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!-
include 'd.inc'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: IERR,ISET
REAL :: ASET
DATA NXP,NYP/30,20/
DATA ITIM/0/
IF(ITIM .EQ. 0) THEN
NX=NXP+2
NY=NYP+2
ITIM=0
ENDIF
call wdialogload(IDD_GETINTP)
ierr=infoerror(1)
CALL WDialogSelect(IDD_GETINTP)
ierr=infoerror(1)
100 continue
NXP=NX-2
NYP=NY-2
XGR=XGRID*TXSCAL
YGR=YGRID*TXSCAL
CALL WDialogPutINTEGER(IDF_INTEGER1,NXP)
CALL WDialogPutINTEGER(IDF_INTEGER2,NYP)
CALL WDialogPutREAL(IDF_REAL1,XGR)
CALL WDialogPutREAL(IDF_REAL2,YGR)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,NXP)
CALL WDialogGetINTEGER(IDF_INTEGER2,NYP)
CALL WDialogGetREAL(IDF_REAL1,XGR)
CALL WDialogGetREAL(IDF_REAL2,YGR)
GO TO 200
else
NRECC=0
endif
enddo
200 CONTINUE
NX=NXP+2
NY=NYP+2
XGRID=XGR/TXSCAL
YGRID=YGR/TXSCAL
!-
AXMAX = HSIZE
AYMAX = 7.0
if(xgrid .eq. 0.) then
XGRID = AXMAX/FLOAT(NX-3)
ELSE
NX=(AXMAX/XGRID+0.5)+3
ENDIF
IF(YGRID .EQ. 0.) THEN
YGRID = AYMAX/FLOAT(NY-3)
ELSE
NY=(AYMAX/YGRID+0.5)+3
ENDIF
IF(NX .GT. MAXGRD .OR. NY .GT. MAXGRD) THEN
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK, &
'Maximum number of interpolation points exceeded '//CHAR(13) &
//'Choose a lower resolution.', &
'Warning')
go to 100
endif
CALL LOCATE
!
CALL POINTEL
RETURN
END
SUBROUTINE POINTEL
!*********************************** .....POINTS.....
!-
!......SUBROUTINE TO EVALUATE FUNCTION AT GRID POINTS
!-
!-
USE WINTERACTER
USE BLK1MOD
include 'd.inc'
INCLUDE 'TXFRM.COM'
!
REAL*8 XN,DNX,DNY
DOUBLE PRECISION XG,YG,XK,YK,XP,YP
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLKV1.COM'
! INCLUDE 'BLKV2.COM'
INCLUDE 'BFILES.I90'
!-
!ipk jul94 DIMENSION X(8),Y(8)
DIMENSION X(9),Y(9)
CHARACTER(LEN=255) :: FNAME,FNAMR
CHARACTER(LEN=256) :: FILTER
CHARACTER(LEN=3) :: SUB,SUB1
!-
DATA TOL/0.01/
!-
!-
!......LOOP ON ALL GRID POINTS
!-
FILTER = 'Map file *.map|*.map|'
CALL WSelectFile(FILTER,SaveDialog+PromptOn,FNAME,'Save Map File')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
CALL IlowerCase(FNAME)
CALL GETSUB(FNAME,SUB)
OPEN(199,FILE=FNAME,STATUS='UNKNOWN')
WRITE(199,8000)
8000 FORMAT('2,0.')
ELSE
RETURN
ENDIF
DO 1000 NN=1,NX
DO 950 MM=1,NY
N=IGRID(NN,MM)
IF(N.EQ.0) GO TO 950
HGN=0.
250 CONTINUE
!-
!......DETERMINE ELEMENT TYPE
!-
!IPKOCT93 ADD
NCN=8
IT=1
IF(NOP(N,7).NE.0) GO TO 275
NCN=6
IT=2
275 CONTINUE
!-
!......ESTABLISH LOCAL COORDINATES FOR EACH NODE POINT
!-
K1=NOP(N,1)
X(1)=0.
Y(1)=0.
DO 300 K=2,NCN
K2=NOP(N,K)
X(K)=CORD(K2,1)-CORD(K1,1)
Y(K)=CORD(K2,2)-CORD(K1,2)
300 END DO
!-
!......ESTABLISH LOCAL COORDINATES OF DESIRED POINT
!-
XP=FLOAT(NN-2)*XGRID
XRL=XP*TXSCAL-XS
XP=XP-CORD(K1,1)
YP=FLOAT(MM-2)*YGRID
YRL=YP*TXSCAL-YS
YP=YP-CORD(K1,2)
XG=0.
YG=0.
!-
!......ITERATE TO FIND LOCAL COORDINATE
!-
DO 400 ITER=1,10
DXKDX=0.
DXKDY=0.
DYKDX=0.
DYKDY=0.
XK=-XP
YK=-YP
DO 350 K=2,NCN
XK=XK+XN(IT,K,XG,YG)*X(K)
YK=YK+XN(IT,K,XG,YG)*Y(K)
DXKDX=DXKDX+DNX(IT,K,XG,YG)*X(K)
DYKDX=DYKDX+DNX(IT,K,XG,YG)*Y(K)
DXKDY=DXKDY+DNY(IT,K,XG,YG)*X(K)
DYKDY=DYKDY+DNY(IT,K,XG,YG)*Y(K)
350 END DO
DET=DXKDX*DYKDY-DXKDY*DYKDX
DX=(-DYKDY*XK+DXKDY*YK)/DET
DY=( DYKDX*XK-DXKDX*YK)/DET
XG=XG+DX
YG=YG+DY
IF(ABS(DX).LT.TOL .AND. ABS(DY).LT.TOL) GO TO 420
400 END DO
!-
!......NOW EVALUATE GRID POINT
!-
420 CONTINUE
DO 450 K=1,NCN
J=NOP(N,K)
HGN=HGN+XN(IT,K,XG,YG)*WD(J)
450 END DO
WRITE(199,9800) XRL,YRL,HGN
9800 FORMAT(F14.2',',F14.2,',',F14.3)
950 END DO
1000 END DO
! IF(NVEL .EQ. 1) WRITE(6,9803) ((UGRID(NN,MM),MM=1,32),
! 1NN=1,32)
! IF(NVEL .EQ. 1) WRITE(6,9803) ((VGRID(NN,MM),MM=1,32),
! 1NN=1,32)
9803 FORMAT(8E12.4)
! WRITE(6,9802)((GRID(NN,MM),MM=1,16),NN=1,16)
!9802 FORMAT(16F8.2)
WRITE(199,8001)
8001 FORMAT('END')
WRITE(199,8001)
RETURN
END
!
SUBROUTINE LOCATE
!*********************************** .....LOCATE.....
!-
!......LOCATE ESTABLISHES ELEMENT NUMBERS FOR ALL GRID POINTS
!-
USE BLK1MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLKV1.COM'
! INCLUDE 'BLKV2.COM'
INCLUDE 'BFILES.I90'
!
COMMON XS(4,3),YS(4,3),XM(4,3),ROOT(10)
!
VOID=1.E+20
NPTS= 7
DS=1./(FLOAT(NPTS)-1.)
DO 340 N=1,MAXGRD
DO 340 M=1,MAXGRD
340 IGRID(N,M)=0
!-
!....... PROCESS EACH ELEMENT
!-
DO 900 N=1,NE
IF(IESKP(N) .NE. 0) GO TO 900
IF(IMAT(N).LE.0) GO TO 900
IF(NOP(N,6) .EQ. 0) GO TO 900
XMINN=VOID
YMINN=VOID
XMAXX=-VOID
YMAXX=-VOID
!-
!...... TRACE AROUND EACH SIDE FOR MAX AND MIN LOCATIONS
!-
NCN=8
IF(NOP(N,7).EQ.0) NCN=6
NSIDE=NCN/2
K=0
DO 600 M=1,NCN,2
K=K+1
M1=NOP(N,M)
M2=NOP(N,M+1)
M3=MOD(M+2,NCN)
M3=NOP(N,M3)
XS(K,1)=CORD(M1,1)
XS(K,2)=CORD(M2,1)
XS(K,3)=CORD(M3,1)
YS(K,1)=CORD(M1,2)
YS(K,2)=CORD(M2,2)
YS(K,3)=CORD(M3,2)
XM(K,1)=2.*XS(K,1)-4.*XS(K,2)+2.*XS(K,3)
XM(K,2)=-3.*XS(K,1)+4.*XS(K,2)-XS(K,3)
XM(K,3)=XS(K,1)
!-
!..... WORK ALONG BOUNDARY OF ELEMENT
!-
S=0.
DO 550 J=1,NPTS
XN1=(1.-S)*(1.-2.*S)
XN2=4.*(1.-S)*S
XN3=S*(2.*S-1.)
X=XN1*XS(K,1)+XN2*XS(K,2)+XN3*XS(K,3)
Y=XN1*YS(K,1)+XN2*YS(K,2)+XN3*YS(K,3)
IF(X.LT.XMINN) XMINN=X
IF(X.GT.XMAXX) XMAXX=X
IF(Y.LT.YMINN) YMINN=Y
IF(Y.GT.YMAXX) YMAXX=Y
S=S+DS
550 END DO
600 END DO
!-
!...... ESTABLISH GRID FRAMEWORK
!-
XLH=XMINN/XGRID
XRH=XMAXX/XGRID
YBT=YMINN/YGRID
YTP=YMAXX/YGRID
IXL=XLH+2.999
IXT=XRH+2.001
IYL=YBT+2.999
IYT=YTP+2.001
IERR=0
!$$$
IF(IXL.LT.0) IERR=1
IF (IXL .LT. 1) IXL = 1
IF(IYL.LT.0) IERR=1
IF (IYL .LT. 1) IYL = 1
IF(IXT.GT.NX) IERR=1
IF (IXT .GT. NX) IXT = NX
IF(IYT.GT.NY) IERR=1
IF (IYT .GT. NY) IYT = NY
!
IF(IERR.EQ.0) GO TO 620
! WRITE(6,9989) N
! 9989 FORMAT(///' ERROR STOP FOR ELEMENT',I5)
! WRITE(6,9990) (K,(XS(K,M),YS(K,M),XM(K,M),M=1,3),K=1,NSIDE)
! 9990 FORMAT(I10,9E13.4)
! WRITE(6,9992) XLH,XRH,YBT,YTP,IXL,IXT,IYL,IYT
! 9992 FORMAT(4F20.6,4I8)
!$$$ STOP
620 CONTINUE
!-
!...... FIND INTERSECTIONS FOR HORIZONTAL GRID LINE
!-
DO 800 M=IYL,IYT
Y=(M-2)*YGRID
IL=0
DO 700 K=1,NSIDE
A=2.*YS(K,1)-4.*YS(K,2)+2.*YS(K,3)
B=-3.*YS(K,1)+4.*YS(K,2)-YS(K,3)
C=YS(K,1)-Y
SQ=B**2-4.*A*C
IF(ABS(A).LT.0.01) GO TO 650
IF(SQ.GT..001) GO TO 660
IF(SQ.LT.-.001) GO TO 700
S=-B/(2.*A)
IF(S.LT.0. .OR. S.GT.1.0) GO TO 700
IL=IL+1
ROOT(IL)=XM(K,1)*S**2+XM(K,2)*S+XM(K,3)
IL=IL+1
ROOT(IL)=ROOT(IL-1)
GO TO 700
650 IF(ABS(B).LT. 0.001) GO TO 700
S=-C/B
GO TO 670
660 CONTINUE
S=(-B+SQRT(SQ))/(2.*A)
IF(S.LT.0. .OR. S.GT.1.0) GO TO 665
IL=IL+1
ROOT(IL)=XM(K,1)*S**2+XM(K,2)*S+XM(K,3)
665 S=(-B-SQRT(SQ))/(2.*A)
670 CONTINUE
IF(S.LT.0. .OR. S.GT.1.0) GO TO 700
IL=IL+1
ROOT(IL)=XM(K,1)*S**2+XM(K,2)*S+XM(K,3)
700 END DO
IF(IL.GT.0) GO TO 705
DO 703 K=1,NSIDE
IF(ABS(YS(K,3)-Y).LT.0.05) GO TO 704
703 END DO
GO TO 800
704 IL=2
ROOT(1)=XS(K,3)-0.05
ROOT(2)=XS(K,3)+0.05
705 CONTINUE
CALL SORTE(ROOT,IL)
! ISET=0
IC=1
!-
!....... LOCATE VALUES INTO IGRID
!-
9908 FORMAT(I10,F20.2)
9997 FORMAT(5F20.4)
DO 750 K=IXL,IXT
X=(K-2)*XGRID
710 CONTINUE
IF(X.LE.ROOT(IC)) GO TO 720
IC=IC+1
IF(IC.GT.IL) GO TO 800
GO TO 710
720 IF(MOD(IC,2).EQ.0) IGRID(K,M)=N
750 END DO
800 END DO
900 END DO
!CC WRITE(*,9800) ((IGRID(N,M),N=1,20),M=1,20)
9800 FORMAT(20I3)
RETURN
END
!
SUBROUTINE SORTE(A,N)
!*********************************** .....SORT.....
!-
!......SORT IS A SIMPLE SHELL SORT ROUTINE
!-
! SHELL SORT
SAVE
!
DIMENSION A(*)
IF(N.LT.2) RETURN
ID = N
100 ID = ID / 2
110 IB = 1
120 GO TO 200
130 IB = IB + 1
IF( IB .LE. ID ) GO TO 200
IF( ID .GT. 1 ) GO TO 100
RETURN
200 I = IB
210 K = I + ID
220 IF( A(I) .LE. A(K) ) GO TO 250
T = A(K)
A(K) = A(I)
J = I
230 K = J - ID
IF( K .LT. 1 ) GO TO 240
IF( T .GT. A(K) ) GO TO 240
A(J) = A(K)
J = K
GO TO 230
240 A(J) = T
250 I = I + ID
IF( I + ID .LE. N ) GO TO 210
GO TO 130
END
!

@ -0,0 +1,122 @@
SUBROUTINE JLINE(ILIN,CVAL)
! Routine to join up points
USE BLKMAP
USE BLK1MOD
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
COMMON /CCGEN/ XCLIN(4000,2),YCLIN(4000,2),ALIN(-4000:4000,2),IUSED(4000)
VOID=-1.0E+10
DO K=1,MAXLIN
IF(LINTYP(K) .EQ. -999) THEN
NLIN=K-1
GO TO 100
ENDIF
ENDDO
NLIN=MAXLIN
100 CONTINUE
DO I=1,ILIN
IUSED(I)=0
ENDDO
! Loop through remaining poins
DO I=1,ILIN
IF(IUSED(I) .EQ. 0) THEN
! Set first points
IFW=2
IFB=1
IUSED(I)=1
ALIN(1,1)=XCLIN(I,1)
ALIN(1,2)=YCLIN(I,1)
ALIN(2,1)=XCLIN(I,2)
ALIN(2,2)=YCLIN(I,2)
! Look at remaining points for match
200 CONTINUE
DO J=I,ILIN
IF(IUSED(J) .EQ. 0) THEN
! First for forward points
IF(XCLIN(J,1) .EQ. ALIN(IFW,1) .AND. YCLIN(J,1) .EQ. ALIN(IFW,2)) THEN
IFW=IFW+1
ALIN(IFW,1)=XCLIN(J,2)
ALIN(IFW,2)=YCLIN(J,2)
IUSED(J)=1
ELSEIF(XCLIN(J,2) .EQ. ALIN(IFW,1) .AND. YCLIN(J,2) .EQ. ALIN(IFW,2)) THEN
IFW=IFW+1
ALIN(IFW,1)=XCLIN(J,1)
ALIN(IFW,2)=YCLIN(J,1)
IUSED(J)=1
ELSEIF(XCLIN(J,1) .EQ. ALIN(IFB,1) .AND. YCLIN(J,1) .EQ. ALIN(IFB,2)) THEN
IFB=IFB-1
ALIN(IFB,1)=XCLIN(J,2)
ALIN(IFB,2)=YCLIN(J,2)
IUSED(J)=1
ELSEIF(XCLIN(J,2) .EQ. ALIN(IFB,1) .AND. YCLIN(J,2) .EQ. ALIN(IFB,2)) THEN
IFB=IFB-1
ALIN(IFB,1)=XCLIN(J,1)
ALIN(IFB,2)=YCLIN(J,1)
IUSED(J)=1
ENDIF
IF(IUSED(J) .EQ. 1) GO TO 200
ENDIF
ENDDO
! No new points found line must be complete
! Check for loops
! First end points
250 CONTINUE
! IF((ALIN(IFB,1) .EQ. ALIN(IFW,1)) .AND. (ALIN(IFB,2) .EQ. ALIN(IFW,2))) THEN
! IFB=IFB+1
! IF(IFB .EQ. IFW) GO TO 300
! GO TO 250
! ENDIF
NLIN=NLIN+1
LINTYP(NLIN)=3
IF(IMP .EQ. 0) IMP=9
N=0
IF(MAXPTS .EQ. MAXPL) MAXPTS=0
IF(MAXPTS .GT. 0) THEN
MAXPTS=MAXPTS+1
CMAP(MAXPTS,1) = VOID
CMAP(MAXPTS,2) = VOID
XMAP(MAXPTS) = VOID
YMAP(MAXPTS) = VOID
! WRITE(198,'(I5,3F15.6)') MAXPTS,XMAP(MAXPTS),YMAP(MAXPTS),VAL(MAXPTS)
ENDIF
A1= VOID
A2= VOID
DO J=IFB,IFW
IF(ALIN(J,1) .EQ. A1 .AND. ALIN(J,2) .EQ. A2) GO TO 275
MAXPTS=MAXPTS+1
! Check for double points
XMAP(MAXPTS) = ALIN(J,1)
YMAP(MAXPTS) = ALIN(J,2)
VAL(MAXPTS) = CVAL
CMAP(MAXPTS,1)=(XMAP(MAXPTS)+XS)/TXSCAL
CMAP(MAXPTS,2)=(YMAP(MAXPTS)+YS)/TXSCAL
! WRITE(198,'(I5,3F15.6)') MAXPTS,XMAP(MAXPTS),YMAP(MAXPTS),VAL(MAXPTS)
275 CONTINUE
ENDDO
300 CONTINUE
ENDIF
! Copy values into contour line array
ENDDO
klint=nlin
RETURN
END

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

@ -0,0 +1,452 @@
!IPK LAST UPDATE SEP 23 2015 ADD OPTION FOR JOINING ELEMENTS
subroutine joinel
USE BLK1MOD
USE BLK2MOD
use blkmap
INTEGER LIST1(1000),LIST2(1000),idel(1000)
real xmapt(1000),ymapt(1000)
CHARACTER*1 IFLAG,ANSW(10)
CHARACTER*60 STRELS
DATA ANSW/' ',' ',' ',' ',' ',' ','n','z','r','q'/
DATA STRELS/' You have tried to join before executing "FILL"'/
!
!
! Test to make sure fill has been executed.
!
DO N=1,NE
IF(IMAT(N) .GT. 0) THEN
DO M=2,NCORN(N),2
!ipkoct93
if(imat(n) .LT. 900) THEN
IF(NOP(N,M) .EQ. 0) THEN
CALL SYMBL(0.,7.30,0.20,STRELS,0.,60)
RETURN
ENDIF
ENDIF
ENDDO
ENDIF
ENDDO
! Initiliaze list etc
NHTPSV=NHTP
NMESSSV=NMESS
NBRRSV=NBRR
! get starting elements
CALL KCON(0)
DO N=1,NE
DO M=1,8
NOPSV(N,M)=NOP(N,M)
ENDDO
IMATSV(N)=IMAT(N)
ENDDO
NESAV=NE
NEFSAV=NENTRY
NPUNDO=0
list1=0
list2=0
! SELECT FIRST ELEMENT
10 CONTINUE
CALL PANELTYP(NMTYP)
NHTP=0
NMESS=20
NBRR=8
CALL HEDR
CALL PROX(XC,YC,NE,XX,YY,NEL1,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
CALL fillem(NEL1)
!
IF(IFLAG .EQ. 'q') THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
CALL PROX(XC,YC,NE,XX,YY,NEL2,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
!
IF(IFLAG .EQ. 'q') THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
CALL fillem(NEL1)
CALL fillem(NEL2)
CALL PROX(XC,YC,NE,XX,YY,NEL3,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
!
IF(IFLAG .EQ. 'q') THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
CALL fillem(NEL1)
CALL fillem(NEL2)
CALL fillem(NEL3)
CALL PROX(XC,YC,NE,XX,YY,NEL4,IFLAG,IESKP,IBOX)
IF(IRMAIN .EQ. 1) THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
IF(IFLAG .EQ. 'c' .AND. IBOX .GT. 0) THEN
IFLAG=ANSW(IBOX)
ENDIF
!
IF(IFLAG .EQ. 'q') THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
CALL fillem(NEL1)
CALL fillem(NEL2)
CALL fillem(NEL3)
CALL fillem(NEL4)
! work on first pair
! get starting mid-side
ilc=0
call findbcel(nel1,nd1,nd2,nd3,ierr,ilc)
! save back node
list1(1)=nd1
write(90,*) '1',nd1
! get adjacent corner save corner
m=2
list1(m)=nd3
write(90,*) m,nd3
nelc=nel1
nelcsv=nel1
! start looop
do nss=1,1000
! find next element and get mid side
nadj=ndelm(nd3)
do kkk=1,nadj
nd3=list1(m)
nelc=nelcsv
if(necon(nd3,kkk) .ne. nelc) then
nelc=necon(nd3,kkk)
ilc=2
call findbcel(nelc,nd1,nd2,nd3,ierr,ilc)
if(ierr .eq. 0) go to 200
endif
enddo
200 continue
nelcsv=nelc
! get and save next corner
m=m+1
if(m .gt. 1000) THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
RETURN
ENDIF
list1(m)=nd3
write(90,*) m,nd3
! test for last element
if(nelc .eq. nel2) go to 250
enddo
250 continue
m1=m
! repeat for second pair
! get starting mid-side
ilc=1
call findbcel(nel3,nd1,nd2,nd3,ierr,ilc)
! save back node
list2(1)=nd1
write(90,*) m,nd1
! get adjacent corner save corner
m=2
list2(m)=nd3
write(90,*) m,nd3
nelc=nel3
nelcsv=nel3
! start looop
do nss=1,1000
! find next element and get mid side
nadj=ndelm(nd3)
do kkk=1,nadj
nd3=list2(m)
nelc=nelcsv
if(necon(nd3,kkk) .ne. nelc) then
nelc=necon(nd3,kkk)
ilc=2
if(nelc .eq. nel4) ilc=4
call findbcel(nelc,nd1,nd2,nd3,ierr,ilc)
if(ierr .eq. 0) go to 300
endif
enddo
300 continue
nelcsv=nelc
! get and save next corner
m=m+1
if(m .gt. 1000) THEN
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
ENDIF
list2(m)=nd3
write(90,*) m,nd3
! test for last element
if(nelc .eq. nel4) go to 350
enddo
350 continue
m2=m
! add points in triangle list
do j=1,m2
list1(m1+j)=list2(j)
enddo
nvert=m1+m2
do n=1,nvert
write(90,*) n,list1(n)
enddo
do j=1,nvert
xmap(j)=xusr(list1(j))
ymap(j)=yusr(list1(j))
xmapt(j)=xusr(list1(j))
ymapt(j)=yusr(list1(j))
imap(j)=1
val(j)=1.
enddo
! call for triangulation
CALL DELAUNAY(NVERT)
do n=1,nelts
if(nopel(n,1) .le. m1) then
if(nopel(n,2) .le. m1 .and. nopel(n,3) .le. m1) then
cycle
endif
else
if(nopel(n,2) .gt. m1 .and. nopel(n,3) .gt. m1) then
cycle
endif
500 continue
endif
! FORM A NEW ELEMENT ASSIGN TYPE AS INDICATED
CALL GETELM(J)
NOP(J,1)=list1(nopel(n,1))
NOP(J,3)=list1(nopel(n,2))
NOP(J,5)=list1(nopel(n,3))
NOP(J,2)=0
NOP(J,4)=0
NOP(J,6)=0
NOP(J,7)=0
NOP(J,8)=0
IMAT(J)=NMTYP
IESKP(J) = 0
NCORN(J)=6
enddo
CALL PLOTOT(1)
NHTP=NHTPSV
NMESS=NMESSSV
NBRR=NBRRSV
CALL HEDR
return
end
subroutine findbcel(nel,nd1,nd2,nd3,ierr,ilc)
use blk1mod
USE BLK2MOD
integer nel,nd1,nd2,nd3,mlc(5),ndkp
ndkp=nd3
ierr=0
kk=0
do k=2,ncorn(nel),2
nd2=nop(nel,k)
if(ndelm(nd2) .eq. 1) then
nd1=nop(nel,k-1)
if(nd1 .ne. ndkp .and. ilc .gt. 1) cycle
jj=mod(k,ncorn(nel))+1
nd3=nop(nel,jj)
if(ilc .eq. 4) return
if(ilc .gt. 0) then
kk=kk+1
mlc(kk)=k
cycle
else
! check for more than 1
kj=k+2
if(kj .gt. ncorn(nel)) kj=2
nd2a=nop(nel,kj)
if(ndelm(nd2a) .eq. 1) then
nd1=nop(nel,kj-1)
jj=mod(kj,ncorn(nel))+1
nd3=nop(nel,jj)
nd2=nd2a
endif
return
endif
endif
enddo
if(ilc .gt. 0) then
if(kk .eq. 1) then
if(nd1 .eq. ndkp) then
return
else
ierr=1
return
endif
elseif(kk .eq. 2) then
if(abs(mlc(2)-mlc(1)) .eq. 4) then
do kk=1,2
nd1=nop(nel,mlc(kk)-1)
if(nd1 .eq. ndkp) then
nd2=nop(nel,mlc(kk))
nd3=mod(mlc(kk),ncorn(nel))+1
nd3=nop(nel,nd3)
return
endif
enddo
endif
if(ilc .eq. 1) then
if(mlc(kk) .eq. ncorn(nel) .and. mlc(kk-1) .eq. 2) then
nd1=nop(nel,1)
nd2=nop(nel,2)
nd3=nop(nel,3)
else
return
endif
else
if(mlc(kk) .eq. ncorn(nel) .and. mlc(kk-1) .eq. 2) then
return
else
nd1=nop(nel,mlc(1)-1)
nd2=nop(nel,mlc(1))
nd3=nop(nel,mlc(1)+1)
endif
endif
elseif(kk .eq. 3) then
if(mlc(kk) .eq. ncorn(nel)) then
if(mlc(kk-1) .eq. ncorn(nel)-2) then
nd1=nop(nel,1)
nd2=nop(nel,2)
nd3=nop(nel,3)
elseif(mlc(kk-1) .eq. ncorn(nel)-4) then
nd1=nop(nel,3)
nd2=nop(nel,4)
nd3=nop(nel,5)
else
return
endif
else
return
endif
endif
! else
! return
endif
ierr=1
return
end
SUBROUTINE PANELTYP(N1)
! Choose options and intervals
use winteracter
implicit none
include 'D.inc'
INCLUDE 'BFILES.I90'
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
integer :: N1,itime,IERR
data itime/0/
if(itime .eq. 0) then
n1=1
itime=1
endif
call wdialogload(IDD_MATTYP)
ierr=infoerror(1)
CALL WDialogPutInteger(idf_integer1,N1)
CALL WDialogSelect(IDD_MATTYP)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(idf_integer1,N1)
ELSE
N1=1
RETURN
ENDIF
RETURN
END

@ -0,0 +1,69 @@
Subroutine LayDisp
USE WINTERACTER
USE BLK1MOD
!
include 'd.inc'
! INCLUDE 'BLK1.COM'
INCLUDE 'TXFRM.COM'
!IPK MAY02 COMMON /TXFRM/ XS, YS, TXSCAL
!
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
INTEGER :: INODE,IBOX,NN
INTEGER :: IERR
CHARACTER*1 :: IFLAG
DATA INODE/1/
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select node','CHOOSE NODE')
IBOX=1
CALL PROX(CORD(1,1),CORD(1,2),NP,XX,YY,INODE,IFLAG,INSKP,IBOX)
100 continue
call wdialogload(IDD_LAY)
ierr=infoerror(1)
IF(ILAYTP .EQ. 1) THEN
call wdialogputRadioButton(idf_radio1)
ELSE
call wdialogputRadioButton(idf_radio2)
ENDIF
lno=lay(INODE)
CALL WDialogPutINTEGER(IDF_INTEGER1,lno)
do i=1,7
CALL WGridPutCellReal(IDF_GRID1,i,1,wtlay(INODE,i))
enddo
CALL WDialogSelect(IDD_LAY)
ierr=infoerror(1)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
call wdialoggetradiobutton(idf_radio1,ilaytp)
CALL WDialogGetINTEGER(IDF_INTEGER1,lno)
lay(INODE)=lno
do i=1,7
CALL WGridGetCellReal(IDF_GRID1,i,1,wtlay(INODE,i))
enddo
return
ELSEIF (WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
RETURN
endif
!IPK SEP02
return
enddo
RETURN
END

@ -0,0 +1,50 @@
SUBROUTINE LEVSETTYP
USE WINTERACTER
USE BLK1MOD
include 'd.inc'
CHARACTER*47 MESSAGE
DATA ITIME/0/
IMATTYP=1
BLELVEL=0.
call wdialogload(IDD_LEVSETTYP)
ierr=infoerror(1)
CALL WDialogSelect(IDD_LEVSETTYP)
ierr=infoerror(1)
CALL WDialogPutReal(IDF_REAL1,BLEVEL)
CALL WDialogPutInteger(IDF_INTEGER1,IMATTYP)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
! Branch depending on type of message.
!
DO
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetInteger(IDF_INTEGER1,IMATTYP)
CALL WDialogGetReal(IDF_REAL1,BLEVEL)
GO TO 200
ELSEIF (WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
RETURN
ENDIF
ENDDO
200 CONTINUE
DO N=1,NE
IF(IMAT(N) .EQ. 99) CYCLE
DO K=1,NCORN(N)
IF(NOP(N,K) .EQ. 0) CYCLE
IF(WD(NOP(N,K)) .LT. BLEVEL) GO TO 300
ENDDO
IMAT(N)=IMATTYP
300 CONTINUE
ENDDO
RETURN
END

@ -0,0 +1,23 @@
SUBROUTINE LOADFIL
INCLUDE 'BFILES.I90'
IFILOUT=IACTVFIL+50
! Zero out current arrays
CALL ZEROOUT
IFNUM=IACTVFIL+50
WRITE(90,*) 'IN LOADFIL IFNUM',IFNUM
CALL RDRST(1,IFNUM)
CALL RDRST(2,IFNUM)
CALL RDRST(3,IFNUM)
REWIND IFNUM
CALL RESCAL
CALL HEDR
RETURN
END

@ -0,0 +1,99 @@
!IPK LAST UPDATE SEP 23 2015 ADD NEW FORMAT TO 6 DEC
Subroutine MMap
USE BLK1MOD
! INCLUDE 'BLK1.COM'
!
CALL OPENMP
CALL SVELEM(IYES)
rewind 99
! if IYES .eq. 1 save as an element format
valmap=0.
mapno=2
IF(IYES .EQ. 1) THEN
do n=1,ne
write(99,6001)
6001 format(' 3,9999.')
if(imat(n) .gt. 0) then
ncn=ncorn(n)
do m=1,ncn
j=nop(n,m)
if(j .gt. 0) then
write(99,'(3f16.3)') xusr(j),yusr(j),wd(j)
endif
enddo
j=nop(n,1)
if(j .gt. 0) then
write(99,'(3f16.3)') xusr(j),yusr(j),wd(j)
endif
endif
write(99,6000)
6000 format('END')
enddo
! if IYES .eq. 0 save as a nodal list
ELSE
write(99,6002)
6002 format(' 2,0')
do j=1,np
if(inew(j) .eq. 1) then
write(99,'(3f16.6)') xusr(j),yusr(j),wd(j)
endif
enddo
write(99,6000)
ENDIF
write(99,6000)
close (99)
return
end
subroutine openmp
use winteracter
implicit none
include 'd.inc'
CHARACTER(LEN=255) :: FNAME
CHARACTER(LEN=3) :: SUB
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
CALL WSelectFile(ID_STRING7,SaveDialog+PromptOn,FNAME,'Save Network as Mapfile')
IF (WInfoDialog(ExitButtonCommon).EQ.CommonOpen) THEN
SUB='map'
CALL ADDSUB(FNAME,SUB)
open(99,file=fname, form='formatted', status='unknown')
ENDIF
RETURN
END
SUBROUTINE SVELEM(IYES)
USE WINTERACTER
INCLUDE 'D.INC'
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to save element layout?'//&
CHAR(13)//' ','Map option')
!
! If answer 'No', return
!
iyes=1
IF (WInfoDialog(4).EQ.2) iyes=0
return
end

@ -0,0 +1,386 @@
SUBROUTINE MOVMESH
USE WINTERACTER
USE BLK1MOD
SAVE
! implicit none
include 'd.inc'
INCLUDE 'TXFRM.COM'
INCLUDE 'BFILES.I90'
CHARACTER*1 IFLAG
REAL xlocorg,ylocorg,xlocscl,ylocscl,XREFPT,YREFPT,xlocs,ylocs,xlocf,ylocf,stscalx,stscaly,xtest,ytest
INTEGER NTYPR,ITIMETHRU
allocatable xusrt(:),yusrt(:),xcrst(:),ycrst(:)
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
DATA ITIMTHRU/0/,NTYPR/1/,xlocorg/0./,ylocorg/0./,xlocscl/0./,ylocscl/0./
call wdialogload(IDD_DIALOG048)
ierr=infoerror(1)
CALL WDialogSelect(IDD_DIALOG048)
ierr=infoerror(1)
IF(NTYPR .EQ. 1) THEN
call wdialogputRadioButton(idf_radio1)
ELSE
call wdialogputRadioButton(idf_radio2)
ENDIF
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
!
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
call wdialoggetradiobutton(idf_radio1,ntypr)
go to 100
elseif(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
return
ENDIF
enddo
100 continue
IF(NTYPR .EQ. 1) THEN
call wdialogload(IDD_DIALOG047)
ierr=infoerror(1)
CALL WDialogSelect(IDD_DIALOG047)
ierr=infoerror(1)
CALL WDialogPutReal(IDF_REAL1,xlocorg)
CALL WDialogPutReal(IDF_REAL2,ylocorg)
CALL WDialogPutReal(IDF_REAL3,xlocscl)
CALL WDialogPutReal(IDF_REAL4,ylocscl)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetReal(IDF_REAL1,xlocorg)
CALL WDialogGetReal(IDF_REAL2,ylocorg)
CALL WDialogGetReal(IDF_REAL3,xlocscl)
CALL WDialoggetReal(IDF_REAL4,ylocscl)
allocate (xusrt(np),yusrt(np))
if(xlocscl .eq. 0.) then
do j=1,np
xusrt(j)=xusr(j)
yusrt(j)=yusr(j)
xusr(j)=xusr(j)+xlocorg
yusr(j)=yusr(j)+ylocorg
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
enddo
if(ncrsec .gt. 0) then
allocate (xcrst(nrsec),ycrst(nrsec))
do j=1,ncrsec
xcrst(j)=xcrs(j)
ycrst(j)=ycrs(j)
xcrs(j)=xcrs(j)+xlocorg
ycrs(j)=ycrs(j)+ylocorg
enddo
endif
else
do j=1,np
xusr(j)=(xusr(j)-xlocorg)*xlocscl
yusr(j)=(yusr(j)-ylocorg)*ylocscl
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
enddo
if(ncrsec .gt. 0) then
allocate (xcrst(nrsec),ycrst(nrsec))
do j=1,ncrsec
xcrst(j)=xcrs(j)
ycrst(j)=ycrs(j)
xcrs(j)=(xcrs(j)-xlocorg)*xlocscl
ycrs(j)=(ycrs(j)-ylocorg)*ylocscl
enddo
endif
endif
go to 300
elseif(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
return
endif
enddo
else
! get reference point
! xrefpt
! yrefpt
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select Fixed Reference point','CHOOSE REFERENCE')
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
XREFPT = XTEMP*TXSCAL - XS
YREFPT = YTEMP*TXSCAL - YS
! get start move point
! xlocs
! ylocs
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select Starting point','CHOOSE START')
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
XLOCS = XTEMP*TXSCAL - XS
YLOCS = YTEMP*TXSCAL - YS
! get finish move point
! xlocf
! ylocf
CALL WMessageBox(OKOnly,ExclamationIcon,CommonOK,'Select Finishing point','CHOOSE FINISH')
CALL XYLOC(XTEMP,YTEMP,IFLAG,IBOX)
XLOCF = XTEMP*TXSCAL - XS
YLOCF = YTEMP*TXSCAL - YS
! establish x moves
stscalx=(xlocf-xrefpt)/(xlocs-xrefpt)
! establish y moves
stscaly=(ylocf-yrefpt)/(ylocs-yrefpt)
allocate (xusrt(np),yusrt(np))
do j=1,np
xusrt(j)=xusr(j)
yusrt(j)=yusr(j)
xusr(j)=xrefpt-(xrefpt-xusr(j))*stscalx
yusr(j)=yrefpt-(yrefpt-yusr(j))*stscaly
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
enddo
if(ncrsec .gt. 0) then
allocate (xcrst(nrsec),ycrst(nrsec))
do j=1,ncrsec
xcrst(j)=xcrs(j)
ycrst(j)=ycrs(j)
xcrs(j)=xrefpt-(xrefpt-xcrs(j))*stscalx
ycrs(j)=yrefpt-(yrefpt-ycrs(j))*stscaly
enddo
endif
endif
300 continue
CALL CLSCRN
CALL PLOTOT(1)
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to keep '//&
CHAR(13)//' ','new locations?')
!
! If answer 'No', reset
!
IF (WInfoDialog(4).EQ.2) then
do j=1,np
xusr(j)=xusrt(j)
yusr(j)=yusrt(j)
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
enddo
if(ncrsec .gt. 0) then
do j=1,ncrsec
xcrs(j)=xcrst(j)
ycrs(j)=ycrst(j)
enddo
deallocate (xcrst,ycrst)
endif
CALL CLSCRN
CALL PLOTOT(1)
endif
deallocate(xusrt,yusrt)
RETURN
END
SUBROUTINE TRANSMESH
USE WINTERACTER
USE BLK1MOD
SAVE
! implicit none
include 'd.inc'
INCLUDE 'TXFRM.COM'
INCLUDE 'BFILES.I90'
CHARACTER*1 IFLAG
allocatable xusrt(:),yusrt(:),xcrst(:),ycrst(:)
data iopt1/1/
!
! Declare window-type and message variables
!
TYPE(WIN_STYLE) :: WINDOW
TYPE(WIN_MESSAGE) :: MESSAGE
call wdialogload(IDD_TRANSFORM)
ierr=infoerror(1)
CALL WDialogSelect(IDD_TRANSFORM)
ierr=infoerror(1)
CALL WDialogPutINTEGER(IDF_INTEGER1,IOPT1)
CALL WDialogPutReal(IDF_REAL3,COEF1)
CALL WDialogPutReal(IDF_REAL4,COEF2)
CALL WDialogPutReal(IDF_REAL5,COEF3)
CALL WDialogPutReal(IDF_REAL6,COEF4)
CALL WDialogPutReal(IDF_REAL7,COEF5)
CALL WDialogPutReal(IDF_REAL8,COEF6)
CALL WDialogPutINTEGER(IDF_INTEGER2,ICOEF1)
CALL WDialogPutINTEGER(IDF_INTEGER3,ICOEF2)
CALL WDialogPutINTEGER(IDF_INTEGER4,ICOEF3)
CALL WDialogPutINTEGER(IDF_INTEGER5,ICOEF4)
CALL WDialogPutINTEGER(IDF_INTEGER9,ICOEF5)
CALL WDialogPutINTEGER(IDF_INTEGER10,ICOEF6)
CALL WDialogShow(-1,-1,0,Modal)
ierr=infoerror(1)
do
IF (WInfoDialog(ExitButton) .EQ. IDOK) THEN
CALL WDialogGetINTEGER(IDF_INTEGER1,IOPT1)
CALL WDialogGetReal(IDF_REAL3,COEF1)
CALL WDialogGetReal(IDF_REAL4,COEF2)
CALL WDialogGetReal(IDF_REAL5,COEF3)
CALL WDialoggetReal(IDF_REAL6,COEF4)
CALL WDialoggetReal(IDF_REAL7,COEF5)
CALL WDialoggetReal(IDF_REAL8,COEF6)
CALL WDialogGetINTEGER(IDF_INTEGER2,ICOEF1)
CALL WDialogGetINTEGER(IDF_INTEGER3,ICOEF2)
CALL WDialogGetINTEGER(IDF_INTEGER4,ICOEF3)
CALL WDialogGetINTEGER(IDF_INTEGER5,ICOEF4)
CALL WDialogGetINTEGER(IDF_INTEGER9,ICOEF5)
CALL WDialogGetINTEGER(IDF_INTEGER10,ICOEF6)
go to 200
elseif(WInfoDialog(ExitButton) .EQ. IDCANCEL) THEN
return
ENDIF
enddo
200 continue
if(.not. allocated(xusrt)) then
allocate (xusrt(np),yusrt(np))
do j=1,np
xusrt(j)=xusr(j)
yusrt(j)=yusr(j)
enddo
if(ncrsec .gt. 0) then
allocate (xcrst(nrsec),ycrst(nrsec))
do j=1,ncrsec
xcrst(j)=xcrs(j)
ycrst(j)=ycrs(j)
enddo
endif
endif
IF(IOPT1 .EQ. 1) THEN
DO J=1,NP
XUSR(J)=COEF1*XUSR(J)+COEF2
YUSR(J)=COEF3*YUSR(J)+COEF4
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
IF(COEF5 .EQ. 0. .AND. COEF6 .EQ. 0.) CYCLE
WD(J)=COEF5*WD(J)+COEF6
ENDDO
if(ncrsec .gt. 0) then
do j=1,ncrsec
xcrs(j)=coef1*XCRS(J)+COEF2
ycrs(j)=coef3*YCRS(J)+COEF4
enddo
endif
ELSE IF(IOPT1 .EQ. 2) THEN
do j=1,np
reff=coef3
angl=(xusr(j)-coef1)/reff
a=cos(angl)
a=reff*cos(angl)
b=reff*sin(angl)
xusr(j)=reff*sin(angl)-(yusr(j)-coef2)*sin(angl)
yusr(j)=(yusr(j)-coef2)*cos(angl)+reff*(1.-cos(angl))
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
enddo
if(ncrsec .gt. 0) then
do j=1,ncrsec
reff=coef3+coef2-ycrs(j)
ang=(xcrs(j)-coef1)/reff
xcrs(j)=coef1+reff*sin(angl)
ycrs(j)=coef2+reff*cos(angl)
enddo
endif
ELSEIF(IOPT1 .EQ. 3) THEN
DO J=1,NP
A=(XUSR(J)-COEF1)*COS(COEF3)-(YUSR(J)-COEF2)*SIN(COEF3)
B=(XUSR(J)-COEF1)*SIN(COEF3)+(YUSR(J)-COEF2)*COS(COEF3)
XUSR(J)=A
YUSR(J)=B
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
ENDDO
if(ncrsec .gt. 0) then
do j=1,ncrsec
A=(XCRS(J)-COEF1)*COS(COEF3)-(YCRS(J)-COEF2)*SIN(COEF3)
B=(XCRS(J)-COEF1)*SIN(COEF3)+(YCRS(J)-COEF2)*COS(COEF3)
xcrs(j)=A
ycrs(j)=B
enddo
endif
ENDIF
CALL CLSCRN
CALL PLOTOT(1)
CALL WMessageBox(YesNo,QuestionIcon,CommonOK,'Do you wish to keep '//&
CHAR(13)//' ','new locations?')
!
! If answer 'No', reset
!
IF (WInfoDialog(4).EQ.2) then
do j=1,np
xusr(j)=xusrt(j)
yusr(j)=yusrt(j)
CORD(J,1)=(XUSR(J)+XS)/TXSCAL
CORD(J,2)=(YUSR(J)+YS)/TXSCAL
enddo
deallocate (Xusrt,yusrt)
if(ncrsec .gt. 0) then
do j=1,ncrsec
xcrs(j)=xcrst(j)
ycrs(j)=ycrst(j)
enddo
deallocate (xcrst,ycrst)
endif
CALL CLSCRN
CALL PLOTOT(1)
endif
RETURN
END

@ -0,0 +1,44 @@
SUBROUTINE NDNECON(IERR)
!
! ESTABLISH ELEMENT CONNECTED TO ELEMENT TABLE
!
USE BLK1MOD
USE BLK2MOD
! INCLUDE 'BLK1.COM'
! INCLUDE 'BLK2.COM'
!
! INITIALIZE
!
ISWT=IERR
NCM=MAXECON
DO J=1,NCM
DO N=1,NP
NECON(N,J)=0
ENDDO
ENDDO
DO N=1,NP
NDELM(N)=0
ENDDO
!
! FORM TABLE OF ELEMENTS CONNECTED TO EACH NODE
!
! IERR=0
DO M=1,NE
IF(IMAT(M) .NE. 0) THEN
DO K=1,8
IF(ISWT .EQ. 1 .AND. MOD(K,2) .EQ. 1) CYCLE
N=NOP(M,K)
IF (N .GT. 0) THEN
NDELM(N)=NDELM(N)+1
J=NDELM(N)
IF(J .GT. MAXECON) THEN
IERR=MAX(IERR,J)
ELSE
NECON(N,J)=M
ENDIF
ENDIF
ENDDO
ENDIF
END DO
RETURN
END

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save