| 1 |
C Copyright(C) 1999-2020, 2022, 2025 National Technology & Engineering Solutions |
| 2 |
C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
C NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
C |
| 5 |
C See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
c======================================================================= |
| 8 |
PROGRAM BLOTII |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C *** BLOT *** |
| 12 |
|
| 13 |
C --*** BLOT *** (BLOT) Post-processing plot program |
| 14 |
C -- |
| 15 |
C --BLOT is a graphics program for post-processing of finite element |
| 16 |
C --analyses output in the EXODUS II database format. BLOT combines the |
| 17 |
C --plotting capabilities of DETOUR, TPLOT, and SPLOT. It is command |
| 18 |
C --driven with free-format input. BLOT can drive any graphics device |
| 19 |
C --supported by the Sandia Virtual Device Interface. |
| 20 |
C -- |
| 21 |
C --DETOUR produces mesh plots with various representations of the |
| 22 |
C --analysis output variables. The major capabilities of DETOUR are |
| 23 |
C --deformed mesh plots, line contours, filled (painted) contours, |
| 24 |
C --vector plots of two variables (e.g., velocity vectors), and symbol |
| 25 |
C --plots of scalar variables (e.g., discrete cracks). DETOURs features |
| 26 |
C --include element selection by element block, element birth and death, |
| 27 |
C --multiple views for combining several displays on each plot, and |
| 28 |
C --symmetry mirroring. |
| 29 |
C -- |
| 30 |
C --TPLOT generates time-versus-variable plots or variable-versus-variable |
| 31 |
C --plots where the variables are user-selected global, nodal or element |
| 32 |
C --EXODUS database variables. TPLOTs features include multiple curve |
| 33 |
C --plots and neutral file output. |
| 34 |
C -- |
| 35 |
C --SPLOT generates distance-versus-variable plots at selected time steps |
| 36 |
C --where the distance is the accumulated distance between pairs of nodes |
| 37 |
C --or element centers and the variable is a nodal or element EXODUS |
| 38 |
C --database variable. SPLOTs features include multiple curve plots |
| 39 |
C --and neutral file output. |
| 40 |
C -- |
| 41 |
C --Plot times from the database are processed in one of the following modes: |
| 42 |
C -- Uniform time interval - plot at every DELT time interval from |
| 43 |
C -- TMIN to TMAX. |
| 44 |
C -- All available times - plot at all available times from TMIN |
| 45 |
C -- to TMAX. |
| 46 |
C -- User selected times - plot at user selected times. |
| 47 |
C --The closest available time step is chosen. |
| 48 |
C -- |
| 49 |
C --Expected input: |
| 50 |
C -- o The commands on the standard input device. |
| 51 |
C -- o The input EXODUS database on unit 11. |
| 52 |
C -- |
| 53 |
C --Output: |
| 54 |
C -- o A listing of the input database information and any errors |
| 55 |
C -- found on the standard output device. |
| 56 |
C -- o The plots on the specified graphics device. |
| 57 |
C -- o A GRAFAID neutral file on unit 20. |
| 58 |
C -- o A EXPLORE listing file on unit 21. |
| 59 |
|
| 60 |
C --Developed at Sandia National Laboratories. |
| 61 |
C -- |
| 62 |
C --Current author and code sponsor: John Glick |
| 63 |
C -- |
| 64 |
C --Revision History: |
| 65 |
C -- 05/88 Added PATHLINE (Amy Gilkey) |
| 66 |
C -- 10/87 Added EXPLORE (Amy Gilkey) |
| 67 |
C -- 10/87 Converted from SEACO to EXODUS database (Amy Gilkey) |
| 68 |
C -- 07/87 Combined DETOUR, TPLOT, and SPLOT (Amy Gilkey) |
| 69 |
C --DETOUR: |
| 70 |
C -- 05/86 Started to add 3D (Amy Gilkey) |
| 71 |
C -- 03/85 New sponsor (Amy Gilkey) |
| 72 |
C -- 11/82 Created (Dennis Flanagan) |
| 73 |
C --TPLOT: |
| 74 |
C -- xx/xx Neutral file code (Greg Sjaardema) |
| 75 |
C -- 01/86 New sponsor (Amy Gilkey) |
| 76 |
C -- xx/xx Modified for the VAX11/780 (Johnny Biffle) |
| 77 |
C -- 08/80 Created (Zelma Beisinger) |
| 78 |
C --SPLOT: |
| 79 |
C -- xx/xx Neutral file code (Greg Sjaardema) |
| 80 |
C -- 01/86 New sponsor (Amy Gilkey) |
| 81 |
C -- xx/xx Created (Mary Sagartz) |
| 82 |
C -- |
| 83 |
C --Source is in FORTRAN 77 |
| 84 |
C -- |
| 85 |
C --External software used: |
| 86 |
C -- SVDI graphics package |
| 87 |
C -- PLT graphics package |
| 88 |
C -- SUPES package (dynamic memory, free-field reader, FORTRAN extensions) |
| 89 |
C -- |
| 90 |
C --Runs on VAX VMS, sun, Unicos, Ultrix |
| 91 |
C -- |
| 92 |
C --Documentation: SAND86-0914, printed July 1987 f |
| 93 |
C -- "DETOUR - A Deformed Mesh / Contour Plot Program" |
| 94 |
C --Documentation: SAND86-0883, printed August 1986 |
| 95 |
C -- "TPLOT - A Time History or X-Y Plot Program for the Output |
| 96 |
C -- of a Finite Element Analysis" |
| 97 |
C --Documentation: SAND86-0882, printed August 1986 |
| 98 |
C -- "SPLOT - A Distances-versus-Variable Plot Program for the Output |
| 99 |
C -- of a Finite Element Analysis" |
| 100 |
|
| 101 |
C --NOTE: All parameters and common areas are defined in BLKDAT |
| 102 |
|
| 103 |
include 'exodusII.inc' |
| 104 |
|
| 105 |
C --These parameters define the indices of 2D and 3D limit arrays |
| 106 |
PARAMETER (KLFT=1, KRGT=2, KBOT=3, KTOP=4, KNEA=5, KFAR=6) |
| 107 |
|
| 108 |
C --These parameters define the mesh display (see MSHLIN of /MSHOPT/) |
| 109 |
PARAMETER (MSHNON=0, MSHBOR=1, MSHDIV=2, MSHSEL=3, MSHALL=4) |
| 110 |
|
| 111 |
PARAMETER (MXQARC=MXSTLN) |
| 112 |
include 'progqa.blk' |
| 113 |
include 'dbase.blk' |
| 114 |
include 'dbname.blk' |
| 115 |
include 'dbtitl.blk' |
| 116 |
include 'dbnums.blk' |
| 117 |
include 'dbnumgq.blk' |
| 118 |
include 'd3nums.blk' |
| 119 |
include 'dbnams.blk' |
| 120 |
include 'times.blk' |
| 121 |
include 'layout.blk' |
| 122 |
include 'deform.blk' |
| 123 |
include 'mshlim.blk' |
| 124 |
|
| 125 |
include 'selne.blk' |
| 126 |
include 'neutr.blk' |
| 127 |
include 'csv.blk' |
| 128 |
include 'outfil.blk' |
| 129 |
include 'sizes.blk' |
| 130 |
|
| 131 |
include 'light.blk' |
| 132 |
include 'icrnbw.blk' |
| 133 |
include 'legopt.blk' |
| 134 |
|
| 135 |
include 'argparse.inc' |
| 136 |
|
| 137 |
common /debugc/ cdebug |
| 138 |
common /debugn/ idebug |
| 139 |
character*8 cdebug |
| 140 |
|
| 141 |
C ... Used for hardcopy device drivers... |
| 142 |
common /blotans/ BLTANS |
| 143 |
character*2 BLTANS |
| 144 |
|
| 145 |
DIMENSION A(1),IA(1) |
| 146 |
EQUIVALENCE (A(1),IA(1)) |
| 147 |
CHARACTER*1 C(1) |
| 148 |
C --A - the dynamic memory base array |
| 149 |
|
| 150 |
character*2048 scratch, value |
| 151 |
character*256 option |
| 152 |
|
| 153 |
LOGICAL MESHOK, DTOK, LNOK, SPOK, TPOK |
| 154 |
LOGICAL MAPND, MAPEL |
| 155 |
CHARACTER*(MXSTLN) CURPRO |
| 156 |
INTEGER NEWELB |
| 157 |
CHARACTER NEWPRO |
| 158 |
|
| 159 |
INTEGER IDUM |
| 160 |
REAL RDUM |
| 161 |
CHARACTER*8 CDUM |
| 162 |
C external sample_handler |
| 163 |
EXTERNAL TPREAD |
| 164 |
EXTERNAL BLKDAT |
| 165 |
|
| 166 |
C --The compute word size and I/O word size |
| 167 |
INTEGER CMPSIZ, IOWS |
| 168 |
|
| 169 |
C ... Initialize Rainbow and Light (ICRNBW and LIGHT common blocks) |
| 170 |
C Block Data doesn't seem to work reliably on all systems |
| 171 |
|
| 172 |
C ... Lights are stored as x, y, z, brightness, Vector is normalized in |
| 173 |
C shade.f. NLIT is the number of lights. |
| 174 |
RMULT = 1.0 |
| 175 |
GMULT = 1.0 |
| 176 |
BMULT = 1.0 |
| 177 |
LITE(1,1) = -1.0 |
| 178 |
LITE(2,1) = 1.0 |
| 179 |
LITE(3,1) = 1.0 |
| 180 |
LITE(4,1) = 1.0 |
| 181 |
LITE(5,1) = -0.57735 |
| 182 |
LITE(6,1) = 0.57735 |
| 183 |
LITE(7,1) = 0.57735 |
| 184 |
LITE(8,1) = 1.0 |
| 185 |
NLIT = 1 |
| 186 |
AMBIENT = 0.2 |
| 187 |
|
| 188 |
cdebug = ' ' |
| 189 |
idebug = 0 |
| 190 |
CMPSIZ = 0 |
| 191 |
IOWS = 0 |
| 192 |
NEUTRL = 0 |
| 193 |
|
| 194 |
NDB = 11 |
| 195 |
NEU = 20 |
| 196 |
NEUOPN = .FALSE. |
| 197 |
NEUGRF = 22 |
| 198 |
GRFOPN = .FALSE. |
| 199 |
NCSV = 23 |
| 200 |
CSVOPN = .FALSE. |
| 201 |
call version(qainfo) |
| 202 |
|
| 203 |
C Initialize variables |
| 204 |
VERS = 0.0 |
| 205 |
IDUM = 0 |
| 206 |
|
| 207 |
CALL STRTUP (QAINFO) |
| 208 |
|
| 209 |
draw(1) = ' ' |
| 210 |
draw(2) = ' ' |
| 211 |
draw(3) = ' ' |
| 212 |
draw(4) = ' ' |
| 213 |
DRAW(1) = QAINFO(1) |
| 214 |
DRAW(2) = ' ' // QAINFO(3)(3:8) |
| 215 |
DRAW(3)(1:8) = QAINFO(5)(1:8) |
| 216 |
DRAW(4)(1:8) = QAINFO(6)(1:8) |
| 217 |
|
| 218 |
WRITE (*, 10020) |
| 219 |
CALL BANNER (0, QAINFO, |
| 220 |
& 'A DEFORMED MESH / CONTOUR PLOT PROGRAM', |
| 221 |
& 'WITH X-Y PLOTTING CAPABILITIES', |
| 222 |
& 'FOR POST-PROCESSING OF FINITE ELEMENT ANALYSES' |
| 223 |
& ) |
| 224 |
CALL CPYRGT(0, '2009') |
| 225 |
|
| 226 |
C --Initialize dynamic memory |
| 227 |
|
| 228 |
CALL MDINIT (A) |
| 229 |
CALL MCINIT (C) |
| 230 |
CALL MDFILL (-999) |
| 231 |
CALL MCFILL ('Z') |
| 232 |
CALL MDSTAT (NERR, MEM) |
| 233 |
IF (NERR .GT. 0) GOTO 160 |
| 234 |
|
| 235 |
C --Open database file |
| 236 |
|
| 237 |
NARG = argument_count() |
| 238 |
if (narg .eq. 0) then |
| 239 |
CALL PRTERR ('FATAL', 'Filename not specified.') |
| 240 |
CALL PRTERR ('CMDSPEC', |
| 241 |
* 'Syntax is: "blot.dev [-basename basename] [-ps_option num]'// |
| 242 |
* ' [-change_set cs_#] [-nomap node|element|all]'// |
| 243 |
$ ' [-show_filename] filename"') |
| 244 |
CALL PRTERR ('CMDSPEC', |
| 245 |
* 'Documentation: https://sandialabs.github.io' // |
| 246 |
$ '/seacas-docs/sphinx/html/index.html#blot') |
| 247 |
GOTO 190 |
| 248 |
end if |
| 249 |
|
| 250 |
CALL get_argument(narg,dbname, lfil) |
| 251 |
dbname(lfil+1:) = ' ' |
| 252 |
ndb = exopen(dbname(:lfil), EXREAD, CMPSIZ, IOWS, vers, ierr) |
| 253 |
IF (IERR .NE. 0) THEN |
| 254 |
SCRATCH = 'Database "'//dbname(:lfil)//'" does not exist.' |
| 255 |
CALL PRTERR ('FATAL', SCRATCH(:LENSTR(SCRATCH))) |
| 256 |
CALL PRTERR ('CMDSPEC', |
| 257 |
* 'Syntax is: "blot.dev [-basename basename] [-ps_option num]'// |
| 258 |
* ' [-change_set cs_#] [-nomap node|element|all]'// |
| 259 |
$ ' [-show_filename] filename"') |
| 260 |
CALL PRTERR ('CMDSPEC', |
| 261 |
* 'Documentation: https://sandialabs.github.io' // |
| 262 |
$ '/seacas-docs/sphinx/html/index.html#blot') |
| 263 |
GOTO 170 |
| 264 |
END IF |
| 265 |
EXODUS = .FALSE. |
| 266 |
|
| 267 |
CALL INISTR (3, ' ', CAPTN(1,1)) |
| 268 |
CALL INISTR (3, ' ', CAPTN(1,2)) |
| 269 |
call exinq(ndb, EXDBMXUSNM, namlen, rdum, cdum, ierr) |
| 270 |
call exmxnm(ndb, namlen, ierr) |
| 271 |
|
| 272 |
C ... Get basename of the database file to use for csv, neu and other output files |
| 273 |
C Assume first that the basename is from the database name. It may be replaced |
| 274 |
C later if the user added a -hardcopy or -basename argument. |
| 275 |
last = indexr(dbname(:lfil), '.') |
| 276 |
if (last .gt. 2) then |
| 277 |
basenam = dbname(:last-1) |
| 278 |
else |
| 279 |
basenam = dbname |
| 280 |
end if |
| 281 |
|
| 282 |
C ... Now see if a command-line option overrides this. |
| 283 |
C Options should all be of the form "-option arg" |
| 284 |
bltans = '7' |
| 285 |
|
| 286 |
C ... By default, map both nodes and elements |
| 287 |
mapel = .true. |
| 288 |
mapnd = .true. |
| 289 |
|
| 290 |
if (narg .gt. 1) then |
| 291 |
i = 1 |
| 292 |
do |
| 293 |
CALL get_argument(i,option, lo) |
| 294 |
i = i + 1 |
| 295 |
if (option(:lo) .eq. '--show_filename' .or. |
| 296 |
* option(:lo) .eq. '-show_filename') then |
| 297 |
captn(3,1) = dbname(:lfil) |
| 298 |
captn(3,2) = dbname(:lfil) |
| 299 |
|
| 300 |
else if (option(:lo) .eq. '-hardcopy' .or. |
| 301 |
* option(:lo) .eq. '--hardcopy' .or. |
| 302 |
* option(:lo) .eq. '-basename' .or. |
| 303 |
* option(:lo) .eq. '--basename') then |
| 304 |
CALL get_argument(i,value, lv) |
| 305 |
i = i + 1 |
| 306 |
basenam = value(:lv) |
| 307 |
|
| 308 |
else if (option(:lo) .eq. '-ps_option' .or. |
| 309 |
* option(:lo) .eq. '--ps_option') then |
| 310 |
CALL get_argument(i,value, lv) |
| 311 |
i = i + 1 |
| 312 |
if (lv .le. 2) then |
| 313 |
bltans = value(:lv) |
| 314 |
end if |
| 315 |
|
| 316 |
else if (option(:lo) .eq. '-nomap' .or. |
| 317 |
* option(:lo) .eq. '--nomap') then |
| 318 |
CALL get_argument(i,value, lv) |
| 319 |
i = i + 1 |
| 320 |
if (value(1:1) .eq. 'n' .or. value(1:1) .eq. 'N') |
| 321 |
* mapnd = .false. |
| 322 |
if (value(1:1) .eq. 'e' .or. value(1:1) .eq. 'E') |
| 323 |
* mapel = .false. |
| 324 |
if (value(1:1) .eq. 'a' .or. value(1:1) .eq. 'A') then |
| 325 |
mapnd = .false. |
| 326 |
mapel = .false. |
| 327 |
end if |
| 328 |
else if (option(:lo) .eq. '-change_set' .or. |
| 329 |
* option(:lo) .eq. '--change_set') then |
| 330 |
C ... Convert `value` to an integer. |
| 331 |
CALL get_argument(i,value, lv) |
| 332 |
i = i + 1 |
| 333 |
read (value(:lv), '(i10)') nchange |
| 334 |
C ... Check that file contains at least that many change sets... |
| 335 |
ndbr = iand(ndb, EX_FILE_ID_MASK) |
| 336 |
call exinq(ndbr, EX_INQ_NUM_CHILD_GROUPS, |
| 337 |
$ idum, rdum, cdum, ierr) |
| 338 |
if (nchange .gt. idum) then |
| 339 |
write (SCRATCH,*) 'Selected change set', nchange, |
| 340 |
$ 'but there are only ', idum, ' change sets in file.' |
| 341 |
call sqzstr(scratch, lscratch) |
| 342 |
call PRTERR('CMDERR', SCRATCH(:LSCRATCH)) |
| 343 |
goto 170 |
| 344 |
else |
| 345 |
write (scratch,99) nchange |
| 346 |
99 format(1x,'NOTE: Selecting change set ', i3) |
| 347 |
call sqzstr(scratch, lscratch) |
| 348 |
call PRTERR('CMDSPEC', scratch(:lscratch)) |
| 349 |
ndb = ndbr + nchange |
| 350 |
end if |
| 351 |
end if |
| 352 |
if (i .gt. narg) exit |
| 353 |
end do |
| 354 |
end if |
| 355 |
|
| 356 |
C --Set error reporting level |
| 357 |
CALL EXOPTS(EXABRT,IERR) |
| 358 |
|
| 359 |
C --Initialize graphics |
| 360 |
CALL GRINIT (DBORD0, CHLSIZ) |
| 361 |
|
| 362 |
C --Read and print database header |
| 363 |
|
| 364 |
call exgini(ndb, title, |
| 365 |
* ndim, numnp, numel, nelblk, |
| 366 |
* numnps, numess, ierr) |
| 367 |
if (numnps .gt. 0) then |
| 368 |
call exinq(ndb, EXNSNL, lnpsnl, rdum, cdum, ierr) |
| 369 |
call exinq(ndb, EXNSDF, lnpsdf, rdum, cdum, ierr) |
| 370 |
else |
| 371 |
lnpsnl = 0 |
| 372 |
lnpsdf = 0 |
| 373 |
end if |
| 374 |
if (numess .gt. 0) then |
| 375 |
call exinq(ndb, EXSSNL, lessnl, rdum, cdum, ierr) |
| 376 |
call exinq(ndb, EXSSEL, lessel, rdum, cdum, ierr) |
| 377 |
call exinq(ndb, EXSSDF, lessdf, rdum, cdum, ierr) |
| 378 |
else |
| 379 |
lessnl = 0 |
| 380 |
lessel = 0 |
| 381 |
lessdf = 0 |
| 382 |
end if |
| 383 |
|
| 384 |
NUMNPF = NUMNP |
| 385 |
|
| 386 |
CALL PRINIT ('NTIS', -1, NDB, DBNAME, TITLE, |
| 387 |
& NDIM, NUMNP, NUMEL, NELBLK, |
| 388 |
& NUMNPS, LNPSNL, LNPSDF, NUMESS, LESSEL, LESSNL, |
| 389 |
& NVARGL, NVARNP, NVAREL, NVARNS, NVARSS) |
| 390 |
|
| 391 |
C --Check whether mesh may be plotted |
| 392 |
|
| 393 |
CALL MSCHK (.FALSE., MESHOK) |
| 394 |
IF (.NOT. MESHOK) |
| 395 |
& CALL PRTERR ('WARNING', 'No mesh is defined') |
| 396 |
|
| 397 |
IS3DIM = (NDIM .GE. 3) |
| 398 |
|
| 399 |
C --Read coordinates (full set) |
| 400 |
|
| 401 |
C --SCALER uses MDFIND to find XN, YN, ZN |
| 402 |
CALL MDGET (NDIM * NUMNP) |
| 403 |
CALL MDRSRV ('XN', KXN, NUMNP) |
| 404 |
CALL MDRSRV ('YN', KYN, NUMNP) |
| 405 |
IF (IS3DIM) THEN |
| 406 |
CALL MDRSRV ('ZN', KZN, NUMNP) |
| 407 |
ELSE |
| 408 |
KZN = 1 |
| 409 |
END IF |
| 410 |
CALL MDSTAT (NERR, MEM) |
| 411 |
IF (NERR .GT. 0) GOTO 160 |
| 412 |
|
| 413 |
call exgcor(ndb, a(kxn), a(kyn), a(kzn), ierr) |
| 414 |
|
| 415 |
C Element Block IDs |
| 416 |
CALL MDRSRV ('IDELB', KIDELB, NELBLK) |
| 417 |
C Element Block IDs of HEXSHELL element blocks |
| 418 |
CALL MDRSRV ('HEXID', KHEXID, NELBLK) |
| 419 |
C Element Block types |
| 420 |
CALL MCRSRV ('NAMELB', KNMLB, NELBLK * MXSTLN) |
| 421 |
|
| 422 |
C Element Block names |
| 423 |
CALL MCRSRV ('EBNAME', KNMEB, NELBLK * NAMLEN) |
| 424 |
CALL MDSTAT (NERR, MEM) |
| 425 |
IF (NERR .GT. 0) GOTO 160 |
| 426 |
|
| 427 |
CALL EXGEBI (NDB, IA(KIDELB), IERR) |
| 428 |
if (nelblk .gt. 0) then |
| 429 |
CALL MDLONG ('IDELB', KIDELB, NELBLK) |
| 430 |
CALL MCLONG ('NAMELB', KNMLB, NELBLK * MXSTLN) |
| 431 |
CALL MCLONG ('EBNAME', KNMEB, NELBLK * NAMLEN) |
| 432 |
end if |
| 433 |
C Number of elements in element block |
| 434 |
CALL MDRSRV ('NUMELB', KNELB, NELBLK) |
| 435 |
C Number of nodes per elements in element block |
| 436 |
CALL MDRSRV ('NUMLNK', KNLNKE, NELBLK) |
| 437 |
C Number of attributes in element block |
| 438 |
CALL MDRSRV ('NUMATR', KNATR, NELBLK) |
| 439 |
C Connectivity array |
| 440 |
CALL MDRSRV ('LINK', KLINKE, 0) |
| 441 |
C Connectivity pointer array |
| 442 |
CALL MDRSRV ('LPTR', KLPTR, NELBLK) |
| 443 |
C Attribute array |
| 444 |
CALL MDRSRV ('ATRIB', KATRIB, 0) |
| 445 |
CALL MDSTAT (NERR, MEM) |
| 446 |
IF (NERR .GT. 0) GOTO 160 |
| 447 |
|
| 448 |
C Initialize element block integer arrays |
| 449 |
CALL INIINT(NELBLK, 0, IA(KIDELB)) |
| 450 |
CALL INIINT(NELBLK, 0, IA(KNELB)) |
| 451 |
CALL INIINT(NELBLK, 0, IA(KNLNKE)) |
| 452 |
CALL INIINT(NELBLK, 0, IA(KNATR)) |
| 453 |
|
| 454 |
CALL INISTR (NELBLK, ' ', C(KNMLB)) |
| 455 |
|
| 456 |
CALL EXGEBI (NDB, IA(KIDELB), IERR) |
| 457 |
C --Read element block connectivity |
| 458 |
CALL DBIELB (NDB, '*', 1, NELBLK, IA(KIDELB), IA(KNELB), |
| 459 |
& IA(KNLNKE), IA(KNATR), A, IA, KLINKE, KATRIB, C(KNMLB), |
| 460 |
& C(KNMEB), IA(KLPTR), NAMLEN, *170) |
| 461 |
|
| 462 |
C Count the number of element blocks that contain HEXSHELLs. Store |
| 463 |
C the element block ID of HEXSHELL element blocks. |
| 464 |
ISHEX = 0 |
| 465 |
CALL RDTYPE (NELBLK, C(KNMLB), IA(KIDELB), IA(KNELB), |
| 466 |
$ ISHEX, IA(KHEXID), NSHL) |
| 467 |
|
| 468 |
if (ishex .gt. 0) then |
| 469 |
nebsiz = nelblk + ishex |
| 470 |
CALL MDLONG ('IDELB', KIDELB, NEBSIZ) |
| 471 |
CALL MCLONG ('NAMELB', KNMLB, NEBSIZ * MXSTLN) |
| 472 |
CALL MCLONG ('EBNAME', KNMEB, NEBSIZ * NAMLEN) |
| 473 |
C Number of elements in element block |
| 474 |
CALL MDLONG ('NUMELB', KNELB, NEBSIZ) |
| 475 |
C Number of nodes per elements in element block |
| 476 |
CALL MDLONG ('NUMLNK', KNLNKE, NEBSIZ) |
| 477 |
C Number of attributes in element block |
| 478 |
CALL MDLONG ('NUMATR', KNATR, NEBSIZ) |
| 479 |
CALL MDSTAT (NERR, MEM) |
| 480 |
IF (NERR .GT. 0) GOTO 160 |
| 481 |
|
| 482 |
C Initialize element block integer arrays |
| 483 |
CALL INIINT(ISHEX, 0, IA(KIDELB+NELBLK)) |
| 484 |
CALL INIINT(ISHEX, 0, IA(KNELB+NELBLK)) |
| 485 |
CALL INIINT(ISHEX, 0, IA(KNLNKE+NELBLK)) |
| 486 |
CALL INIINT(ISHEX, 0, IA(KNATR+NELBLK)) |
| 487 |
|
| 488 |
C Check for HEXSHELL - split HEXSHELL element block into a 'HEX' |
| 489 |
C element block and a 'SHELL' element block. |
| 490 |
CALL MDRSRV ('IDSCR', KIDSCR, NELBLK) |
| 491 |
do 350 j = 1, nelblk |
| 492 |
IA(KIDSCR+j-1) = IA(KIDELB+j-1) |
| 493 |
350 continue |
| 494 |
|
| 495 |
CALL PROCHS(A, IA, NELBLK, IA(KIDELB), IA(KIDSCR), IA(KNELB), |
| 496 |
& IA(KNLNKE), IA(KNATR), KLINKE, KATRIB, C(KNMLB), |
| 497 |
& IA(KLPTR), ISHEX, IA(KHEXID), *170) |
| 498 |
|
| 499 |
C Reset number of element blocks |
| 500 |
NELBLK = NELBLK + ISHEX |
| 501 |
C Reset number of elements |
| 502 |
INEL = 0 |
| 503 |
do 20 I = 1, nelblk |
| 504 |
INEL = INEL + IA(KNELB+I-1) |
| 505 |
20 CONTINUE |
| 506 |
NUMEL = INEL |
| 507 |
|
| 508 |
ENDIF |
| 509 |
|
| 510 |
C --Scan element number map (global id) |
| 511 |
CALL MDRSRV ('MAPEL', KMAPEL, NUMEL) |
| 512 |
CALL MDSTAT (NERR, MEM) |
| 513 |
IF (NERR .GT. 0) GOTO 160 |
| 514 |
if (mapel .and. numel .gt. 0) then |
| 515 |
call exgenm (ndb, ia(kmapel), ierr) |
| 516 |
else |
| 517 |
call iniseq(numel, ia(kmapel)) |
| 518 |
end if |
| 519 |
|
| 520 |
C --Read node number map (global id) |
| 521 |
CALL MDRSRV ('MAPND', KMAPND, NUMNP) |
| 522 |
CALL MDSTAT (NERR, MEM) |
| 523 |
IF (NERR .GT. 0) GOTO 160 |
| 524 |
if (mapnd) then |
| 525 |
call exgnnm (ndb, ia(kmapnd), ierr) |
| 526 |
else |
| 527 |
call iniseq(numnp, ia(kmapnd)) |
| 528 |
end if |
| 529 |
|
| 530 |
C --Change number of elements per element block to block index |
| 531 |
|
| 532 |
C --SCALER and MSMEMY and MSGEOM use MDFIND to find LENE |
| 533 |
CALL MDRSRV ('LENE', KLENE, 1+NELBLK) |
| 534 |
CALL MDSTAT (NERR, MEM) |
| 535 |
IF (NERR .GT. 0) GOTO 160 |
| 536 |
|
| 537 |
CALL NUM2IX (NELBLK, A(KNELB), A(KLENE)) |
| 538 |
|
| 539 |
C --Special fix for 8-node 2D elements - order nodes consecutively |
| 540 |
IF (.NOT. IS3DIM) THEN |
| 541 |
CALL ORD8NP (NELBLK, A(KLENE), A(KNLNKE), A(KLINKE)) |
| 542 |
END IF |
| 543 |
|
| 544 |
C --Make up the element to element block index |
| 545 |
|
| 546 |
C --MSGEOM and MSSTEP use MDFIND to find IE2ELB |
| 547 |
CALL MDRSRV ('IE2ELB', KE2ELB, NUMEL) |
| 548 |
CALL MDSTAT (NERR, MEM) |
| 549 |
IF (NERR .GT. 0) GOTO 160 |
| 550 |
|
| 551 |
CALL MAKE2B (NELBLK, A(KLENE), A(KE2ELB)) |
| 552 |
|
| 553 |
C --Read node sets and side sets |
| 554 |
|
| 555 |
CALL MDRSRV ('IDNPS', KIDNS, NUMNPS) |
| 556 |
CALL MDRSRV ('NNNPS', KNNNS, NUMNPS) |
| 557 |
CALL MDRSRV ('NDNPS', KNDNPS, NUMNPS) |
| 558 |
C --DBLIST and SSMAIN use MDFIND to find IXNNPS, LTNNPS, and FACNPS |
| 559 |
CALL MDRSRV ('IXNNPS', KIXNNS, NUMNPS) |
| 560 |
C --In exgcns call, must have space even if no dist factors defined |
| 561 |
CALL MDRSRV ('IXDNPS', KIXDNS, NUMNPS) |
| 562 |
CALL MCRSRV ('NSNAME', KNMNS, NUMNPS * NAMLEN) |
| 563 |
CALL MDRSRV ('LTNNPS', KLTNNS, LNPSNL) |
| 564 |
CALL MDRSRV ('FACNPS', KFACNS, LNPSDF) |
| 565 |
CALL MDRSRV ('IDESS', KIDSS, NUMESS) |
| 566 |
CALL MDRSRV ('NEESS', KNESS, NUMESS) |
| 567 |
CALL MDRSRV ('NNESS', KNNSS, NUMESS) |
| 568 |
CALL MDRSRV ('NDESS', KNDSS, NUMESS) |
| 569 |
C --DBLIST and SSMAIN use MDFIND to find IXEESS, IXNESS, LTEESS, LTNESS, |
| 570 |
C --and FACESS |
| 571 |
CALL MDRSRV ('IXEESS', KIXESS, NUMESS) |
| 572 |
CALL MDRSRV ('IXNESS', KIXNSS, NUMESS) |
| 573 |
CALL MDRSRV ('IXDESS', KIXDSS, NUMESS) |
| 574 |
CALL MDRSRV ('LTNNSS', KLTNNN, LESSEL) |
| 575 |
CALL MDRSRV ('LTEESS', KLTESS, LESSEL) |
| 576 |
CALL MDRSRV ('LTNESS', KLTNSS, LESSNL) |
| 577 |
CALL MDRSRV ('LTSESS', KLTSSS, LESSEL) |
| 578 |
CALL EXINQ (NDB, EXSSDF, LESSDL, rdum, cdum, ierr) |
| 579 |
CALL MDRSRV ('FACESS', KFACSS, LESSDL) |
| 580 |
CALL MCRSRV ('SSNAME', KNMSS, NUMESS * NAMLEN) |
| 581 |
CALL MDSTAT (NERR, MEM) |
| 582 |
IF (NERR .GT. 0) GOTO 160 |
| 583 |
|
| 584 |
if (numnps .gt. 0) then |
| 585 |
call exgcns(ndb, a(kidns), a(knnns), a(kndnps), a(kixnns), |
| 586 |
* a(kixdns), a(kltnns), a(kfacns), ierr) |
| 587 |
call getnams(ndb, EXNSET, numnps, c(knmns), namlen) |
| 588 |
end if |
| 589 |
if (numess .gt. 0) then |
| 590 |
call exgcssf(ndb, a(kidss), a(kness), a(kndss), a(kixess), |
| 591 |
* a(kixdss), A(KLTeSS), a(kltsss), ierr) |
| 592 |
call getnams(ndb, EXSSET, numess, c(knmss), namlen) |
| 593 |
if (ierr .ne. 0) go to 170 |
| 594 |
end if |
| 595 |
|
| 596 |
C --Read QA records |
| 597 |
|
| 598 |
call exinq(ndb, EXQA, nqarec, rdum, cdum, ierr) |
| 599 |
call exinq(ndb, EXINFO, ninfo, rdum, cdum, ierr) |
| 600 |
call mcrsrv('QAREC', kqarec, nqarec * 4 * MXSTLN) |
| 601 |
call mcrsrv('INFREC', kinfo, ninfo * MXLNLN) |
| 602 |
CALL MCSTAT (NERR, MEM) |
| 603 |
IF (NERR .GT. 0) GOTO 160 |
| 604 |
exodus = .true. |
| 605 |
if (nqarec .gt. 0) then |
| 606 |
C ... Wrapper to get strings the right length |
| 607 |
call exgqaw(ndb, c(kqarec), ierr) |
| 608 |
end if |
| 609 |
if (ninfo .gt. 0) then |
| 610 |
C ... Wrapper to get info record the right length |
| 611 |
call exginw(ndb, c(kinfo), ierr) |
| 612 |
end if |
| 613 |
|
| 614 |
CALL INISTR (4, ' ', CREATE) |
| 615 |
CALL INISTR (4, ' ', MODIFY) |
| 616 |
C ... NOTE: cpyst8 must be called since cpystr knows that c() is only |
| 617 |
C a single character array. |
| 618 |
IF (NQAREC .GT. 0) CALL CPYST8 (4, C(KQAREC), CREATE) |
| 619 |
IF (NQAREC .GT. 1) THEN |
| 620 |
CALL CPYST8 (4, C(KQAREC+4*MXSTLN*(nqarec-1)), MODIFY) |
| 621 |
END IF |
| 622 |
|
| 623 |
C --Initialize (for GENESIS) and read database names |
| 624 |
|
| 625 |
NAMECO(1) = 'X' |
| 626 |
NAMECO(2) = 'Y' |
| 627 |
IF (IS3DIM) NAMECO(3) = 'Z' |
| 628 |
|
| 629 |
call exinq(ndb, EXTIMS, NTIMST, RDUM, CDUM, IERR) |
| 630 |
exodus = (ntimst .gt. 0) |
| 631 |
|
| 632 |
IF (EXODUS) THEN |
| 633 |
C --MSGEOM uses MDFIND to find ISEVOK (reserved in DBINAM) |
| 634 |
CALL DBINAM (NDB, 'CBVT', NDIM, NELBLK, NNDIM, NNELB, |
| 635 |
& NVARHI, NVARGL, NVARNP, NVAREL, NVARNS, NVARSS, |
| 636 |
& NAMECO, KNAMHV, |
| 637 |
& KNAMGV, KNAMNV, KNAMEV, KNAMNS, KNAMSS, |
| 638 |
& A, IA, KIEVOK, C, KNAMES, |
| 639 |
& EXODUS, IA(KIDELB), ISHEX, KHEXID, NAMLEN, *110) |
| 640 |
|
| 641 |
GOTO 120 |
| 642 |
|
| 643 |
C --Handle error reading variable names |
| 644 |
110 CONTINUE |
| 645 |
NVARHI = 0 |
| 646 |
NVARGL = 0 |
| 647 |
NVARNP = 0 |
| 648 |
NVAREL = 0 |
| 649 |
NVARNS = 0 |
| 650 |
NVARSS = 0 |
| 651 |
EXODUS = .FALSE. |
| 652 |
120 CONTINUE |
| 653 |
|
| 654 |
ELSE |
| 655 |
NNDIM = -999 |
| 656 |
NNELB = -999 |
| 657 |
END IF |
| 658 |
|
| 659 |
NVARHI = MAX (0, NVARHI) |
| 660 |
NVARGL = MAX (0, NVARGL) |
| 661 |
NVARNP = MAX (0, NVARNP) |
| 662 |
NVAREL = MAX (0, NVAREL) |
| 663 |
NVARNS = MAX (0, NVARNS) |
| 664 |
NVARSS = MAX (0, NVARSS) |
| 665 |
|
| 666 |
IF (EXODUS) THEN |
| 667 |
CALL PRNAME (-1, namlen, |
| 668 |
* NVARGL, NVARNP, NVAREL, NVARNS, NVARSS, |
| 669 |
& C(KNAMES+NAMLEN*(KNAMGV-1)), |
| 670 |
& C(KNAMES+NAMLEN*(KNAMNV-1)), C(KNAMES+NAMLEN*(KNAMEV-1)), |
| 671 |
& C(KNAMES+NAMLEN*(KNAMNS-1)), C(KNAMES+NAMLEN*(KNAMSS-1))) |
| 672 |
END IF |
| 673 |
|
| 674 |
C --Get database time (allocates dynamic memory) |
| 675 |
C --SCALER uses MDFIND to find TIMES and WHOTIM |
| 676 |
|
| 677 |
if (EXODUS) then |
| 678 |
CALL DBITIM (NDB, '*', EXODUS, |
| 679 |
& NVARNP, NELBLK, NVAREL, A(KIEVOK), |
| 680 |
& NSTEPS, NSTEPW, A, KTIMES, KWHOLE, *170) |
| 681 |
CALL PRTIMS ('NM', -1, .TRUE., .TRUE., |
| 682 |
& NSTEPS, A(KTIMES), A(KWHOLE)) |
| 683 |
else |
| 684 |
C ... The 'TIMES' and 'WHOTIM' arrays are accessed even if there are |
| 685 |
C no timesteps on the model (See plcomd.f). |
| 686 |
call mdrsrv('TIMES', KTIMES, 1) |
| 687 |
call mdrsrv('WHOTIM', KWHOLE, 1) |
| 688 |
end if |
| 689 |
|
| 690 |
IF (.NOT. EXODUS) THEN |
| 691 |
WRITE (*, 10010) 'Database is in the GENESIS format' |
| 692 |
END IF |
| 693 |
|
| 694 |
C --Calculate the element centers |
| 695 |
|
| 696 |
C --SCALER uses MDFIND to find XE, YE, ZE |
| 697 |
CALL MDGET (NDIM * NUMEL) |
| 698 |
CALL MDRSRV ('XE', KXE, NUMEL) |
| 699 |
CALL MDRSRV ('YE', KYE, NUMEL) |
| 700 |
IF (IS3DIM) THEN |
| 701 |
CALL MDRSRV ('ZE', KZE, NUMEL) |
| 702 |
ELSE |
| 703 |
KZE = 1 |
| 704 |
END IF |
| 705 |
CALL MDSTAT (NERR, MEM) |
| 706 |
IF (NERR .GT. 0) GOTO 160 |
| 707 |
|
| 708 |
CALL ELECOR (NDIM, NELBLK, A(KLENE), A(KNLNKE), A(KLINKE), |
| 709 |
& A(KXN), A(KYN), A(KZN), A(KXE), A(KYE), A(KZE)) |
| 710 |
|
| 711 |
C --Break 3D elements into faces, and sort faces by element block |
| 712 |
|
| 713 |
IF (MESHOK) THEN |
| 714 |
IF (IS3DIM) THEN |
| 715 |
WRITE (*, 10010) |
| 716 |
& 'Please wait while the geometry is processed' |
| 717 |
END IF |
| 718 |
|
| 719 |
IF (.NOT. IS3DIM) THEN |
| 720 |
CALL MDRSRV ('LENF', KLENF, 1 + NELBLK + 2) |
| 721 |
CALL INIINT (1+NELBLK+2, 0, IA(KLENF)) |
| 722 |
ELSE |
| 723 |
CALL MDRSRV ('LENF', KLENF, 1 + NELBLK + 4) |
| 724 |
CALL INIINT (1+NELBLK+4, 0, IA(KLENF)) |
| 725 |
END IF |
| 726 |
CALL MDRSRV ('NLNKF', KNLNKF, NELBLK) |
| 727 |
CALL MDRSRV ('LINKF', KLINKF, 0) |
| 728 |
CALL MDRSRV ('IF2EL', KIF2EL, 0) |
| 729 |
CALL MDSTAT (NERR, MEM) |
| 730 |
IF (NERR .GT. 0) GOTO 160 |
| 731 |
|
| 732 |
CALL MSSURF (A, IA, A(KLENE), A(KNLNKE), A(KLINKE), |
| 733 |
& A(KLENF), A(KNLNKF), KLINKF, KIF2EL, C(KNMLB)) |
| 734 |
CALL MDSTAT (NERR, MEM) |
| 735 |
IF (NERR .GT. 0) GOTO 160 |
| 736 |
ELSE |
| 737 |
KNLNKF = 1 |
| 738 |
KLENF = 1 |
| 739 |
KLINKF = 1 |
| 740 |
KIF2EL = 1 |
| 741 |
END IF |
| 742 |
|
| 743 |
C --Group lines connecting nodes for efficiency |
| 744 |
|
| 745 |
IF (MESHOK) THEN |
| 746 |
CALL MDRSRV ('LENL', KLENL, 3 + NELBLK) |
| 747 |
CALL INIINT (3+NELBLK, 0, IA(KLENL)) |
| 748 |
CALL MDRSRV ('LINSET', KLNSET, 0) |
| 749 |
CALL MDSTAT (NERR, MEM) |
| 750 |
IF (NERR .GT. 0) GOTO 160 |
| 751 |
|
| 752 |
CALL MSLINS (A, |
| 753 |
& A(KLENF), A(KNLNKF), A(KLINKF), A(KIF2EL), |
| 754 |
& A(KLENL), KLNSET) |
| 755 |
CALL MDSTAT (NERR, MEM) |
| 756 |
IF (NERR .GT. 0) GOTO 160 |
| 757 |
ELSE |
| 758 |
KLENL = 1 |
| 759 |
KLNSET = 1 |
| 760 |
END IF |
| 761 |
|
| 762 |
C --Calculate (and initialize) the deformed mesh limits |
| 763 |
|
| 764 |
RDMESH(1) = 0.0 |
| 765 |
RDMESH(2) = 0.0 |
| 766 |
RDMESH(3) = 0.0 |
| 767 |
RDMESH(4) = 0.0 |
| 768 |
|
| 769 |
IF (MESHOK) THEN |
| 770 |
|
| 771 |
C --Compute NPSURF nodes that determine the mesh limits |
| 772 |
|
| 773 |
NUMNPF = NUMNP |
| 774 |
|
| 775 |
C --QNPICK uses NPFIND to find NPSURF |
| 776 |
CALL MDRSRV ('NPSURF', KNPSUR, NUMNPF) |
| 777 |
CALL MDSTAT (NERR, MEM) |
| 778 |
IF (NERR .GT. 0) GOTO 160 |
| 779 |
|
| 780 |
IF (.NOT. IS3DIM) THEN |
| 781 |
CALL MAKSU2 (A(KLENL), A(KLNSET), MSHBOR, |
| 782 |
& .FALSE., IDUM, A(KNPSUR)) |
| 783 |
ELSE |
| 784 |
CALL MAKSUR (A(KLENF), A(KNLNKF), A(KLINKF), |
| 785 |
& .FALSE., IDUM, A(KNPSUR)) |
| 786 |
END IF |
| 787 |
|
| 788 |
CALL MDLONG ('NPSURF', KNPSUR, NNPSUR) |
| 789 |
|
| 790 |
C --Find the displacement variables |
| 791 |
|
| 792 |
CALL FNDDIS (NAMECO, C(KNAMES+NAMLEN*(KNAMNV-1)), |
| 793 |
& DEFOK, IXDEF, IYDEF, IZDEF, DEFFAC, NAMLEN) |
| 794 |
|
| 795 |
C --Find the undeformed mesh limits |
| 796 |
|
| 797 |
CALL MINMXS (NNPSUR, A(KNPSUR), A(KXN), |
| 798 |
& UNMESH(KLFT), UNMESH(KRGT)) |
| 799 |
CALL MINMXS (NNPSUR, A(KNPSUR), A(KYN), |
| 800 |
& UNMESH(KBOT), UNMESH(KTOP)) |
| 801 |
IF (IS3DIM) CALL MINMXS (NNPSUR, A(KNPSUR), A(KZN), |
| 802 |
& UNMESH(KNEA), UNMESH(KFAR)) |
| 803 |
|
| 804 |
CALL CPYREA (2*NDIM, UNMESH, ALMESH) |
| 805 |
|
| 806 |
C --Calculate the deformed mesh limits |
| 807 |
|
| 808 |
CALL DEFLIM (A, A(KWHOLE), |
| 809 |
& A(KXN), A(KYN), A(KZN), A(KNPSUR)) |
| 810 |
CALL MDSTAT (NERR, MEM) |
| 811 |
IF (NERR .GT. 0) GOTO 160 |
| 812 |
ELSE |
| 813 |
KNPSUR = 1 |
| 814 |
END IF |
| 815 |
|
| 816 |
C --Reserve memory for all programs |
| 817 |
|
| 818 |
CALL MDGET (1+NUMNP + 1+NELBLK + 1+NUMEL |
| 819 |
& + 1+NUMNPS + 1+NUMESS |
| 820 |
& + 1+NVARHI + 1+NVARGL + 1+NVARNP + 1+NVAREL |
| 821 |
& + 2+NVARHI+NVARGL) |
| 822 |
CALL MDRSRV ('LISNP', KLINP, 1+NUMNP) |
| 823 |
CALL MDRSRV ('NLISEL', KNLIEL, 1+NELBLK) |
| 824 |
CALL MDRSRV ('LISEL', KLIEL, 1+NUMEL) |
| 825 |
CALL MDRSRV ('LISNPS', KLINPS, 1+NUMNPS) |
| 826 |
CALL MDRSRV ('LISESS', KLIESS, 1+NUMESS) |
| 827 |
IF (EXODUS) THEN |
| 828 |
CALL MDRSRV ('LISHV', KLIHV, 1+NVARHI) |
| 829 |
CALL MDRSRV ('LISGV', KLIGV, 1+NVARGL) |
| 830 |
CALL MDRSRV ('LISNV', KLINV, 1+NVARNP) |
| 831 |
CALL MDRSRV ('LISEV', KLIEV, 1+NVAREL) |
| 832 |
CALL MDRSRV ('LIDSP', KLIDP, 2+NVARHI+NVARGL) |
| 833 |
CALL MDSTAT (NERR, MEM) |
| 834 |
IF (NERR .GT. 0) GOTO 160 |
| 835 |
ELSE |
| 836 |
KLIHV = 1 |
| 837 |
KLIGV = 1 |
| 838 |
KLINV = 1 |
| 839 |
KLIEV = 1 |
| 840 |
KLIDP = 1 |
| 841 |
END IF |
| 842 |
|
| 843 |
NPTIMS = 0 |
| 844 |
NPTIMW = 0 |
| 845 |
CALL MDRSRV ('IPTIMS', KPTIMS, MAX (NSTEPS, 1)) |
| 846 |
CALL MDSTAT (NERR, MEM) |
| 847 |
IF (NERR .GT. 0) GOTO 160 |
| 848 |
|
| 849 |
C --Reserve memory for mesh plots |
| 850 |
|
| 851 |
CALL MDRSRV ('BLKCOL', KBKCOL, 1+NELBLK) |
| 852 |
CALL MDRSRV ('IELBST', KELBST, NELBLK) |
| 853 |
CALL MDRSRV ('ISSNPS', KSSNPS, NUMNPS*4) |
| 854 |
CALL MDRSRV ('ISSESS', KSSESS, NUMESS*4) |
| 855 |
CALL MDRSRV ('SHDCOL', KSHDCL, NELBLK*7) |
| 856 |
CALL MDRSRV ('ISHDCL', KISHCL, NELBLK*3) |
| 857 |
CALL MDSTAT (NERR, MEM) |
| 858 |
IF (NERR .GT. 0) GOTO 160 |
| 859 |
CALL INIREA (NELBLK*7, 0.0, A(KSHDCL)) |
| 860 |
CALL INIINT (NELBLK*3, 0, IA(KISHCL)) |
| 861 |
|
| 862 |
C --Reserve memory for DETOUR, if able to run |
| 863 |
|
| 864 |
CALL DTCHK (.FALSE., DTOK) |
| 865 |
|
| 866 |
IF (DTOK) THEN |
| 867 |
CALL MDSTAT (NERR, MEM) |
| 868 |
IF (NERR .GT. 0) GOTO 160 |
| 869 |
END IF |
| 870 |
|
| 871 |
C --Reserve memory for PATHLINE, if able to run |
| 872 |
|
| 873 |
CALL LNCHK (.FALSE., LNOK) |
| 874 |
|
| 875 |
IF (LNOK) THEN |
| 876 |
CALL MDSTAT (NERR, MEM) |
| 877 |
IF (NERR .GT. 0) GOTO 160 |
| 878 |
END IF |
| 879 |
|
| 880 |
C --Reserve memory for TPLOT, if able to run |
| 881 |
|
| 882 |
CALL TPCHK (.FALSE., TPOK) |
| 883 |
|
| 884 |
IF (TPOK) THEN |
| 885 |
CALL MDSTAT (NERR, MEM) |
| 886 |
IF (NERR .GT. 0) GOTO 160 |
| 887 |
END IF |
| 888 |
|
| 889 |
C --Reserve memory for SPLOT, if able to run |
| 890 |
|
| 891 |
CALL SPCHK (.FALSE., SPOK) |
| 892 |
|
| 893 |
IF (SPOK) THEN |
| 894 |
MAXNE = MAX (NUMNP, NUMEL) |
| 895 |
CALL MDRSRV ('NENUM', KNENUM, MAXNE) |
| 896 |
CALL MDSTAT (NERR, MEM) |
| 897 |
IF (NERR .GT. 0) GOTO 160 |
| 898 |
ELSE |
| 899 |
KNENUM = 1 |
| 900 |
END IF |
| 901 |
|
| 902 |
IF (LNOK .OR. SPOK) THEN |
| 903 |
CALL MDRSRV ('IPATH', KIPATH, 0) |
| 904 |
CALL MDSTAT (NERR, MEM) |
| 905 |
IF (NERR .GT. 0) GOTO 160 |
| 906 |
ELSE |
| 907 |
KIPATH = 1 |
| 908 |
END IF |
| 909 |
|
| 910 |
C Initialize array containing list of display variables |
| 911 |
IF (EXODUS) CALL DISPV (.TRUE., ' ', IDUM, IDUM, |
| 912 |
& ' ', C(KNAMES), A(KLIDP), NAMLEN) |
| 913 |
|
| 914 |
C Initialize BLKCOL array. |
| 915 |
if (meshok) then |
| 916 |
CALL BCOLOR (.TRUE., ' ', IDUM, IDUM, IDUM,' ', A(KBKCOL)) |
| 917 |
end if |
| 918 |
|
| 919 |
C Initialize line thicknesses for mesh plots |
| 920 |
CALL LINTHK (CDUM, IDUM, IDUM, IDUM, RDUM, CDUM, .TRUE.) |
| 921 |
|
| 922 |
write (*,9999) |
| 923 |
9999 FORMAT(/, |
| 924 |
* 10x,'NOTE: This version of blot uses global ids for both', |
| 925 |
* ' node and element ids by default.',/, |
| 926 |
* 10x,' To see the mapping from local to global, use', |
| 927 |
* ' the commands:',/, |
| 928 |
* 10x,' "LIST MAP" (element map), or ', |
| 929 |
* '"LIST NODEMAP" (node map)',/, |
| 930 |
* 10x,' To disable the maps and use local ids, restart', |
| 931 |
* ' blot with "-nomap node|element|all"',//, |
| 932 |
* 10x,' Notify [email protected] if bugs found') |
| 933 |
|
| 934 |
if (mapel .and. mapnd) then |
| 935 |
WRITE (*, 10010) 'Nodes and Elements using Global Ids' |
| 936 |
else if (mapel) then |
| 937 |
WRITE (*, 10010) 'Elements use Global Ids, Node Ids are Local' |
| 938 |
else if (mapnd) then |
| 939 |
WRITE (*, 10010) 'Element use Local Ids, Node Ids are Global' |
| 940 |
else |
| 941 |
WRITE (*, 10010) 'Nodes and Elements using Local Ids' |
| 942 |
end if |
| 943 |
|
| 944 |
130 CONTINUE |
| 945 |
IF (.TRUE.) THEN |
| 946 |
CALL MDLONG ('IPTIMS', KPTIMS, MAX (NSTEPS, 1)) |
| 947 |
IF (SPOK) THEN |
| 948 |
CALL MDLONG ('NENUM', KNENUM, MAXNE) |
| 949 |
END IF |
| 950 |
CALL MDSTAT (NERR, MEM) |
| 951 |
IF (NERR .GT. 0) GOTO 160 |
| 952 |
|
| 953 |
CALL COMAND (A, CURPRO, C(KQAREC), C(KINFO), |
| 954 |
& NAMECO, C(KNMLB), C(KNAMES), A(KTIMES), A(KWHOLE), |
| 955 |
* A(KPTIMS), A(KMAPEL), A(KMAPND), |
| 956 |
& A(KIDELB), NEWELB, A(KELBST), A(KE2ELB), |
| 957 |
& A(KLENE), A(KNLNKE), A(KLINKE), |
| 958 |
& A(KXN), A(KYN), A(KZN), A(KXE), A(KYE), A(KZE), |
| 959 |
& A(KIEVOK), |
| 960 |
& A(KSSNPS), A(KIDNS), A(KNNNS), |
| 961 |
& A(KSSESS), A(KIDSS), A(KNESS), A(KNNSS), |
| 962 |
& NCSTEP, A(KLINP), A(KNLIEL), A(KLIEL), |
| 963 |
& A(KLINPS), A(KLIESS), |
| 964 |
& A(KLIHV), A(KLIGV), A(KLINV), A(KLIEV), A(KLIDP), |
| 965 |
& A(KBKCOL), A(KNENUM), NEUTRL, NEWPRO, A(KSHDCL), |
| 966 |
* A(KISHCL), C(KNMEB), C(KNMNS), C(KNMSS), NAMLEN, *150) |
| 967 |
CALL MDSTAT (NERR, MEM) |
| 968 |
IF (NERR .GT. 0) GOTO 160 |
| 969 |
|
| 970 |
C --Calculate the undeformed and deformed mesh limits |
| 971 |
|
| 972 |
IF ((CURPRO .EQ. 'DETOUR') .AND. (DEFFAC .LT. 0.0)) THEN |
| 973 |
CALL DEFLIM (A, A(KWHOLE), |
| 974 |
& A(KXN), A(KYN), A(KZN), A(KNPSUR)) |
| 975 |
CALL MDSTAT (NERR, MEM) |
| 976 |
IF (NERR .GT. 0) GOTO 160 |
| 977 |
END IF |
| 978 |
|
| 979 |
CALL MDLONG ('IPTIMS', KPTIMS, NPTIMS) |
| 980 |
IF (SPOK) THEN |
| 981 |
CALL MDLONG ('NENUM', KNENUM, NNENUM) |
| 982 |
END IF |
| 983 |
CALL MDSTAT (NERR, MEM) |
| 984 |
IF (NERR .GT. 0) GOTO 160 |
| 985 |
|
| 986 |
IF (NEWPRO .EQ. 'P') THEN |
| 987 |
CALL PLOTER (A, CURPRO, NEUTRL, |
| 988 |
& C(KNAMES), NPTIMS, A(KPTIMS), A(KTIMES), A(KWHOLE), |
| 989 |
& A(KNLNKE), A(KIEVOK), A(KNENUM), |
| 990 |
& A(KXN), A(KYN), A(KZN), A(KXE), A(KYE), A(KZE), |
| 991 |
& NAMECO, A(KLENF), A(KNLNKF), KLINKF, |
| 992 |
& A(KLENL), KLNSET, |
| 993 |
& A(KE2ELB), NEWELB, A(KELBST), KNPSUR, |
| 994 |
& A(KSSNPS), A(KIDNS), A(KSSESS), A(KIDSS), |
| 995 |
& A(KLIDP), A(KBKCOL), A(KIDELB),C(KNMLB), NAMLEN, |
| 996 |
* A(KMAPEL), A(KMAPND)) |
| 997 |
CALL MDSTAT (NERR, MEM) |
| 998 |
IF (NERR .GT. 0) GOTO 160 |
| 999 |
END IF |
| 1000 |
|
| 1001 |
GOTO 130 |
| 1002 |
END IF |
| 1003 |
|
| 1004 |
150 CONTINUE |
| 1005 |
|
| 1006 |
C --Finish graphics |
| 1007 |
CALL GREXIT |
| 1008 |
|
| 1009 |
CALL MDSTAT (NERR, MEM) |
| 1010 |
IF (NERR .GT. 0) GOTO 160 |
| 1011 |
|
| 1012 |
GOTO 180 |
| 1013 |
|
| 1014 |
160 CONTINUE |
| 1015 |
WRITE (*, *) 'Total memory used = ', MEM, ' words.' |
| 1016 |
CALL MEMERR |
| 1017 |
GOTO 180 |
| 1018 |
|
| 1019 |
170 CONTINUE |
| 1020 |
GOTO 180 |
| 1021 |
|
| 1022 |
180 CONTINUE |
| 1023 |
|
| 1024 |
C --Close files |
| 1025 |
|
| 1026 |
call MDFREE() |
| 1027 |
CALL EXCLOS(NDB, IERR) |
| 1028 |
IF (NEUOPN) THEN |
| 1029 |
WRITE (NEU, 10030) 'xmax', wxmax |
| 1030 |
WRITE (NEU, 10030) 'xmin', wxmin |
| 1031 |
WRITE (NEU, 10030) 'ymax', wymax |
| 1032 |
WRITE (NEU, 10030) 'ymin', wymin |
| 1033 |
CLOSE (NEU, IOSTAT=IDUM) |
| 1034 |
END IF |
| 1035 |
IF (ANYPRT) CLOSE (NPRT, IOSTAT=IDUM) |
| 1036 |
IF (GRFOPN) CLOSE(NEUGRF) |
| 1037 |
IF (CSVOPN) CLOSE(NCSV) |
| 1038 |
|
| 1039 |
190 continue |
| 1040 |
call addlog (QAINFO(1)(:lenstr(QAINFO(1)))) |
| 1041 |
CALL WRAPUP (QAINFO(1)) |
| 1042 |
|
| 1043 |
10010 FORMAT (/, 1X, 5A) |
| 1044 |
10020 FORMAT (/ |
| 1045 |
& 21X,'BBBBBBBB LL OOOOOO TTTTTTTTTT', / |
| 1046 |
& 20X,'BBBBBBBBB LL OOOOOOOO TTTTTTTTTT', / |
| 1047 |
& 19X,'BB BB LL OO OO TT ', / |
| 1048 |
& 18X,'BB BB LL OO OO TT ', / |
| 1049 |
& 17X,'BBBBBBBBB LL OO OO TT ', / |
| 1050 |
& 16X,'BBBBBBBBB LL OO OO TT ', / |
| 1051 |
& 15X,'BB BB LL OO OO TT ', / |
| 1052 |
& 14X,'BB BB LL OO OO TT ', / |
| 1053 |
& 13X,'BBBBBBBBB LLLLLLLLLL OOOOOOOO TT ', / |
| 1054 |
& 12X,'BBBBBBBB LLLLLLLLLL OOOOOO TT II-2') |
| 1055 |
10030 FORMAT ('@ world ',A4,1x,1pe15.7E3) |
| 1056 |
|
| 1057 |
END |
| 1058 |
|
| 1059 |
subroutine inimap(num, iar) |
| 1060 |
dimension iar(*) |
| 1061 |
do 10 i=1, num |
| 1062 |
iar(i) = i |
| 1063 |
10 continue |
| 1064 |
return |
| 1065 |
end |
| 1066 |
|
| 1067 |
C======================================================================= |
| 1068 |
SUBROUTINE CPYST8 (LEN, IFROM, ITO) |
| 1069 |
C======================================================================= |
| 1070 |
C --Parameters: |
| 1071 |
C -- LEN - IN - the number of strings in the list |
| 1072 |
C -- IFROM - IN - the input list |
| 1073 |
C -- ITO - OUT - the copied list |
| 1074 |
C -- ISTLN - IN - string length |
| 1075 |
|
| 1076 |
INTEGER LEN |
| 1077 |
include 'params.blk' |
| 1078 |
CHARACTER*(MXSTLN) IFROM(*), ITO(*) |
| 1079 |
|
| 1080 |
DO 100 I = 1, LEN |
| 1081 |
ITO(I) = IFROM(I) |
| 1082 |
100 CONTINUE |
| 1083 |
|
| 1084 |
RETURN |
| 1085 |
END |
| 1086 |
|
| 1087 |
C ... Wrapper to get strings the right length |
| 1088 |
subroutine exgqaw(ndb, qarec, ierr) |
| 1089 |
include 'params.blk' |
| 1090 |
character*(mxstln) qarec(4, *) |
| 1091 |
call exgqa(ndb, qarec, ierr) |
| 1092 |
return |
| 1093 |
end |
| 1094 |
subroutine exginw(ndb, info, ierr) |
| 1095 |
include 'params.blk' |
| 1096 |
character*(mxlnln) info(*) |
| 1097 |
call exginf(ndb, info, ierr) |
| 1098 |
return |
| 1099 |
end |
| 1100 |
|
| 1101 |
C======================================================================= |
| 1102 |
SUBROUTINE RDTYPE (NELBLK,NAMELB,IDELB,NUMELB,ISHEX,HEXID,NSHL) |
| 1103 |
C======================================================================= |
| 1104 |
|
| 1105 |
INTEGER NELBLK, ISHEX |
| 1106 |
INTEGER IDELB(*), HEXID(*), numelb(*) |
| 1107 |
CHARACTER*32 NAMELB(*) |
| 1108 |
|
| 1109 |
C Initialize HEX return variables |
| 1110 |
ISHEX = 0 |
| 1111 |
NSHL = 0 |
| 1112 |
C Mark HEXID array with corresponding element blocks that have HEXSHELLs |
| 1113 |
DO 310 I = 1, NELBLK |
| 1114 |
C Check if element block contains HEXSHELLs |
| 1115 |
IF (NAMELB(I)(1:8) .EQ. 'HEXSHELL') THEN |
| 1116 |
C ISHEX - counter: how many HEXSHELL element blocks |
| 1117 |
C index - HEXID(ISHEX) - stores HEXSHELL element block id |
| 1118 |
ISHEX = ISHEX + 1 |
| 1119 |
HEXID(ISHEX) = IDELB(I) |
| 1120 |
ELSE IF (NAMELB(I)(1:5) .EQ. 'SHELL') THEN |
| 1121 |
NSHL = NSHL + NUMELB(I) |
| 1122 |
ENDIF |
| 1123 |
310 CONTINUE |
| 1124 |
|
| 1125 |
RETURN |
| 1126 |
END |
| 1127 |
|
| 1128 |
C======================================================================= |
| 1129 |
SUBROUTINE GETNAMS (NDB, ITYPE, NUM, NAMES, NAMLEN) |
| 1130 |
C======================================================================= |
| 1131 |
|
| 1132 |
CHARACTER*(NAMLEN) NAMES(*) |
| 1133 |
CALL EXGNAMS(NDB, ITYPE, NUM, names, ierr) |
| 1134 |
RETURN |
| 1135 |
END |
| 1136 |
|
| 1137 |
subroutine iniseq(icnt, map) |
| 1138 |
integer map(*) |
| 1139 |
do i=1, icnt |
| 1140 |
map(i) = i |
| 1141 |
end do |
| 1142 |
return |
| 1143 |
end |